]>
Commit | Line | Data |
---|---|---|
9e7e30d2 | 1 | %define realname SDL |
f23ff117 | 2 | Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library - Mingw32 cross version |
1b084377 | 3 | Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów - wersja skrośna dla Mingw32 |
9e7e30d2 | 4 | Name: crossmingw32-%{realname} |
2a6854cf | 5 | Version: 1.2.11 |
5ea84172 | 6 | Release: 1 |
9e7e30d2 | 7 | License: LGPL |
cfa7fe44 | 8 | Group: Libraries |
b53f7a3a | 9 | Source0: http://www.libsdl.org/release/%{realname}-%{version}.tar.gz |
2a6854cf | 10 | # Source0-md5: 418b42956b7cd103bfab1b9077ccc149 |
cfa7fe44 JB |
11 | Patch0: %{realname}-mmx-constraints.patch |
12 | Patch1: %{realname}-acfix.patch | |
9e7e30d2 | 13 | URL: http://www.libsdl.org/ |
9e7e30d2 | 14 | BuildRequires: autoconf |
15 | BuildRequires: automake | |
16 | BuildRequires: crossmingw32-gcc | |
e34dc44c | 17 | BuildRequires: crossmingw32-runtime |
ee573ed1 | 18 | BuildRequires: crossmingw32-w32api |
8b1b6f3a | 19 | BuildRequires: crossmingw32-w32api-dx |
9e7e30d2 | 20 | BuildRequires: libtool >= 2:1.4d |
9e7e30d2 | 21 | BuildRequires: nasm |
9e7e30d2 | 22 | BuildRequires: perl-modules |
5ea84172 JB |
23 | BuildConflicts: crossmingw32-dx70 |
24 | Requires: crossmingw32-runtime | |
9e7e30d2 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %define no_install_post_strip 1 | |
28 | ||
29 | %define target i386-mingw32 | |
30 | %define target_platform i386-pc-mingw32 | |
31 | %define arch %{_prefix}/%{target} | |
32 | %define gccarch %{_prefix}/lib/gcc-lib/%{target} | |
33 | %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version} | |
34 | ||
35 | %define __cc %{target}-gcc | |
36 | %define __cxx %{target}-g++ | |
37 | ||
24a16a4a JB |
38 | %ifarch alpha sparc sparc64 sparcv9 |
39 | # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc | |
40 | %define optflags -O2 | |
41 | %endif | |
42 | ||
9e7e30d2 | 43 | %description |
44 | SDL (Simple DirectMedia Layer) is a library that allows you portable, | |
45 | low level access to a video framebuffer, audio output, mouse, and | |
46 | keyboard. It can support both windowed and DGA modes of XFree86, and | |
47 | it is designed to be portable - applications linked with SDL can also | |
48 | be built on Win32 and BeOS. | |
49 | ||
1b084377 JR |
50 | %description -l pl.UTF-8 |
51 | SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą | |
52 | przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio, | |
53 | myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86 | |
54 | jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje | |
55 | konsolidowane z SDL można również budować w systemach Win32 i BeOS. | |
9e7e30d2 | 56 | |
1b084377 JR |
57 | %description -l pt_BR.UTF-8 |
58 | Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de | |
59 | baixo nível a áudio, teclado, mouse e vídeo em várias plataformas. | |
9e7e30d2 | 60 | |
1b084377 | 61 | Essa biblioteca é usada por alguns jogos. |
9e7e30d2 | 62 | |
8b1b6f3a | 63 | %package dll |
64 | Summary: SDL - DLL library for Windows | |
1b084377 | 65 | Summary(pl.UTF-8): SDL - biblioteka DLL dla Windows |
8b1b6f3a | 66 | Group: Applications/Emulators |
67 | ||
68 | %description dll | |
69 | SDL - DLL library for Windows. | |
70 | ||
1b084377 | 71 | %description dll -l pl.UTF-8 |
8b1b6f3a | 72 | SDL - biblioteka DLL dla Windows. |
9e7e30d2 | 73 | |
74 | %prep | |
b53f7a3a | 75 | %setup -q -n %{realname}-%{version} |
9e7e30d2 | 76 | %patch0 -p1 |
cfa7fe44 | 77 | %patch1 -p1 |
9e7e30d2 | 78 | |
79 | %build | |
80 | CC=%{target}-gcc ; export CC | |
81 | CXX=%{target}-g++ ; export CXX | |
82 | LD=%{target}-ld ; export LD | |
83 | AR=%{target}-ar ; export AR | |
84 | AS=%{target}-as ; export AS | |
85 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
86 | CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS | |
87 | RANLIB=%{target}-ranlib ; export RANLIB | |
88 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
89 | TARGET="%{target}" ; export TARGET | |
90 | ||
ee573ed1 | 91 | ./autogen.sh |
9e7e30d2 | 92 | %configure \ |
93 | --target=%{target} \ | |
94 | --host=%{target} \ | |
95 | --build=i386-linux \ | |
96 | %ifarch %{ix86} | |
97 | --enable-nasm \ | |
98 | %else | |
99 | --disable-nasm \ | |
100 | %endif | |
8b1b6f3a | 101 | --prefix=%{arch} \ |
102 | --disable-stdio-redirect | |
9e7e30d2 | 103 | |
104 | %{__make} | |
105 | ||
ee573ed1 | 106 | cat sdl-config | sed -e 's@-I/usr/include/SDL@-I%{arch}/include/SDL@' \ |
cfa7fe44 | 107 | -e 's@ -L/usr/lib @ -L%{arch}/lib @' > sdl.new |
9e7e30d2 | 108 | mv -f sdl.new sdl-config |
109 | ||
31ba7073 | 110 | %if 0%{!?debug:1} |
cfa7fe44 JB |
111 | %{target}-strip build/.libs/SDL.dll |
112 | #%{target}-strip -g -R.comment -R.note build/.libs/*.a | |
31ba7073 | 113 | %endif |
8b1b6f3a | 114 | |
9e7e30d2 | 115 | %install |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | install -d $RPM_BUILD_ROOT%{arch}/{bin,include/SDL,lib} | |
118 | install -d $RPM_BUILD_ROOT%{_bindir} | |
8b1b6f3a | 119 | install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system |
9e7e30d2 | 120 | |
121 | install include/*.h $RPM_BUILD_ROOT%{arch}/include/SDL | |
122 | install sdl-config $RPM_BUILD_ROOT%{arch}/bin/sdl-config | |
cfa7fe44 JB |
123 | install build/.libs/libSDL{,.dll}.a build/libSDLmain.a $RPM_BUILD_ROOT%{arch}/lib |
124 | install build/.libs/SDL.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
9e7e30d2 | 125 | |
126 | ln -s %{arch}/bin/sdl-config $RPM_BUILD_ROOT%{_bindir}/%{target}-sdl-config | |
127 | ||
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %files | |
132 | %defattr(644,root,root,755) | |
133 | %attr(755,root,root) %{_bindir}/* | |
134 | %attr(755,root,root) %{arch}/bin/* | |
135 | %{arch}/include/SDL | |
136 | %{arch}/lib/* | |
8b1b6f3a | 137 | |
138 | %files dll | |
139 | %defattr(644,root,root,755) | |
140 | %{_datadir}/wine/windows/system/* |