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