]>
Commit | Line | Data |
---|---|---|
2b9321d8 | 1 | %define realname SDL_image |
11374edc JB |
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 | |
2b9321d8 | 4 | Name: crossmingw32-%{realname} |
f34a67a9 JB |
5 | Version: 1.2.10 |
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 | |
f34a67a9 | 10 | # Source0-md5: 6c06584b31559e2b59f2b982d0d1f628 |
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 |
f34a67a9 | 16 | BuildRequires: crossmingw32-libjpeg >= 7 |
d18c8144 | 17 | BuildRequires: crossmingw32-libpng >= 1.2.0 |
2b9321d8 | 18 | BuildRequires: crossmingw32-w32api |
f34a67a9 JB |
19 | BuildRequires: libtool >= 2:2.0 |
20 | BuildRequires: pkgconfig >= 1:0.9.0 | |
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} | |
c8701c7c | 32 | %define _libdir %{_prefix}/lib |
f34a67a9 | 33 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
d18c8144 JB |
34 | %define _dlldir /usr/share/wine/windows/system |
35 | %define __cc %{target}-gcc | |
36 | %define __cxx %{target}-g++ | |
2b9321d8 | 37 | |
f34a67a9 JB |
38 | %ifnarch %{ix86} |
39 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
dcf46c3e | 40 | %define optflags -O2 |
41 | %endif | |
f34a67a9 JB |
42 | # -z options are invalid for mingw linker |
43 | %define filterout_ld -Wl,-z,.* | |
dcf46c3e | 44 | |
2b9321d8 | 45 | %description |
46 | This is a simple library to load images of various formats as SDL | |
47 | surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG, | |
48 | and PNG formats. | |
49 | ||
d18c8144 JB |
50 | This package contains the cross version for Win32. |
51 | ||
359a03f1 JR |
52 | %description -l pl.UTF-8 |
53 | Jest to prosta biblioteka służąca do ładowania różnego formatu | |
54 | obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje | |
55 | następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG. | |
2b9321d8 | 56 | |
d18c8144 JB |
57 | Ten pakiet zawiera wersję skrośną dla Win32. |
58 | ||
59 | %package static | |
11374edc JB |
60 | Summary: Static SDL_image library (cross MinGW32 version) |
61 | Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna MinGW32) | |
d18c8144 JB |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
64 | ||
65 | %description static | |
11374edc | 66 | Static SDL_image library (cross MinGW32 version). |
d18c8144 JB |
67 | |
68 | %description static -l pl.UTF-8 | |
11374edc | 69 | Statyczna biblioteka SDL_image (wersja skrośna MinGW32). |
d18c8144 | 70 | |
2b9321d8 | 71 | %package dll |
d18c8144 JB |
72 | Summary: SDL_image - DLL library for Windows |
73 | Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows | |
2b9321d8 | 74 | Group: Applications/Emulators |
d18c8144 JB |
75 | Requires: crossmingw32-SDL-dll >= 1.2.10 |
76 | Requires: wine | |
2b9321d8 | 77 | |
78 | %description dll | |
d18c8144 | 79 | SDL_image - DLL library for Windows. |
2b9321d8 | 80 | |
359a03f1 | 81 | %description dll -l pl.UTF-8 |
d18c8144 | 82 | SDL_image - biblioteka DLL dla Windows. |
2b9321d8 | 83 | |
84 | %prep | |
85 | %setup -q -n %{realname}-%{version} | |
2b9321d8 | 86 | |
87 | %build | |
f34a67a9 | 88 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
2b9321d8 | 89 | %{__libtoolize} |
90 | %{__aclocal} | |
91 | %{__autoconf} | |
92 | %{__automake} | |
93 | # no sdl test, because it requires configured wine to work | |
94 | %configure \ | |
d18c8144 | 95 | --host=%{target} \ |
076dc26b | 96 | --target=%{target} \ |
d18c8144 | 97 | --with-sdl-prefix=%{_prefix} \ |
f34a67a9 | 98 | --disable-sdltest |
2b9321d8 | 99 | |
d18c8144 JB |
100 | # LIBS hack for libtool not detecting libraries without .la files |
101 | %{__make} \ | |
102 | LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')" | |
2b9321d8 | 103 | |
d18c8144 JB |
104 | %install |
105 | rm -rf $RPM_BUILD_ROOT | |
2b9321d8 | 106 | |
d18c8144 JB |
107 | %{__make} install \ |
108 | DESTDIR=$RPM_BUILD_ROOT | |
109 | ||
110 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
111 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
2b9321d8 | 112 | |
113 | %if 0%{!?debug:1} | |
d18c8144 JB |
114 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
115 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
2b9321d8 | 116 | %endif |
117 | ||
2b9321d8 | 118 | %clean |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
d18c8144 JB |
123 | %doc CHANGES README |
124 | %{_libdir}/libSDL_image.dll.a | |
125 | %{_libdir}/libSDL_image.la | |
126 | %{_includedir}/SDL/SDL_image.h | |
f34a67a9 | 127 | %{_pkgconfigdir}/SDL_image.pc |
d18c8144 JB |
128 | |
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libSDL_image.a | |
2b9321d8 | 132 | |
133 | %files dll | |
134 | %defattr(644,root,root,755) | |
d18c8144 | 135 | %{_dlldir}/libSDL_image-*.dll |