[SDL2_image] - fix FTBFS on big endian arches
Dan Horák
sharkcz at fedoraproject.org
Tue Apr 15 08:35:35 UTC 2014
commit 35ccd3d784709295c91d88de2132aae5d7ba0eee
Author: Dan Hor?k <dan at danny.cz>
Date: Tue Apr 15 10:35:22 2014 +0200
- fix FTBFS on big endian arches
SDL2_image-2.0.0-big-endian.patch | 31 +++++++++++++++++++++++++++++++
SDL2_image.spec | 8 +++++++-
2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/SDL2_image-2.0.0-big-endian.patch b/SDL2_image-2.0.0-big-endian.patch
new file mode 100644
index 0000000..38ea40b
--- /dev/null
+++ b/SDL2_image-2.0.0-big-endian.patch
@@ -0,0 +1,31 @@
+
+# HG changeset patch
+# User Sam Lantinga <slouken at libsdl.org>
+# Date 1379184341 25200
+# Node ID f0b623bb55701868ccef98cee1b7334b49b6cebc
+# Parent 361ab0371a026036cdaff7711a99cb9edfaccb6c
+Fixed big endian compile error
+
+diff -r 361ab0371a02 -r f0b623bb5570 IMG_webp.c
+--- a/IMG_webp.c Fri Sep 06 23:56:56 2013 -0700
++++ b/IMG_webp.c Sat Sep 14 11:45:41 2013 -0700
+@@ -242,11 +242,13 @@
+ Bmask = 0x00FF0000;
+ Amask = (features.has_alpha) ? 0xFF000000 : 0;
+ #else
+- s = (features.has_alpha) ? 0 : 8;
+- Rmask = 0xFF000000 >> s;
+- Gmask = 0x00FF0000 >> s;
+- Bmask = 0x0000FF00 >> s;
+- Amask = 0x000000FF >> s;
++ {
++ int s = (features.has_alpha) ? 0 : 8;
++ Rmask = 0xFF000000 >> s;
++ Gmask = 0x00FF0000 >> s;
++ Bmask = 0x0000FF00 >> s;
++ Amask = 0x000000FF >> s;
++ }
+ #endif
+
+ surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
+
diff --git a/SDL2_image.spec b/SDL2_image.spec
index be0c3f9..4029555 100644
--- a/SDL2_image.spec
+++ b/SDL2_image.spec
@@ -1,12 +1,14 @@
Name: SDL2_image
Version: 2.0.0
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Image loading library for SDL
Group: System Environment/Libraries
License: LGPLv2+
URL: http://www.libsdl.org/projects/SDL_image/
Source0: http://www.libsdl.org/projects/SDL_image/release/%{name}-%{version}.tar.gz
+# http://hg.libsdl.org/SDL_image/rev/f0b623bb5570
+Patch0: SDL2_image-2.0.0-big-endian.patch
BuildRequires: SDL2-devel
BuildRequires: libjpeg-devel
@@ -34,6 +36,7 @@ developing applications that use %{name}.
%prep
%setup -q
+%patch0 -p1 -b big-endian
rm -rf external/
sed -i -e 's/\r//g' README.txt CHANGES.txt COPYING.txt
@@ -71,6 +74,9 @@ rm -f %{buildroot}%{_libdir}/*.la
%{_libdir}/pkgconfig/%{name}.pc
%changelog
+* Tue Apr 15 2014 Dan Horák <dan[at]danny.cz> - 2.0.0-5
+- fix FTBFS on big endian arches
+
* Fri Jan 03 2014 Kalev Lember <kalevlember at gmail.com> - 2.0.0-4
- Rebuilt for libwebp soname bump
More information about the scm-commits
mailing list