1 %define realname SDL_image
2 Summary: Simple DirectMedia Layer - Sample Image Loading Library - Mingw32 cross version
3 Summary(pl): Przyk³adowa biblioteka do ³adowania obrazków - wersja skro¶na dla Mingw32
4 Name: crossmingw32-%{realname}
9 Source0: http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz
10 # Source0-md5: cd006109a73bf7dcc93e1c3ed15ee782
11 URL: http://www.libsdl.org/projects/SDL_image/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRequires: crossmingw32-SDL
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-libjpeg
17 BuildRequires: crossmingw32-libpng
18 BuildRequires: crossmingw32-w32api
19 BuildRequires: crossmingw32-zlib
20 BuildRequires: libtool
21 Requires: crossmingw32-SDL
22 Requires: crossmingw32-runtime
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define no_install_post_strip 1
27 %define target i386-mingw32
28 %define target_platform i386-pc-mingw32
29 %define arch %{_prefix}/%{target}
30 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
31 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
33 %define __cc %{target}-gcc
34 %define __cxx %{target}-g++
36 %ifarch alpha sparc sparc64 sparcv9
41 This is a simple library to load images of various formats as SDL
42 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
46 Jest to prosta biblioteka s³u¿±ca do ³adowania ró¿nego formatu
47 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obs³uguje
48 nastêpuj±ce formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
51 Summary: %{realname} - DLL library for Windows
52 Summary(pl): %{realname} - biblioteka DLL dla Windows
53 Group: Applications/Emulators
56 %{realname} - DLL library for Windows.
58 %description dll -l pl
59 %{realname} - biblioteka DLL dla Windows.
62 %setup -q -n %{realname}-%{version}
65 CC=%{target}-gcc ; export CC
66 CXX=%{target}-g++ ; export CXX
67 LD=%{target}-ld ; export LD
68 AR=%{target}-ar ; export AR
69 AS=%{target}-as ; export AS
70 CROSS_COMPILE=1 ; export CROSS_COMPILE
71 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
72 RANLIB=%{target}-ranlib ; export RANLIB
73 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
74 TARGET="%{target}" ; export TARGET
81 # no sdl test, because it requires configured wine to work
86 --with-sdl-prefix=%{arch} \
96 %{__make} libSDL_image.la
98 %{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg
100 cp -f .libs/libSDL_image.a .
103 %{target}-strip -R.comment -R.note *.dll
104 %{target}-strip -g -R.comment -R.note *.a
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib}
110 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
112 install *.a $RPM_BUILD_ROOT%{arch}/lib
113 install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL
114 install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
117 rm -rf $RPM_BUILD_ROOT
120 %defattr(644,root,root,755)
121 %{arch}/include/SDL/*
125 %defattr(644,root,root,755)
126 %{_datadir}/wine/windows/system/*.dll