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