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