!41 add loongarch support for SDL2

From: @zhangwenlong01 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2023-03-14 03:46:42 +00:00 committed by Gitee
commit fc459424c6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: SDL2 Name: SDL2
Version: 2.0.12 Version: 2.0.12
Release: 5 Release: 6
Summary: Cross-platform multimedia library Summary: Cross-platform multimedia library
License: zlib and MIT License: zlib and MIT
URL: http://www.libsdl.org/ URL: http://www.libsdl.org/
@ -19,7 +19,11 @@ BuildRequires: mesa-libGLU-devel mesa-libEGL-devel libglvnd-devel
BuildRequires: libXext-devel libX11-devel libXi-devel libXrandr-devel BuildRequires: libXext-devel libX11-devel libXi-devel libXrandr-devel
BuildRequires: libXrender-devel libXScrnSaver-devel libusb-devel BuildRequires: libXrender-devel libXScrnSaver-devel libusb-devel
BuildRequires: libXinerama-devel libXcursor-devel systemd-devel BuildRequires: libXinerama-devel libXcursor-devel systemd-devel
%ifarch loongarch64
BuildRequires: pkgconfig(libpulse-simple)
%else
BuildRequires: pkgconfig(libpulse-simple) pkgconfig(jack) BuildRequires: pkgconfig(libpulse-simple) pkgconfig(jack)
%endif
BuildRequires: pkgconfig(dbus-1) pkgconfig(ibus-1.0) BuildRequires: pkgconfig(dbus-1) pkgconfig(ibus-1.0)
BuildRequires: pkgconfig(wayland-client) pkgconfig(wayland-egl) BuildRequires: pkgconfig(wayland-client) pkgconfig(wayland-egl)
BuildRequires: pkgconfig(wayland-cursor) pkgconfig(wayland-protocols) BuildRequires: pkgconfig(wayland-cursor) pkgconfig(wayland-protocols)
@ -94,6 +98,9 @@ rm -vf %{buildroot}%{_libdir}/*.la
%{_libdir}/lib*.a %{_libdir}/lib*.a
%changelog %changelog
* Thu Mar 02 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 2.0.12-6
- add loongarch support
* Tue Jan 10 2023 jiangpeng <jiangpeng01@ncti-gba.cn> - 2.0.12-5 * Tue Jan 10 2023 jiangpeng <jiangpeng01@ncti-gba.cn> - 2.0.12-5
- fix CVE-2022-4743 - fix CVE-2022-4743

View File

@ -76,6 +76,8 @@
#include "SDL_config-mips.h" #include "SDL_config-mips.h"
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#include "SDL_config-riscv64.h" #include "SDL_config-riscv64.h"
#elif defined(__loongarch64)
#include "SDL_config-loongarch64.h"
#else #else
#error "The SDL2-devel package is not usable with the architecture." #error "The SDL2-devel package is not usable with the architecture."
#endif #endif