]>
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} |
d18c8144 | 5 | Version: 1.2.6 |
10fe1d4b | 6 | Release: 1 |
d18c8144 | 7 | License: LGPL v2.1+ |
2b9321d8 | 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 | |
d18c8144 | 14 | BuildRequires: crossmingw32-SDL >= 1.2.10 |
2b9321d8 | 15 | BuildRequires: crossmingw32-gcc |
d18c8144 JB |
16 | BuildRequires: crossmingw32-libjpeg >= 6b |
17 | BuildRequires: crossmingw32-libpng >= 1.2.0 | |
2b9321d8 | 18 | BuildRequires: crossmingw32-w32api |
19 | BuildRequires: crossmingw32-zlib | |
20 | BuildRequires: libtool | |
d18c8144 | 21 | Requires: crossmingw32-SDL >= 1.2.10 |
37e61a0a | 22 | Requires: crossmingw32-runtime |
2b9321d8 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %define no_install_post_strip 1 | |
26 | ||
d18c8144 JB |
27 | %define target i386-mingw32 |
28 | %define target_platform i386-pc-mingw32 | |
2b9321d8 | 29 | |
d18c8144 JB |
30 | %define _sysprefix /usr |
31 | %define _prefix %{_sysprefix}/%{target} | |
32 | %define _dlldir /usr/share/wine/windows/system | |
33 | %define __cc %{target}-gcc | |
34 | %define __cxx %{target}-g++ | |
2b9321d8 | 35 | |
dcf46c3e | 36 | %ifarch alpha sparc sparc64 sparcv9 |
d18c8144 | 37 | # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc |
dcf46c3e | 38 | %define optflags -O2 |
39 | %endif | |
40 | ||
2b9321d8 | 41 | %description |
42 | This is a simple library to load images of various formats as SDL | |
43 | surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG, | |
44 | and PNG formats. | |
45 | ||
d18c8144 JB |
46 | This package contains the cross version for Win32. |
47 | ||
359a03f1 JR |
48 | %description -l pl.UTF-8 |
49 | Jest to prosta biblioteka służąca do ładowania różnego formatu | |
50 | obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje | |
51 | następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG. | |
2b9321d8 | 52 | |
d18c8144 JB |
53 | Ten pakiet zawiera wersję skrośną dla Win32. |
54 | ||
55 | %package static | |
56 | Summary: Static SDL_image library (cross mingw32 version) | |
57 | Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna mingw32) | |
58 | Group: Development/Libraries | |
59 | Requires: %{name} = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static SDL_image library (cross mingw32 version). | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka SDL_image (wersja skrośna mingw32). | |
66 | ||
2b9321d8 | 67 | %package dll |
d18c8144 JB |
68 | Summary: SDL_image - DLL library for Windows |
69 | Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows | |
2b9321d8 | 70 | Group: Applications/Emulators |
d18c8144 JB |
71 | Requires: crossmingw32-SDL-dll >= 1.2.10 |
72 | Requires: wine | |
2b9321d8 | 73 | |
74 | %description dll | |
d18c8144 | 75 | SDL_image - DLL library for Windows. |
2b9321d8 | 76 | |
359a03f1 | 77 | %description dll -l pl.UTF-8 |
d18c8144 | 78 | SDL_image - biblioteka DLL dla Windows. |
2b9321d8 | 79 | |
80 | %prep | |
81 | %setup -q -n %{realname}-%{version} | |
2b9321d8 | 82 | |
093880c3 JB |
83 | rm -f acinclude.m4 |
84 | ||
2b9321d8 | 85 | %build |
2b9321d8 | 86 | %{__libtoolize} |
87 | %{__aclocal} | |
88 | %{__autoconf} | |
89 | %{__automake} | |
90 | # no sdl test, because it requires configured wine to work | |
91 | %configure \ | |
d18c8144 JB |
92 | png_lib=libpng12-0.dll \ |
93 | --host=%{target} \ | |
076dc26b | 94 | --target=%{target} \ |
d18c8144 | 95 | --with-sdl-prefix=%{_prefix} \ |
2b9321d8 | 96 | --disable-sdltest \ |
97 | --enable-bmp \ | |
98 | --enable-gif \ | |
99 | --enable-jpg \ | |
100 | --enable-pcx \ | |
101 | --enable-png \ | |
d18c8144 | 102 | --enable-tga |
2b9321d8 | 103 | |
d18c8144 JB |
104 | # LIBS hack for libtool not detecting libraries without .la files |
105 | %{__make} \ | |
106 | LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')" | |
2b9321d8 | 107 | |
d18c8144 JB |
108 | %install |
109 | rm -rf $RPM_BUILD_ROOT | |
2b9321d8 | 110 | |
d18c8144 JB |
111 | %{__make} install \ |
112 | DESTDIR=$RPM_BUILD_ROOT | |
113 | ||
114 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
115 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
2b9321d8 | 116 | |
117 | %if 0%{!?debug:1} | |
d18c8144 JB |
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 | |
2b9321d8 | 120 | %endif |
121 | ||
2b9321d8 | 122 | %clean |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
d18c8144 JB |
127 | %doc CHANGES README |
128 | %{_libdir}/libSDL_image.dll.a | |
129 | %{_libdir}/libSDL_image.la | |
130 | %{_includedir}/SDL/SDL_image.h | |
131 | ||
132 | %files static | |
133 | %defattr(644,root,root,755) | |
134 | %{_libdir}/libSDL_image.a | |
2b9321d8 | 135 | |
136 | %files dll | |
137 | %defattr(644,root,root,755) | |
d18c8144 | 138 | %{_dlldir}/libSDL_image-*.dll |