1 %define realname SDL_image
2 Summary: Simple DirectMedia Layer - Sample Image Loading Library - MinGW32 cross version
3 Summary(pl.UTF-8): 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: a0f9098ebe5400f0bdc9b62e60797ecb
11 URL: http://www.libsdl.org/projects/SDL_image/
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRequires: crossmingw32-SDL >= 1.2.10
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-libjpeg >= 7
17 BuildRequires: crossmingw32-libpng >= 1.5.0
18 BuildRequires: crossmingw32-libtiff >= 4
19 BuildRequires: crossmingw32-libwebp >= 0.1.3
20 BuildRequires: crossmingw32-w32api
21 BuildRequires: libtool >= 2:2.0
22 BuildRequires: pkgconfig >= 1:0.9.0
23 Requires: crossmingw32-SDL >= 1.2.10
24 Requires: crossmingw32-runtime
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define no_install_post_strip 1
29 %define target i386-mingw32
30 %define target_platform i386-pc-mingw32
32 %define _sysprefix /usr
33 %define _prefix %{_sysprefix}/%{target}
34 %define _libdir %{_prefix}/lib
35 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
36 %define _dlldir /usr/share/wine/windows/system
37 %define __cc %{target}-gcc
38 %define __cxx %{target}-g++
39 %define __pkgconfig_provides %{nil}
42 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
45 # -z options are invalid for mingw linker
46 %define filterout_ld -Wl,-z,.*
49 This is a simple library to load images of various formats as SDL
50 surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX,
51 PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats.
53 This package contains the cross version for Win32.
55 %description -l pl.UTF-8
56 Jest to prosta biblioteka służąca do ładowania różnego formatu
57 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
58 następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM),
59 TGA, TIFF, WebP, XCF oraz XPM.
61 Ten pakiet zawiera wersję skrośną dla Win32.
64 Summary: Static SDL_image library (cross MinGW32 version)
65 Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna MinGW32)
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Static SDL_image library (cross MinGW32 version).
72 %description static -l pl.UTF-8
73 Statyczna biblioteka SDL_image (wersja skrośna MinGW32).
76 Summary: SDL_image - DLL library for Windows
77 Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows
78 Group: Applications/Emulators
79 Requires: crossmingw32-SDL-dll >= 1.2.10
83 SDL_image - DLL library for Windows.
85 %description dll -l pl.UTF-8
86 SDL_image - biblioteka DLL dla Windows.
89 %setup -q -n %{realname}-%{version}
92 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
97 # no sdl test, because it requires configured wine to work
101 --with-sdl-prefix=%{_prefix} \
104 # LIBS hack for libtool not detecting libraries without .la files
106 LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')"
109 rm -rf $RPM_BUILD_ROOT
112 DESTDIR=$RPM_BUILD_ROOT
114 install -d $RPM_BUILD_ROOT%{_dlldir}
115 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
118 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
119 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
123 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
128 %{_libdir}/libSDL_image.dll.a
129 %{_libdir}/libSDL_image.la
130 %{_includedir}/SDL/SDL_image.h
131 %{_pkgconfigdir}/SDL_image.pc
134 %defattr(644,root,root,755)
135 %{_libdir}/libSDL_image.a
138 %defattr(644,root,root,755)
139 %{_dlldir}/libSDL_image-*.dll