1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: MinGW Windows port of SDL cross-platform multimedia library
13 Group: Development/Libraries
14 URL: http://www.libsdl.org/
15 Source0: http://www.libsdl.org/release/SDL-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20 # Patches from native version.
21 Patch0: SDL-1.2.10-byteorder.patch
22 Patch17: SDL-1.2.13-libdir.patch
23 Patch21: SDL-1.2.12-multilib.patch
24 Patch23: SDL-1.2.11-dynamic-esd.patch
25 Patch24: SDL-1.2.12-x11dyn64.patch
26 Patch25: SDL-1.2.12-disable_yasm.patch
27 Patch26: SDL-1.2.13-dynamic-pulse.patch
28 Patch27: SDL-1.2.13-pulse-rework.patch
29 Patch28: SDL-1.2.13-audiodriver.patch
31 BuildRequires: mingw32-filesystem >= 40
32 BuildRequires: mingw32-gcc
33 BuildRequires: mingw32-binutils
34 BuildRequires: mingw32-dlfcn
35 BuildRequires: mingw32-iconv
39 # Not required at the moment, but SDL does contain plenty of C++ code,
40 # I just haven't worked out how to enable it.
41 #BuildRequires: mingw32-gcc-c++
43 # If we have nasm in the future, then this would enable future
44 # optimizations on x86-based architectures.
51 Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
52 designed to provide fast access to the graphics frame buffer and audio
57 %setup -q -n SDL-%{version}
58 %patch0 -p1 -b .byteorder
59 %patch17 -p1 -b .libdir
60 %patch21 -p1 -b .multilib
61 %patch23 -p1 -b .dynamic-esd
62 %patch24 -p1 -b .x11dyn64
63 %patch25 -p1 -b .disable_yasm
64 %patch26 -p1 -b .dynamic-pulse
65 %patch27 -p1 -b .pulse-rework
66 %patch28 -p1 -b .audiodriver
70 %{_mingw32_configure} \
71 --disable-video-svga --disable-video-ggi --disable-video-aalib \
75 --enable-arts-shared \
77 --enable-pulseaudio-shared \
85 rm -rf $RPM_BUILD_ROOT
86 make DESTDIR=$RPM_BUILD_ROOT install
88 # Remove static libraries but DON'T remove *.dll.a files.
89 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDL.a
91 # Actually libSDLmain.a seems to be required. It just contains
92 # a single object file called SDL_win32_main.o.
93 #rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDLmain.a
95 # Delete man pages since they duplicate what is already available
96 # in base Fedora package.
97 rm $RPM_BUILD_ROOT%{_mingw32_mandir}/man3/*.3*
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(-,root,root)
107 %{_mingw32_bindir}/SDL.dll
108 %{_mingw32_bindir}/sdl-config
109 %{_mingw32_libdir}/libSDL.dll.a
110 %{_mingw32_libdir}/libSDL.la
111 %{_mingw32_libdir}/libSDLmain.a
112 %{_mingw32_libdir}/pkgconfig/sdl.pc
113 %{_mingw32_datadir}/aclocal/sdl.m4
114 %{_mingw32_includedir}/SDL
118 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.13-3
119 - Verify we are still up to date with Fedora release.
120 - Include COPYING in documentation.
123 - No need to package the man pages, don't duplicate what's in the
124 base Fedora package already.
125 - Requires pkgconfig.
127 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.13-2
128 - Initial RPM release.