[mingw-SDL_image: 2/13] Initial import

Kalev Lember kalev at fedoraproject.org
Wed Mar 7 17:22:59 UTC 2012


commit a80eea9e65d345be29499a9be5a398d42166bd57
Author: Stefan <stefan at laptop.(none)>
Date:   Tue Nov 9 11:06:30 2010 +0100

    Initial import

 .gitignore                               |    1 +
 mingw32-SDL_image-fix-jpeg-boolean.patch |   54 +++++++++++++++
 mingw32-SDL_image.spec                   |  106 ++++++++++++++++++++++++++++++
 sources                                  |    1 +
 4 files changed, 162 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b4794ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/SDL_image-1.2.10.tar.gz
diff --git a/mingw32-SDL_image-fix-jpeg-boolean.patch b/mingw32-SDL_image-fix-jpeg-boolean.patch
new file mode 100644
index 0000000..169eff0
--- /dev/null
+++ b/mingw32-SDL_image-fix-jpeg-boolean.patch
@@ -0,0 +1,54 @@
+diff --git a/IMG_jpg.c b/IMG_jpg.c
+index b0160be..4c49b65 100644
+--- a/IMG_jpg.c
++++ b/IMG_jpg.c
+@@ -46,11 +46,11 @@ static struct {
+ 	void (*jpeg_calc_output_dimensions) (j_decompress_ptr cinfo);
+ 	void (*jpeg_CreateDecompress) (j_decompress_ptr cinfo, int version, size_t structsize);
+ 	void (*jpeg_destroy_decompress) (j_decompress_ptr cinfo);
+-	boolean (*jpeg_finish_decompress) (j_decompress_ptr cinfo);
+-	int (*jpeg_read_header) (j_decompress_ptr cinfo, boolean require_image);
++	jpeg_boolean (*jpeg_finish_decompress) (j_decompress_ptr cinfo);
++	int (*jpeg_read_header) (j_decompress_ptr cinfo, jpeg_boolean require_image);
+ 	JDIMENSION (*jpeg_read_scanlines) (j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines);
+-	boolean (*jpeg_resync_to_restart) (j_decompress_ptr cinfo, int desired);
+-	boolean (*jpeg_start_decompress) (j_decompress_ptr cinfo);
++	jpeg_boolean (*jpeg_resync_to_restart) (j_decompress_ptr cinfo, int desired);
++	jpeg_boolean (*jpeg_start_decompress) (j_decompress_ptr cinfo);
+ 	struct jpeg_error_mgr * (*jpeg_std_error) (struct jpeg_error_mgr * err);
+ } lib;
+ 
+@@ -84,14 +84,14 @@ int IMG_InitJPG()
+ 			return -1;
+ 		}
+ 		lib.jpeg_finish_decompress = 
+-			(boolean (*) (j_decompress_ptr))
++			(jpeg_boolean (*) (j_decompress_ptr))
+ 			SDL_LoadFunction(lib.handle, "jpeg_finish_decompress");
+ 		if ( lib.jpeg_finish_decompress == NULL ) {
+ 			SDL_UnloadObject(lib.handle);
+ 			return -1;
+ 		}
+ 		lib.jpeg_read_header = 
+-			(int (*) (j_decompress_ptr, boolean))
++			(int (*) (j_decompress_ptr, jpeg_boolean))
+ 			SDL_LoadFunction(lib.handle, "jpeg_read_header");
+ 		if ( lib.jpeg_read_header == NULL ) {
+ 			SDL_UnloadObject(lib.handle);
+@@ -105,14 +105,14 @@ int IMG_InitJPG()
+ 			return -1;
+ 		}
+ 		lib.jpeg_resync_to_restart = 
+-			(boolean (*) (j_decompress_ptr, int))
++			(jpeg_boolean (*) (j_decompress_ptr, int))
+ 			SDL_LoadFunction(lib.handle, "jpeg_resync_to_restart");
+ 		if ( lib.jpeg_resync_to_restart == NULL ) {
+ 			SDL_UnloadObject(lib.handle);
+ 			return -1;
+ 		}
+ 		lib.jpeg_start_decompress = 
+-			(boolean (*) (j_decompress_ptr))
++			(jpeg_boolean (*) (j_decompress_ptr))
+ 			SDL_LoadFunction(lib.handle, "jpeg_start_decompress");
+ 		if ( lib.jpeg_start_decompress == NULL ) {
+ 			SDL_UnloadObject(lib.handle);
diff --git a/mingw32-SDL_image.spec b/mingw32-SDL_image.spec
new file mode 100644
index 0000000..d60b62c
--- /dev/null
+++ b/mingw32-SDL_image.spec
@@ -0,0 +1,106 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+%define __debug_install_post %{_mingw32_debug_install_post}
+
+
+Name:           mingw32-SDL_image
+Version:        1.2.10
+Release:        1%{?dist}
+Summary:        MinGW Windows port of the Image loading library for SDL
+
+License:        LGPLv2+
+Group:          Development/Libraries
+URL:            http://www.libsdl.org/projects/SDL_image/
+Source0:        http://www.libsdl.org/projects/SDL_image/release/SDL_image-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildArch:      noarch
+
+# Mingw specific patches:
+Patch100:       mingw32-SDL_image-fix-jpeg-boolean.patch
+
+BuildRequires:  mingw32-filesystem >= 49
+BuildRequires:  mingw32-gcc
+BuildRequires:  mingw32-binutils
+BuildRequires:  mingw32-dlfcn
+BuildRequires:  mingw32-iconv
+BuildRequires:  mingw32-SDL
+BuildRequires:  mingw32-libpng
+BuildRequires:  mingw32-libjpeg
+BuildRequires:  mingw32-libtiff
+
+Requires:       pkgconfig
+
+%description
+Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
+designed to provide fast access to the graphics frame buffer and audio
+device.  This package contains a simple library for loading images of
+various formats (BMP, TIF, JPEG, PNG) as SDL surfaces.
+
+%{_mingw32_description}
+
+%{?_mingw32_debug_package}
+
+%prep
+%setup -q -n SDL_image-%{version}
+%patch100 -p1
+
+%build
+# the --disabled-*-shared lines below stops SDL_image from loading those
+# libraries at link time. Instead they are loaded when needed.
+%{_mingw32_configure} \
+    --disable-jpg-shared \
+    --disable-png-shared \
+    --disable-tif-shared \
+    --disable-static
+#    --disable-dependency-tracking \
+
+make %{?smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# silence rpmlint:
+iconv --from=ISO-8859-1 --to=UTF-8 CHANGES > CHANGES.new && \
+touch -r CHANGES CHANGES.new && \
+mv CHANGES.new CHANGES
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%doc README CHANGES COPYING
+%{_mingw32_bindir}/SDL_image.dll
+%{_mingw32_libdir}/libSDL_image.dll.a
+%{_mingw32_libdir}/pkgconfig/SDL_image.pc
+%{_mingw32_libdir}/libSDL_image.la
+%{_mingw32_includedir}/SDL
+
+%changelog
+* Mon Sep 27 2010 Stefan Riemens <fgfs.stefan at gmail.com> - 1.2.10-1
+- Include la files
+- Fix debuginfo package generation
+
+* Sat Sep 25 2010 Stefan Riemens <fgfs.stefan at gmail.com> - 1.2.10-0
+- Update to new upstream release
+
+* Wed Nov 25 2009 Stefan Riemens <fgfs.stefan at gmail.com> - 1.2.7-1
+- Remove explicit Requires:
+- Add patch for the mingw32-jpeg boolean issue
+- Update to 1.2.7 to stay in sync with the native package
+- Enable parallel make
+- Autogenerate debuginfo subpackage
+- Fix non-utf-8 file
+
+* Thu Nov 11 2009 Jason Woofenden <jason at jasonwoof.com> - 1.2.6-2
+- use macro global instead of define in this spec file
+- added libtiff support
+- updated description so it lists the correct supported image formats
+
+* Thu Jun 18 2009 Jason Woofenden <jason at jasonwoof.com> - 1.2.6-1
+- Initial RPM release.
diff --git a/sources b/sources
index e69de29..d074b2f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6c06584b31559e2b59f2b982d0d1f628  SDL_image-1.2.10.tar.gz


More information about the scm-commits mailing list