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