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