Moved these packages into Fedora.
[fedora-mingw.git] / SDL / mingw32-SDL.spec
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}
6
7 Name:           mingw32-SDL
8 Version:        1.2.13
9 Release:        4%{?dist}
10 Summary:        MinGW Windows port of SDL cross-platform multimedia library
11
12 License:        LGPLv2+
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)
17
18 BuildArch:      noarch
19
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
30
31 BuildRequires:  mingw32-filesystem >= 40
32 BuildRequires:  mingw32-gcc
33 BuildRequires:  mingw32-binutils
34 BuildRequires:  mingw32-dlfcn
35 BuildRequires:  mingw32-iconv
36
37 Requires:       pkgconfig
38
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++
42
43 # If we have nasm in the future, then this would enable future
44 # optimizations on x86-based architectures.
45 #%ifarch %{ix86}
46 #BuildRequires: nasm
47 #%endif
48
49
50 %description
51 Simple DirectMedia Layer (SDL) is a cross-platform multimedia library
52 designed to provide fast access to the graphics frame buffer and audio
53 device.
54
55
56 %prep
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
67
68
69 %build
70 %{_mingw32_configure} \
71   --disable-video-svga --disable-video-ggi --disable-video-aalib \
72   --disable-debug \
73   --enable-sdl-dlopen \
74   --enable-dlopen \
75   --enable-arts-shared \
76   --enable-esd-shared \
77   --enable-pulseaudio-shared \
78   --enable-alsa \
79   --disable-rpath
80
81 make
82
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 make DESTDIR=$RPM_BUILD_ROOT install
87
88 # Remove static libraries but DON'T remove *.dll.a files.
89 rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDL.a
90
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
94
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*
98
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103
104 %files
105 %defattr(-,root,root)
106 %doc COPYING
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
115
116
117 %changelog
118 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 1.2.13-4
119 - Verify we are still up to date with Fedora release.
120 - Include COPYING in documentation.
121 - Build with dlfcn.
122 - List all BRs.
123 - No need to package the man pages, don't duplicate what's in the
124   base Fedora package already.
125 - Requires pkgconfig.
126
127 * Fri Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.2.13-2
128 - Initial RPM release.