-#
-# Conditional build:
-# _without_alsa - without alsa support
-# _without_arts - without arts support
-# _without_esd - without esound support
-# _with_nas - with nas support
-#
%define realname SDL
-Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library
-Summary(es): Simple DirectMedia Layer
-Summary(pl): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów
-Summary(pt_BR): Simple DirectMedia Layer
-Summary(ru): Simple DirectMedia Layer
-Summary(uk): Simple DirectMedia Layer
-Summary(zh_CN): SDL (Simple DirectMedia Layer) Generic APIs - ÓÎÏ·/¶àýÌå¿â
+Summary: SDL (Simple DirectMedia Layer) - Game/Multimedia Library - Mingw32 cross version
+Summary(pl): SDL (Simple DirectMedia Layer) - Biblioteka do gier/multimediów - wersja skro¶na dla Mingw32
Name: crossmingw32-%{realname}
-Version: 1.2.6
-Release: 1
+Version: 1.2.8
+Release: 1.20040916.1
License: LGPL
Group: X11/Libraries
-Source0: http://www.libsdl.org/release/%{realname}-%{version}.tar.gz
-# Source0-md5: 9011f147f23ec535515291d0c9c6904c
+#Source0: http://www.libsdl.org/release/%{realname}-%{version}.tar.gz
+Source0: http://www.libsdl.org/cvs/SDL-1.2.tar.gz
+# Source0-md5: 77664f9f13794f83261f3fde7e4eecfc
Patch0: %{realname}-byteorder.patch
-Patch1: %{realname}-fixlibs.patch
Patch2: %{realname}-amfix.patch
Patch3: %{realname}-lpthread.patch
-Patch4: %{realname}-ac25x.patch
-Patch5: %{realname}-no_rpath_in_sdl-config.patch
-Patch6: %{realname}-noobjc.patch
-Patch7: %{realname}-am17.patch
-Patch8: %{realname}-lt15.patch
URL: http://www.libsdl.org/
-BuildRequires: OpenGL-devel
-BuildRequires: XFree86-devel >= 4.0.2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: crossmingw32-gcc
-BuildRequires: crossmingw32-dx70
+BuildRequires: crossmingw32-runtime
+BuildRequires: crossmingw32-w32api
+BuildRequires: crossmingw32-w32api-dx
BuildRequires: libtool >= 2:1.4d
+BuildConflicts: crossmingw32-dx70
%ifarch %{ix86}
BuildRequires: nasm
%endif
%define __cc %{target}-gcc
%define __cxx %{target}-g++
+%ifarch alpha sparc sparc64 sparcv9
+# alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
+%define optflags -O2
+%endif
+
%description
SDL (Simple DirectMedia Layer) is a library that allows you portable,
low level access to a video framebuffer, audio output, mouse, and
Essa biblioteca é usada por alguns jogos.
-%package devel
-Summary: SDL - Header files
-Summary(pl): SDL - Pliki nag³ówkowe
-Summary(pt_BR): Bibliotecas e arquivos de cabeçalho para aplicações SDL
-Summary(ru): æÁÊÌÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ SDL
-Summary(uk): æÁÊÌÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL
-Summary(zh_CN): SDL (Simple DirectMedia Layer) ¿ª·¢¿â
-Group: X11/Development/Libraries
-Requires: %{name} = %{version}
-Requires: XFree86-devel >= 4.0.2
-%ifnarch sparc sparc64
-%{!?_without_alsa:Requires: alsa-lib-devel}
-%endif
-%{!?_without_arts:Requires: arts-devel}
-%{!?_without_esd:Requires: esound-devel}
-%{?_with_nas:Requires: nas-devel}
-
-%description devel
-SDL - Header files.
-
-%description devel -l pl
-SDL - Pliki nag³ówkowe.
-
-%description devel -l pt_BR
-Esse pacote contém bibliotecas, arquivos de cabeçalho e outros
-recursos para o desenvolvimento de aplicativos com SDL.
-
-%description devel -l ru
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÆÁÊÌÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ,
-ÉÓÐÏÌØÚÕÀÝÉÈ SDL.
-
-%description devel -l uk
-ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÆÁÊÌÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ
-×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL.
-
-%package static
-Summary: SDL - static libraries
-Summary(pl): SDL - biblioteki statyczne
-Summary(pt_BR): Biblioteca estática para desenvolvimento de aplicações com a SDL
-Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ SDL
-Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂËÉ Ú ×ÉËÏÒÉÓÔÁÎÎÑÍ SDL
-Group: X11/Development/Libraries
-Requires: %{name}-devel = %{version}
-
-%description static
-SDL - static libraries.
-
-%description static -l pl
-SDL - biblioteki statyczne.
-
-%description static -l pt_BR
-Biblioteca estática para desenvolvimento de aplicações com a SDL.
+%package dll
+Summary: SDL - DLL library for Windows
+Summary(pl): SDL - biblioteka DLL dla Windows
+Group: Applications/Emulators
-%description static -l ru
-üÔÏÔ ÐÁËÅÔ ÓÏÄÅÒÖÉÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ,
-ÉÓÐÏÌØÚÕÀÝÉÈ SDL.
+%description dll
+SDL - DLL library for Windows.
-%description static -l uk
-ãÅÊ ÐÁËÅÔ Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ, ÝÏ
-×ÉËÏÒÉÓÔÏ×ÕÀÔØ SDL.
-
-%package examples
-Summary: SDL - example programs
-Summary(pl): SDL - programy przyk³adowe
-Group: X11/Development/Libraries
-Requires: %{name}-devel = %{version}
-
-%description examples
-SDL - example programs.
-
-%description examples -l pl
-SDL - przyk³adowe programy.
+%description dll -l pl
+SDL - biblioteka DLL dla Windows.
%prep
-%setup -q -n %{realname}-%{version}
+%setup -q -n %{realname}-1.2
%patch0 -p1
-%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-#%%patch6 -p1
-#%%patch7 -p1
-%patch8 -p1
-
-# get COPY_ARCH_SRC, remove the rest
-head -n 16 acinclude.m4 > acinclude.tmp
-mv -f acinclude.tmp acinclude.m4
-
-find . -type d -name CVS -print | xargs rm -rf {} \;
-
-
%build
CC=%{target}-gcc ; export CC
LDSHARED="%{target}-gcc -shared" ; export LDSHARED
TARGET="%{target}" ; export TARGET
-rm -f missing libtool
-%{__libtoolize}
-%{__aclocal}
-%{__automake}
-%{__autoconf}
+./autogen.sh
%configure \
--target=%{target} \
--host=%{target} \
%else
--disable-nasm \
%endif
- --prefix=%{arch}
+ --prefix=%{arch} \
+ --disable-stdio-redirect
%{__make}
-cat sdl-config | sed -e 's@-I/usr/include/SDL@-I/%{arch}/include/SDL@' > sdl.new
+cat sdl-config | sed -e 's@-I/usr/include/SDL@-I%{arch}/include/SDL@' \
+ -e 's@libdirs="-L/usr/lib "@libdirs="-L%{arch}/lib"@' > sdl.new
mv -f sdl.new sdl-config
+%if 0%{!?debug:1}
+%{target}-strip src/.libs/SDL.dll
+#%{target}-strip -g -R.comment -R.note src/.libs/*.a
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{arch}/{bin,include/SDL,lib}
install -d $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
install include/*.h $RPM_BUILD_ROOT%{arch}/include/SDL
install sdl-config $RPM_BUILD_ROOT%{arch}/bin/sdl-config
-install src/.libs/libSDL.a src/main/libSDLmain.a $RPM_BUILD_ROOT%{arch}/lib
+install src/.libs/libSDL{,.dll}.a src/main/libSDLmain.a $RPM_BUILD_ROOT%{arch}/lib
+install src/.libs/SDL.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
ln -s %{arch}/bin/sdl-config $RPM_BUILD_ROOT%{_bindir}/%{target}-sdl-config
%attr(755,root,root) %{arch}/bin/*
%{arch}/include/SDL
%{arch}/lib/*
+
+%files dll
+%defattr(644,root,root,755)
+%{_datadir}/wine/windows/system/*