From 5a7abf59f2d4e3a98119428a3f3f71a9b198f8a9bbdd377e29dd32d502148e0e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 20 Oct 2016 15:36:47 +0000 Subject: [PATCH 1/2] Accepting request 436541 from home:alois:branches:games Update to 2.0.5 OBS-URL: https://build.opensuse.org/request/show/436541 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=46 --- SDL2-2.0.4.tar.gz | 3 --- SDL2-2.0.4.tar.gz.sig | Bin 72 -> 0 bytes SDL2-2.0.5.tar.gz | 3 +++ SDL2-2.0.5.tar.gz.sig | Bin 0 -> 72 bytes SDL2.changes | 57 ++++++++++++++++++++++++++++++++++++++++++ SDL2.spec | 2 +- 6 files changed, 61 insertions(+), 4 deletions(-) delete mode 100644 SDL2-2.0.4.tar.gz delete mode 100644 SDL2-2.0.4.tar.gz.sig create mode 100644 SDL2-2.0.5.tar.gz create mode 100644 SDL2-2.0.5.tar.gz.sig diff --git a/SDL2-2.0.4.tar.gz b/SDL2-2.0.4.tar.gz deleted file mode 100644 index 7da0980..0000000 --- a/SDL2-2.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b -size 4136230 diff --git a/SDL2-2.0.4.tar.gz.sig b/SDL2-2.0.4.tar.gz.sig deleted file mode 100644 index 08ffa7839535f1c00dee9ac9e7068bb00a9dc8f231ee9e1d72bc8fb6a44d5b36..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmV-O0Jr~$Mg#y60ssaD0#=AD`2Y$D5HO{acc*qc<`M4zpsC=>aBfLSvU{VxRU>Ba eunvMb9RQpQF+!tBGb&`41OP%$!^0p4V++!1QW Date: Sat, 29 Oct 2016 10:26:06 +0000 Subject: [PATCH 2/2] Accepting request 436959 from home:alois:branches:games Ref. (sr#436547), not sure if still necessary for Factory. OBS-URL: https://build.opensuse.org/request/show/436959 OBS-URL: https://build.opensuse.org/package/show/games/SDL2?expand=0&rev=47 --- SDL2-ppc64-declaration-after-statement.patch | 52 ++++++++++++++++++++ SDL2.changes | 7 +++ SDL2.spec | 6 +++ 3 files changed, 65 insertions(+) create mode 100644 SDL2-ppc64-declaration-after-statement.patch diff --git a/SDL2-ppc64-declaration-after-statement.patch b/SDL2-ppc64-declaration-after-statement.patch new file mode 100644 index 0000000..d9381bf --- /dev/null +++ b/SDL2-ppc64-declaration-after-statement.patch @@ -0,0 +1,52 @@ +# https://bugzilla.libsdl.org/show_bug.cgi?id=3466 +# commits 5184186d4366 and fbf9b0e3589a +# +diff -udpr SDL2-2.0.5.orig/src/video/SDL_blit_N.c SDL2-2.0.5/src/video/SDL_blit_N.c +--- SDL2-2.0.5.orig/src/video/SDL_blit_N.c 2016-10-20 05:56:26.000000000 +0200 ++++ SDL2-2.0.5/src/video/SDL_blit_N.c 2016-10-23 09:58:57.319897519 +0200 +@@ -118,12 +118,6 @@ calc_swizzle32(const SDL_PixelFormat * s + 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, +@@ -131,11 +125,20 @@ calc_swizzle32(const SDL_PixelFormat * s + 0x0C); + vector unsigned char vswiz; + vector unsigned int srcvec; ++ Uint32 rmask, gmask, bmask, amask; ++ ++ if (!srcfmt) { ++ srcfmt = &default_pixel_format; ++ } ++ if (!dstfmt) { ++ dstfmt = &default_pixel_format; ++ } ++ + #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; ++ 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 = +@@ -147,6 +150,7 @@ calc_swizzle32(const SDL_PixelFormat * s + 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); diff --git a/SDL2.changes b/SDL2.changes index 0c574c1..a96e491 100644 --- a/SDL2.changes +++ b/SDL2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Oct 23 08:00:21 UTC 2016 - aloisio@gmx.com + +- Backported commit 5184186d4366 and fbf9b0e3589a as + SDL2-ppc64-declaration-after-statement.patch to fix build + on ppc64/ppc64le + ------------------------------------------------------------------- Thu Oct 20 13:47:14 UTC 2016 - aloisio@gmx.com diff --git a/SDL2.spec b/SDL2.spec index f7089ed..9274e2e 100644 --- a/SDL2.spec +++ b/SDL2.spec @@ -30,6 +30,9 @@ Source: http://libsdl.org/release/%name-%version.tar.gz Source2: http://libsdl.org/release/%name-%version.tar.gz.sig Source3: %name.keyring Source4: baselibs.conf +# PATCH-FIX-UPSTREAM SDL2-declaration-after-statement.patch +# backported to fix build on Factory/ppc64, cf. https://bugzilla.libsdl.org/show_bug.cgi?id=3466 +Patch0: %{name}-ppc64-declaration-after-statement.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake BuildRequires: dos2unix @@ -104,6 +107,9 @@ library. %prep %setup -q +%ifarch ppc64 ppc64le +%patch0 -p1 +%endif dos2unix WhatsNew.txt dos2unix TODO.txt dos2unix BUGS.txt