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