]>
Commit | Line | Data |
---|---|---|
2b9321d8 | 1 | %define realname SDL_image |
2 | Summary: Simple DirectMedia Layer - Sample Image Loading Library - Mingw32 cross version | |
362e9cb0 | 3 | Summary(pl.UTF-8): Przykładowa biblioteka do ładowania obrazków - wersja skrośna dla Mingw32 |
2b9321d8 | 4 | Name: crossmingw32-%{realname} |
648ec0b1 | 5 | Version: 1.2.5 |
10fe1d4b | 6 | Release: 1 |
2b9321d8 | 7 | License: LGPL |
8 | Group: Libraries | |
9 | Source0: http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz | |
648ec0b1 | 10 | # Source0-md5: cd006109a73bf7dcc93e1c3ed15ee782 |
2b9321d8 | 11 | URL: http://www.libsdl.org/projects/SDL_image/ |
12 | BuildRequires: autoconf | |
13 | BuildRequires: automake | |
37e61a0a | 14 | BuildRequires: crossmingw32-SDL |
2b9321d8 | 15 | BuildRequires: crossmingw32-gcc |
16 | BuildRequires: crossmingw32-libjpeg | |
17 | BuildRequires: crossmingw32-libpng | |
2b9321d8 | 18 | BuildRequires: crossmingw32-w32api |
19 | BuildRequires: crossmingw32-zlib | |
20 | BuildRequires: libtool | |
37e61a0a JB |
21 | Requires: crossmingw32-SDL |
22 | Requires: crossmingw32-runtime | |
2b9321d8 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %define no_install_post_strip 1 | |
26 | ||
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} | |
32 | ||
33 | %define __cc %{target}-gcc | |
34 | %define __cxx %{target}-g++ | |
35 | ||
dcf46c3e | 36 | %ifarch alpha sparc sparc64 sparcv9 |
37 | %define optflags -O2 | |
38 | %endif | |
39 | ||
2b9321d8 | 40 | %description |
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, | |
43 | and PNG formats. | |
44 | ||
359a03f1 JR |
45 | %description -l pl.UTF-8 |
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. | |
2b9321d8 | 49 | |
50 | %package dll | |
51 | Summary: %{realname} - DLL library for Windows | |
362e9cb0 | 52 | Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows |
2b9321d8 | 53 | Group: Applications/Emulators |
54 | ||
55 | %description dll | |
56 | %{realname} - DLL library for Windows. | |
57 | ||
359a03f1 | 58 | %description dll -l pl.UTF-8 |
2b9321d8 | 59 | %{realname} - biblioteka DLL dla Windows. |
60 | ||
61 | %prep | |
62 | %setup -q -n %{realname}-%{version} | |
2b9321d8 | 63 | |
093880c3 JB |
64 | rm -f acinclude.m4 |
65 | ||
2b9321d8 | 66 | %build |
67 | CC=%{target}-gcc ; export CC | |
68 | CXX=%{target}-g++ ; export CXX | |
69 | LD=%{target}-ld ; export LD | |
70 | AR=%{target}-ar ; export AR | |
71 | AS=%{target}-as ; export AS | |
72 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
73 | CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS | |
74 | RANLIB=%{target}-ranlib ; export RANLIB | |
75 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
76 | TARGET="%{target}" ; export TARGET | |
77 | ||
2b9321d8 | 78 | %{__libtoolize} |
79 | %{__aclocal} | |
80 | %{__autoconf} | |
81 | %{__automake} | |
82 | # no sdl test, because it requires configured wine to work | |
83 | %configure \ | |
648ec0b1 | 84 | png_lib=png.dll \ |
076dc26b | 85 | --host=%{_host} \ |
86 | --target=%{target} \ | |
2b9321d8 | 87 | --with-sdl-prefix=%{arch} \ |
88 | --disable-sdltest \ | |
89 | --enable-bmp \ | |
90 | --enable-gif \ | |
91 | --enable-jpg \ | |
92 | --enable-pcx \ | |
93 | --enable-png \ | |
94 | --enable-tga \ | |
95 | --disable-shared | |
96 | ||
a9cd7821 | 97 | %{__make} libSDL_image.la |
2b9321d8 | 98 | |
99 | %{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg | |
100 | ||
101 | cp -f .libs/libSDL_image.a . | |
102 | ||
103 | %if 0%{!?debug:1} | |
104 | %{target}-strip -R.comment -R.note *.dll | |
105 | %{target}-strip -g -R.comment -R.note *.a | |
106 | %endif | |
107 | ||
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib} | |
111 | install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
112 | ||
113 | install *.a $RPM_BUILD_ROOT%{arch}/lib | |
114 | install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL | |
115 | install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
116 | ||
117 | %clean | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %files | |
121 | %defattr(644,root,root,755) | |
122 | %{arch}/include/SDL/* | |
123 | %{arch}/lib/* | |
124 | ||
125 | %files dll | |
126 | %defattr(644,root,root,755) | |
a3b45ced | 127 | %{_datadir}/wine/windows/system/*.dll |