mirror of
https://abf.rosa.ru/djam/SDL3.git
synced 2025-02-24 06:12:56 +00:00
New version 2.0.7
Build with -mstackrealign to fix fpc-compiled appications segfaults Enable wayland support
This commit is contained in:
parent
30cb2e4077
commit
35182db7ee
6 changed files with 27 additions and 109 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
||||||
sources:
|
sources:
|
||||||
SDL2-2.0.5.tar.gz: c4f87580630387796df4ac87c362b4f9a721457e
|
SDL2-2.0.7.tar.gz: 0a530ccdab99cbfe906dba912049e26e3c7219d6
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
|
|
||||||
# HG changeset patch
|
|
||||||
# User Sam Lantinga <slouken@libsdl.org>
|
|
||||||
# Date 1477183983 25200
|
|
||||||
# Node ID fbf9b0e3589a1f88e2eefbbeb3b632e2da795fde
|
|
||||||
# Parent 5184186d4366169617b434f5b71c618a7035cde4
|
|
||||||
Fixed NULL pointer dereference, thanks Ozkan Sezer
|
|
||||||
|
|
||||||
diff -r 5184186d4366 -r fbf9b0e3589a src/video/SDL_blit_N.c
|
|
||||||
--- a/src/video/SDL_blit_N.c Sat Oct 22 11:01:55 2016 -0700
|
|
||||||
+++ b/src/video/SDL_blit_N.c Sat Oct 22 17:53:03 2016 -0700
|
|
||||||
@@ -125,11 +125,7 @@
|
|
||||||
0x0C);
|
|
||||||
vector unsigned char vswiz;
|
|
||||||
vector unsigned int srcvec;
|
|
||||||
-#define RESHIFT(X) (3 - ((X) >> 3))
|
|
||||||
- Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
|
|
||||||
- Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
|
|
||||||
- Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
|
|
||||||
- Uint32 amask;
|
|
||||||
+ Uint32 rmask, gmask, bmask, amask;
|
|
||||||
|
|
||||||
if (!srcfmt) {
|
|
||||||
srcfmt = &default_pixel_format;
|
|
||||||
@@ -138,6 +134,11 @@
|
|
||||||
dstfmt = &default_pixel_format;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define RESHIFT(X) (3 - ((X) >> 3))
|
|
||||||
+ rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
|
|
||||||
+ gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
|
|
||||||
+ bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
|
|
||||||
+
|
|
||||||
/* Use zero for alpha if either surface doesn't have alpha */
|
|
||||||
if (dstfmt->Amask) {
|
|
||||||
amask =
|
|
||||||
@@ -149,6 +150,7 @@
|
|
||||||
0xFFFFFFFF);
|
|
||||||
}
|
|
||||||
#undef RESHIFT
|
|
||||||
+
|
|
||||||
((unsigned int *) (char *) &srcvec)[0] = (rmask | gmask | bmask | amask);
|
|
||||||
vswiz = vec_add(plus, (vector unsigned char) vec_splat(srcvec, 0));
|
|
||||||
return (vswiz);
|
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
|
|
||||||
# HG changeset patch
|
|
||||||
# User Sam Lantinga <slouken@libsdl.org>
|
|
||||||
# Date 1477159315 25200
|
|
||||||
# Node ID 5184186d4366169617b434f5b71c618a7035cde4
|
|
||||||
# Parent 71d4148e32de5088c4bc2f04c1e5ded647a2bf82
|
|
||||||
Fixed bug 3466 - Can't build 2.0.5 on ppc64
|
|
||||||
|
|
||||||
/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
|
|
||||||
/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
|
|
||||||
const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
|
|
||||||
^
|
|
||||||
|
|
||||||
diff -r 71d4148e32de -r 5184186d4366 src/video/SDL_blit_N.c
|
|
||||||
--- a/src/video/SDL_blit_N.c Wed Oct 19 21:22:42 2016 -0700
|
|
||||||
+++ b/src/video/SDL_blit_N.c Sat Oct 22 11:01:55 2016 -0700
|
|
||||||
@@ -118,12 +118,6 @@
|
|
||||||
16, 8, 0, 24,
|
|
||||||
0, NULL
|
|
||||||
};
|
|
||||||
- if (!srcfmt) {
|
|
||||||
- srcfmt = &default_pixel_format;
|
|
||||||
- }
|
|
||||||
- if (!dstfmt) {
|
|
||||||
- dstfmt = &default_pixel_format;
|
|
||||||
- }
|
|
||||||
const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
|
|
||||||
0x04, 0x04, 0x04, 0x04,
|
|
||||||
0x08, 0x08, 0x08, 0x08,
|
|
||||||
@@ -136,6 +130,14 @@
|
|
||||||
Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
|
|
||||||
Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
|
|
||||||
Uint32 amask;
|
|
||||||
+
|
|
||||||
+ if (!srcfmt) {
|
|
||||||
+ srcfmt = &default_pixel_format;
|
|
||||||
+ }
|
|
||||||
+ if (!dstfmt) {
|
|
||||||
+ dstfmt = &default_pixel_format;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Use zero for alpha if either surface doesn't have alpha */
|
|
||||||
if (dstfmt->Amask) {
|
|
||||||
amask =
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff -urN SDL2-2.0.5/CMakeLists.txt SDL2-2.0.5-patched/CMakeLists.txt
|
|
||||||
--- SDL2-2.0.5/CMakeLists.txt 2016-10-20 13:56:26.000000000 +1000
|
|
||||||
+++ SDL2-2.0.5-patched/CMakeLists.txt 2017-02-27 20:03:11.662196288 +1000
|
|
||||||
@@ -1541,7 +1541,7 @@
|
|
||||||
if(UNIX)
|
|
||||||
set_target_properties(SDL2 PROPERTIES
|
|
||||||
VERSION ${LT_VERSION}
|
|
||||||
- SOVERSION ${LT_REVISION}
|
|
||||||
+ SOVERSION 0
|
|
||||||
OUTPUT_NAME "SDL2-${LT_RELEASE}")
|
|
||||||
else()
|
|
||||||
set_target_properties(SDL2 PROPERTIES
|
|
12
SDL2-2.0.7-soversion.patch
Normal file
12
SDL2-2.0.7-soversion.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -urN SDL2-2.0.7/CMakeLists.txt SDL2-2.0.7-patched/CMakeLists.txt
|
||||||
|
--- SDL2-2.0.7/CMakeLists.txt 2017-10-24 05:27:45.000000000 +1000
|
||||||
|
+++ SDL2-2.0.7-patched/CMakeLists.txt 2017-11-17 11:57:50.811762729 +1000
|
||||||
|
@@ -1699,7 +1699,7 @@
|
||||||
|
elseif(UNIX AND NOT ANDROID)
|
||||||
|
set_target_properties(SDL2 PROPERTIES
|
||||||
|
VERSION ${LT_VERSION}
|
||||||
|
- SOVERSION ${LT_REVISION}
|
||||||
|
+ SOVERSION 0
|
||||||
|
OUTPUT_NAME "SDL2-${LT_RELEASE}")
|
||||||
|
else()
|
||||||
|
set_target_properties(SDL2 PROPERTIES
|
20
SDL2.spec
20
SDL2.spec
|
@ -1,4 +1,4 @@
|
||||||
%define oversion 0.4.1
|
%define oversion 0.7.0
|
||||||
|
|
||||||
%define api 2.0
|
%define api 2.0
|
||||||
%define major 0
|
%define major 0
|
||||||
|
@ -7,29 +7,35 @@
|
||||||
|
|
||||||
Summary: Simple DirectMedia Layer
|
Summary: Simple DirectMedia Layer
|
||||||
Name: SDL2
|
Name: SDL2
|
||||||
Version: 2.0.5
|
Version: 2.0.7
|
||||||
Release: 4
|
Release: 3
|
||||||
License: Zlib
|
License: Zlib
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Url: http://www.libsdl.org/
|
Url: http://www.libsdl.org/
|
||||||
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
Source0: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
||||||
Patch0: SDL2-2.0.3-cmake.patch
|
Patch0: SDL2-2.0.3-cmake.patch
|
||||||
Patch1: SDL2-2.0.5-soversion.patch
|
Patch1: SDL2-2.0.7-soversion.patch
|
||||||
Patch2: SDL2-2.0.5-ppc.patch
|
|
||||||
Patch3: SDL2-2.0.5-null-deref.patch
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
|
BuildRequires: wayland-doc
|
||||||
BuildRequires: nas-devel
|
BuildRequires: nas-devel
|
||||||
BuildRequires: pkgconfig(alsa)
|
BuildRequires: pkgconfig(alsa)
|
||||||
BuildRequires: pkgconfig(dbus-1)
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
|
BuildRequires: pkgconfig(egl)
|
||||||
BuildRequires: pkgconfig(gl)
|
BuildRequires: pkgconfig(gl)
|
||||||
BuildRequires: pkgconfig(glu)
|
BuildRequires: pkgconfig(glu)
|
||||||
BuildRequires: pkgconfig(libpulse)
|
BuildRequires: pkgconfig(libpulse)
|
||||||
BuildRequires: pkgconfig(libusb)
|
BuildRequires: pkgconfig(libusb)
|
||||||
BuildRequires: pkgconfig(udev)
|
BuildRequires: pkgconfig(udev)
|
||||||
|
BuildRequires: pkgconfig(wayland-client)
|
||||||
|
BuildRequires: pkgconfig(wayland-cursor)
|
||||||
|
BuildRequires: pkgconfig(wayland-egl)
|
||||||
|
BuildRequires: pkgconfig(wayland-protocols)
|
||||||
|
BuildRequires: pkgconfig(wayland-scanner)
|
||||||
BuildRequires: pkgconfig(xcursor)
|
BuildRequires: pkgconfig(xcursor)
|
||||||
BuildRequires: pkgconfig(xext)
|
BuildRequires: pkgconfig(xext)
|
||||||
BuildRequires: pkgconfig(xi)
|
BuildRequires: pkgconfig(xi)
|
||||||
BuildRequires: pkgconfig(xinerama)
|
BuildRequires: pkgconfig(xinerama)
|
||||||
|
BuildRequires: pkgconfig(xkbcommon)
|
||||||
BuildRequires: pkgconfig(xrandr)
|
BuildRequires: pkgconfig(xrandr)
|
||||||
BuildRequires: pkgconfig(xscrnsaver)
|
BuildRequires: pkgconfig(xscrnsaver)
|
||||||
BuildRequires: pkgconfig(xxf86vm)
|
BuildRequires: pkgconfig(xxf86vm)
|
||||||
|
@ -72,6 +78,7 @@ applications which will use %{name}.
|
||||||
%files -n %{devname}
|
%files -n %{devname}
|
||||||
%doc README.txt README-SDL.txt CREDITS.txt COPYING.txt BUGS.txt WhatsNew.txt
|
%doc README.txt README-SDL.txt CREDITS.txt COPYING.txt BUGS.txt WhatsNew.txt
|
||||||
%{_bindir}/sdl2-config
|
%{_bindir}/sdl2-config
|
||||||
|
%{_libdir}/cmake/SDL2/
|
||||||
%{_libdir}/pkgconfig/sdl2.pc
|
%{_libdir}/pkgconfig/sdl2.pc
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%dir %{_includedir}/SDL2
|
%dir %{_includedir}/SDL2
|
||||||
|
@ -85,6 +92,7 @@ applications which will use %{name}.
|
||||||
%apply_patches
|
%apply_patches
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%global optflags %{optflags} -mstackrealign
|
||||||
%cmake -DRPATH:BOOL=OFF
|
%cmake -DRPATH:BOOL=OFF
|
||||||
%make
|
%make
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue