From a97d9e87ebe7d6690f81fa7a1387ea442840985a33ea1a10ef16ba83cf89cde2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 12 Sep 2013 13:01:29 +0000 Subject: [PATCH 1/2] Accepting request 198650 from home:k0da:ppc - Fix undefined s on BigEndian platforms (bigendian_undefined_s.patch) OBS-URL: https://build.opensuse.org/request/show/198650 OBS-URL: https://build.opensuse.org/package/show/games/SDL2_image?expand=0&rev=8 --- SDL2_image.changes | 5 +++++ SDL2_image.spec | 2 ++ bigendian_undefined_s.patch | 12 ++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 bigendian_undefined_s.patch diff --git a/SDL2_image.changes b/SDL2_image.changes index ffd9b54..603ab6b 100644 --- a/SDL2_image.changes +++ b/SDL2_image.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 12 10:42:27 UTC 2013 - dvaleev@suse.com + +- Fix undefined s on BigEndian platforms (bigendian_undefined_s.patch) + ------------------------------------------------------------------- Tue Aug 13 12:04:26 UTC 2013 - jengelh@inai.de diff --git a/SDL2_image.spec b/SDL2_image.spec index c2b1903..9101ce5 100644 --- a/SDL2_image.spec +++ b/SDL2_image.spec @@ -28,6 +28,7 @@ Url: http://libsdl.org/projects/SDL_image/ #Hg-Clone: http://hg.libsdl.org/SDL_image/ Source: http://libsdl.org/projects/SDL_image/release/%name-%version.tar.gz Source2: baselibs.conf +Patch0: bigendian_undefined_s.patch BuildRequires: libSDL2-devel BuildRequires: libjpeg-devel BuildRequires: libtiff-devel @@ -65,6 +66,7 @@ formats. %prep %setup -q +%patch0 -p1 rm -rf external %build diff --git a/bigendian_undefined_s.patch b/bigendian_undefined_s.patch new file mode 100644 index 0000000..c06bae7 --- /dev/null +++ b/bigendian_undefined_s.patch @@ -0,0 +1,12 @@ +Index: SDL2_image-2.0.0/IMG_webp.c +=================================================================== +--- SDL2_image-2.0.0.orig/IMG_webp.c ++++ SDL2_image-2.0.0/IMG_webp.c +@@ -242,6 +242,7 @@ SDL_Surface *IMG_LoadWEBP_RW(SDL_RWops * + Bmask = 0x00FF0000; + Amask = (features.has_alpha) ? 0xFF000000 : 0; + #else ++ int s; + s = (features.has_alpha) ? 0 : 8; + Rmask = 0xFF000000 >> s; + Gmask = 0x00FF0000 >> s; From 5869c60b71086f66fae033f17dc5e9e6b13970b50befa34632ad90687371140a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 12 Sep 2013 13:04:55 +0000 Subject: [PATCH 2/2] Add metadata to patch OBS-URL: https://build.opensuse.org/package/show/games/SDL2_image?expand=0&rev=9 --- bigendian_undefined_s.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bigendian_undefined_s.patch b/bigendian_undefined_s.patch index c06bae7..5d82bde 100644 --- a/bigendian_undefined_s.patch +++ b/bigendian_undefined_s.patch @@ -1,3 +1,13 @@ +From: Dinar Valeev +Date: Thu, 12 Sep 2013 12:51:31 +0200 + +build: resolve compile abort on big-endian platforms + +s was not declared. + +Addition by jengelh: Make it unsigned, because that is the +only thing to make sense with the >> operator. + Index: SDL2_image-2.0.0/IMG_webp.c =================================================================== --- SDL2_image-2.0.0.orig/IMG_webp.c @@ -6,7 +16,7 @@ Index: SDL2_image-2.0.0/IMG_webp.c Bmask = 0x00FF0000; Amask = (features.has_alpha) ? 0xFF000000 : 0; #else -+ int s; ++ unsigned int s; s = (features.has_alpha) ? 0 : 8; Rmask = 0xFF000000 >> s; Gmask = 0x00FF0000 >> s;