]>
Commit | Line | Data |
---|---|---|
1 | %define realname SDL | |
2 | Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library - MinGW32 cross version | |
3 | Summary(pl.UTF-8): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów - wersja skrośna dla MinGW32 | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 1.2.15 | |
6 | Release: 3 | |
7 | License: LGPL v2.1+ | |
8 | Group: Libraries | |
9 | Source0: http://www.libsdl.org/release/%{realname}-%{version}.tar.gz | |
10 | # Source0-md5: 9d96df8417572a2afb781a7c4c811a85 | |
11 | Patch0: %{realname}-acfix.patch | |
12 | URL: http://www.libsdl.org/ | |
13 | BuildRequires: autoconf >= 2.59-9 | |
14 | BuildRequires: automake | |
15 | BuildRequires: crossmingw32-gcc | |
16 | BuildRequires: crossmingw32-gcc-c++ | |
17 | BuildRequires: crossmingw32-runtime | |
18 | BuildRequires: crossmingw32-w32api | |
19 | BuildRequires: crossmingw32-w32api-dx | |
20 | BuildRequires: libtool >= 2:2.0 | |
21 | BuildRequires: nasm | |
22 | BuildRequires: perl-modules | |
23 | BuildConflicts: crossmingw32-dx70 | |
24 | Requires: crossmingw32-runtime | |
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 | ||
32 | %define _sysprefix /usr | |
33 | %define _prefix %{_sysprefix}/%{target} | |
34 | %define _libdir %{_prefix}/lib | |
35 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
36 | %define _dlldir /usr/share/wine/windows/system | |
37 | %define __cc %{target}-gcc | |
38 | %define __cxx %{target}-g++ | |
39 | %define __pkgconfig_provides %{nil} | |
40 | ||
41 | %ifnarch %{ix86} | |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
43 | %define optflags -O2 | |
44 | %endif | |
45 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
46 | %define filterout_ld -Wl,-z,.* | |
47 | %define filterout_c -f[-a-z0-9=]* | |
48 | %define filterout_cxx -f[-a-z0-9=]* | |
49 | ||
50 | %description | |
51 | SDL (Simple DirectMedia Layer) is a library that allows you portable, | |
52 | low level access to a video framebuffer, audio output, mouse, and | |
53 | keyboard. It can support both windowed and DGA modes of XFree86, and | |
54 | it is designed to be portable - applications linked with SDL can also | |
55 | be built on Win32 and BeOS. | |
56 | ||
57 | This package contains the cross version for Win32. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | SDL (Simple DirectMedia Layer) jest biblioteką udostępniającą | |
61 | przenośny, niskopoziomowy dostęp do bufora ramki video, wyjścia audio, | |
62 | myszy oraz klawiatury. Może obsługiwać zarówno okienkowy tryb XFree86 | |
63 | jak i DGA. Konstruując ją miano na uwadze przenośność: aplikacje | |
64 | konsolidowane z SDL można również budować w systemach Win32 i BeOS. | |
65 | ||
66 | Ten pakiet zawiera wersję skrośną dla Win32. | |
67 | ||
68 | %description -l pt_BR.UTF-8 | |
69 | Esse é o Simple DirectMedia Layer, uma API genérica que dá acesso de | |
70 | baixo nível a áudio, teclado, mouse e vídeo em várias plataformas. | |
71 | ||
72 | Essa biblioteca é usada por alguns jogos. | |
73 | ||
74 | %package static | |
75 | Summary: Static SDL library (cross MinGW32 version) | |
76 | Summary(pl.UTF-8): Statyczna biblioteka SDL (wersja skrośna MinGW32) | |
77 | Group: Development/Libraries | |
78 | Requires: %{name} = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static SDL library (cross MinGW32 version). | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczna biblioteka SDL (wersja skrośna MinGW32). | |
85 | ||
86 | %package dll | |
87 | Summary: SDL - DLL library for Windows | |
88 | Summary(pl.UTF-8): SDL - biblioteka DLL dla Windows | |
89 | Group: Applications/Emulators | |
90 | ||
91 | %description dll | |
92 | SDL - DLL library for Windows. | |
93 | ||
94 | %description dll -l pl.UTF-8 | |
95 | SDL - biblioteka DLL dla Windows. | |
96 | ||
97 | %prep | |
98 | %setup -q -n %{realname}-%{version} | |
99 | %patch0 -p1 | |
100 | ||
101 | : > acinclude.m4 | |
102 | echo 'AC_DEFUN([AM_PATH_ESD],[$3])' >> acinclude.m4 | |
103 | ||
104 | %build | |
105 | %{__libtoolize} | |
106 | %{__aclocal} | |
107 | %{__autoconf} | |
108 | %configure \ | |
109 | --target=%{target} \ | |
110 | --host=%{target} \ | |
111 | --enable-nasm \ | |
112 | --disable-stdio-redirect | |
113 | ||
114 | %{__make} | |
115 | ||
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %{__make} install \ | |
120 | DESTDIR=$RPM_BUILD_ROOT | |
121 | ||
122 | install -d $RPM_BUILD_ROOT{%{_dlldir},%{_sysprefix}/bin} | |
123 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
124 | ln -s %{_bindir}/sdl-config $RPM_BUILD_ROOT%{_sysprefix}/bin/%{target}-sdl-config | |
125 | ||
126 | %if 0%{!?debug:1} | |
127 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
128 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
129 | %endif | |
130 | ||
131 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,man} | |
132 | ||
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %files | |
137 | %defattr(644,root,root,755) | |
138 | %doc BUGS CREDITS README README-SDL.txt TODO WhatsNew | |
139 | %attr(755,root,root) %{_sysprefix}/bin/%{target}-sdl-config | |
140 | %attr(755,root,root) %{_bindir}/sdl-config | |
141 | %{_libdir}/libSDL.dll.a | |
142 | %{_libdir}/libSDL.la | |
143 | %{_libdir}/libSDLmain.a | |
144 | %{_libdir}/libSDLmain.la | |
145 | %{_includedir}/SDL | |
146 | %{_pkgconfigdir}/sdl.pc | |
147 | ||
148 | %files static | |
149 | %defattr(644,root,root,755) | |
150 | %{_libdir}/libSDL.a | |
151 | ||
152 | %files dll | |
153 | %defattr(644,root,root,755) | |
154 | %{_dlldir}/libSDL-1-2-0.dll |