[mingw-SDL] Added win64 support

Erik van Pienbroek epienbro at fedoraproject.org
Sat Apr 14 19:36:55 UTC 2012


commit 38f172edbfdf3645603e8d23b1f331d711fdb6cf
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sat Apr 14 21:36:37 2012 +0200

    Added win64 support
    
    - Added win64 support
    - Automatically generate debuginfo package
    - Use parallel make

 mingw-SDL.spec |   56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 49 insertions(+), 7 deletions(-)
---
diff --git a/mingw-SDL.spec b/mingw-SDL.spec
index 2f55999..d3b83b9 100644
--- a/mingw-SDL.spec
+++ b/mingw-SDL.spec
@@ -1,9 +1,8 @@
-%define __strip %{mingw32_strip}
-%define __objdump %{mingw32_objdump}
+%?mingw_package_header
 
 Name:           mingw-SDL
 Version:        1.2.13
-Release:        14%{?dist}
+Release:        15%{?dist}
 Summary:        MinGW Windows port of SDL cross-platform multimedia library
 
 License:        LGPLv2+
@@ -24,12 +23,18 @@ Patch26:        SDL-1.2.13-dynamic-pulse.patch
 Patch27:        SDL-1.2.13-pulse-rework.patch
 Patch28:        SDL-1.2.13-audiodriver.patch
 
-BuildRequires:  mingw32-filesystem
+BuildRequires:  mingw32-filesystem >= 95
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 BuildRequires:  mingw32-dlfcn
 BuildRequires:  mingw32-win-iconv
 
+BuildRequires:  mingw64-filesystem >= 95
+BuildRequires:  mingw64-gcc
+BuildRequires:  mingw64-binutils
+BuildRequires:  mingw64-dlfcn
+BuildRequires:  mingw64-win-iconv
+
 # Not required at the moment, but SDL does contain plenty of C++ code,
 # I just haven't worked out how to enable it.
 #BuildRequires:  mingw32-gcc-c++
@@ -40,12 +45,14 @@ BuildRequires:  mingw32-win-iconv
 #BuildRequires: nasm
 #%endif
 
+
 %description
 Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
 designed to provide fast access to the graphics frame buffer and audio
 device.
 
 
+# Win32
 %package -n mingw32-SDL
 Summary:        MinGW Windows port of SDL cross-platform multimedia library
 Requires:       pkgconfig
@@ -57,6 +64,21 @@ Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
 designed to provide fast access to the graphics frame buffer and audio
 device.
 
+# Win32
+%package -n mingw64-SDL
+Summary:        MinGW Windows port of SDL cross-platform multimedia library
+Requires:       pkgconfig
+# kraxel pointed out that the headers need <iconv.h>, hence:
+Requires:       mingw64-win-iconv
+
+%description -n mingw64-SDL
+Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
+designed to provide fast access to the graphics frame buffer and audio
+device.
+
+
+%?mingw_debug_package
+
 
 %prep
 %setup -q -n SDL-%{version}
@@ -72,7 +94,7 @@ device.
 
 
 %build
-%{mingw32_configure} \
+%mingw_configure \
   --disable-video-svga --disable-video-ggi --disable-video-aalib \
   --disable-debug \
   --enable-sdl-dlopen \
@@ -84,27 +106,31 @@ device.
   --disable-rpath \
   --disable-directx
 
-make
+%mingw_make %{?_smp_mflags}
 
 
 %install
-make DESTDIR=$RPM_BUILD_ROOT install
+%mingw_make DESTDIR=$RPM_BUILD_ROOT install
 
 # Remove static libraries but DON'T remove *.dll.a files.
 rm $RPM_BUILD_ROOT%{mingw32_libdir}/libSDL.a
+rm $RPM_BUILD_ROOT%{mingw64_libdir}/libSDL.a
 
 # Actually libSDLmain.a seems to be required.  It just contains
 # a single object file called SDL_win32_main.o.
 #rm $RPM_BUILD_ROOT%{mingw32_libdir}/libSDLmain.a
+#rm $RPM_BUILD_ROOT%{mingw64_libdir}/libSDLmain.a
 
 # Delete man pages since they duplicate what is already available
 # in base Fedora package.
 rm $RPM_BUILD_ROOT%{mingw32_mandir}/man3/*.3*
+rm $RPM_BUILD_ROOT%{mingw64_mandir}/man3/*.3*
 
 # Drop all .la files
 find $RPM_BUILD_ROOT -name "*.la" -delete
 
 
+# Win32
 %files -n mingw32-SDL
 %doc COPYING
 %{mingw32_bindir}/SDL.dll
@@ -115,8 +141,24 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
 %{mingw32_datadir}/aclocal/sdl.m4
 %{mingw32_includedir}/SDL
 
+# Win64
+%files -n mingw64-SDL
+%doc COPYING
+%{mingw64_bindir}/SDL.dll
+%{mingw64_bindir}/sdl-config
+%{mingw64_libdir}/libSDL.dll.a
+%{mingw64_libdir}/libSDLmain.a
+%{mingw64_libdir}/pkgconfig/sdl.pc
+%{mingw64_datadir}/aclocal/sdl.m4
+%{mingw64_includedir}/SDL
+
 
 %changelog
+* Sat Apr 14 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.2.13-15
+- Added win64 support
+- Automatically generate debuginfo package
+- Use parallel make
+
 * Fri Mar 09 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.2.13-14
 - Dropped .la files
 


More information about the scm-commits mailing list