]>
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} |
b4114a6f | 5 | Version: 1.2.12 |
d9427a69 | 6 | Release: 2 |
2c5f2605 | 7 | License: Zlib-like |
2b9321d8 | 8 | Group: Libraries |
9 | Source0: http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz | |
b4114a6f | 10 | # Source0-md5: a0f9098ebe5400f0bdc9b62e60797ecb |
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 |
b4114a6f | 17 | BuildRequires: crossmingw32-libpng >= 1.5.0 |
2c5f2605 | 18 | BuildRequires: crossmingw32-libtiff >= 4 |
b4114a6f | 19 | BuildRequires: crossmingw32-libwebp >= 0.1.3 |
2b9321d8 | 20 | BuildRequires: crossmingw32-w32api |
f34a67a9 JB |
21 | BuildRequires: libtool >= 2:2.0 |
22 | BuildRequires: pkgconfig >= 1:0.9.0 | |
d18c8144 | 23 | Requires: crossmingw32-SDL >= 1.2.10 |
37e61a0a | 24 | Requires: crossmingw32-runtime |
2b9321d8 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %define no_install_post_strip 1 | |
28 | ||
d18c8144 JB |
29 | %define target i386-mingw32 |
30 | %define target_platform i386-pc-mingw32 | |
2b9321d8 | 31 | |
d18c8144 JB |
32 | %define _sysprefix /usr |
33 | %define _prefix %{_sysprefix}/%{target} | |
c8701c7c | 34 | %define _libdir %{_prefix}/lib |
f34a67a9 | 35 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
d18c8144 JB |
36 | %define _dlldir /usr/share/wine/windows/system |
37 | %define __cc %{target}-gcc | |
38 | %define __cxx %{target}-g++ | |
d9427a69 | 39 | %define __pkgconfig_provides %{nil} |
2b9321d8 | 40 | |
f34a67a9 JB |
41 | %ifnarch %{ix86} |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
dcf46c3e | 43 | %define optflags -O2 |
44 | %endif | |
f34a67a9 JB |
45 | # -z options are invalid for mingw linker |
46 | %define filterout_ld -Wl,-z,.* | |
dcf46c3e | 47 | |
2b9321d8 | 48 | %description |
49 | This is a simple library to load images of various formats as SDL | |
b4114a6f JB |
50 | surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX, |
51 | PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats. | |
2b9321d8 | 52 | |
d18c8144 JB |
53 | This package contains the cross version for Win32. |
54 | ||
359a03f1 JR |
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 | |
b4114a6f JB |
58 | następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM), |
59 | TGA, TIFF, WebP, XCF oraz XPM. | |
2b9321d8 | 60 | |
d18c8144 JB |
61 | Ten pakiet zawiera wersję skrośną dla Win32. |
62 | ||
63 | %package static | |
11374edc JB |
64 | Summary: Static SDL_image library (cross MinGW32 version) |
65 | Summary(pl.UTF-8): Statyczna biblioteka SDL_image (wersja skrośna MinGW32) | |
d18c8144 JB |
66 | Group: Development/Libraries |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description static | |
11374edc | 70 | Static SDL_image library (cross MinGW32 version). |
d18c8144 JB |
71 | |
72 | %description static -l pl.UTF-8 | |
11374edc | 73 | Statyczna biblioteka SDL_image (wersja skrośna MinGW32). |
d18c8144 | 74 | |
2b9321d8 | 75 | %package dll |
d18c8144 JB |
76 | Summary: SDL_image - DLL library for Windows |
77 | Summary(pl.UTF-8): SDL_image - biblioteka DLL dla Windows | |
2b9321d8 | 78 | Group: Applications/Emulators |
d18c8144 JB |
79 | Requires: crossmingw32-SDL-dll >= 1.2.10 |
80 | Requires: wine | |
2b9321d8 | 81 | |
82 | %description dll | |
d18c8144 | 83 | SDL_image - DLL library for Windows. |
2b9321d8 | 84 | |
359a03f1 | 85 | %description dll -l pl.UTF-8 |
d18c8144 | 86 | SDL_image - biblioteka DLL dla Windows. |
2b9321d8 | 87 | |
88 | %prep | |
89 | %setup -q -n %{realname}-%{version} | |
2b9321d8 | 90 | |
91 | %build | |
f34a67a9 | 92 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
2b9321d8 | 93 | %{__libtoolize} |
94 | %{__aclocal} | |
95 | %{__autoconf} | |
96 | %{__automake} | |
97 | # no sdl test, because it requires configured wine to work | |
98 | %configure \ | |
d18c8144 | 99 | --host=%{target} \ |
076dc26b | 100 | --target=%{target} \ |
d18c8144 | 101 | --with-sdl-prefix=%{_prefix} \ |
f34a67a9 | 102 | --disable-sdltest |
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 | |
f34a67a9 | 131 | %{_pkgconfigdir}/SDL_image.pc |
d18c8144 JB |
132 | |
133 | %files static | |
134 | %defattr(644,root,root,755) | |
135 | %{_libdir}/libSDL_image.a | |
2b9321d8 | 136 | |
137 | %files dll | |
138 | %defattr(644,root,root,755) | |
d18c8144 | 139 | %{_dlldir}/libSDL_image-*.dll |