]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
added filterout_c for -f* options
[packages/crossmingw32-SDL_image.git] / crossmingw32-SDL_image.spec
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}
5 Version:        1.2.12
6 Release:        4
7 License:        Zlib-like
8 Group:          Libraries
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)
26
27 %define         no_install_post_strip   1
28
29 %define         target                  i386-mingw32
30 %define         target_platform         i386-pc-mingw32
31
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}
40 %define         __pkgconfig_requires    %{nil}
41
42 %ifnarch %{ix86}
43 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
44 %define         optflags        -O2
45 %endif
46 # -z options are invalid for mingw linker, most of -f options are Linux-specific
47 %define         filterout_ld    -Wl,-z,.*
48 %define         filterout_c             -f[-a-z0-9=]*
49
50 %description
51 This is a simple library to load images of various formats as SDL
52 surfaces. This library currently supports BMP, GIF, JPEG, LBM, PCX,
53 PNG, PNM (PBM/PGM/PPM), TGA, TIFF, WebP, XCF and XPM formats.
54
55 This package contains the cross version for Win32.
56
57 %description -l pl.UTF-8
58 Jest to prosta biblioteka służąca do ładowania różnego formatu
59 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
60 następujące formaty: BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PBM/PGM/PPM),
61 TGA, TIFF, WebP, XCF oraz XPM.
62
63 Ten pakiet zawiera wersję skrośną dla Win32.
64
65 %package static
66 Summary:        Static SDL_image library (cross MinGW32 version)
67 Summary(pl.UTF-8):      Statyczna biblioteka SDL_image (wersja skrośna MinGW32)
68 Group:          Development/Libraries
69 Requires:       %{name} = %{version}-%{release}
70
71 %description static
72 Static SDL_image library (cross MinGW32 version).
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka SDL_image (wersja skrośna MinGW32).
76
77 %package dll
78 Summary:        SDL_image - DLL library for Windows
79 Summary(pl.UTF-8):      SDL_image - biblioteka DLL dla Windows
80 Group:          Applications/Emulators
81 Requires:       crossmingw32-SDL-dll >= 1.2.10
82 Requires:       wine
83
84 %description dll
85 SDL_image - DLL library for Windows.
86
87 %description dll -l pl.UTF-8
88 SDL_image - biblioteka DLL dla Windows.
89
90 %prep
91 %setup -q -n %{realname}-%{version}
92
93 %build
94 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
95 %{__libtoolize}
96 %{__aclocal}
97 %{__autoconf}
98 %{__automake}
99 # no sdl test, because it requires configured wine to work
100 %configure \
101         --host=%{target} \
102         --target=%{target} \
103         --with-sdl-prefix=%{_prefix} \
104         --disable-sdltest
105
106 # LIBS hack for libtool not detecting libraries without .la files
107 %{__make} \
108         LIBS="$(%{_bindir}/sdl-config --libs | sed -e 's/\(-lmingw32\|-lSDLmain\)/-Wl,\1/g')"
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 install -d $RPM_BUILD_ROOT%{_dlldir}
117 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
118
119 %if 0%{!?debug:1}
120 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
121 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
122 %endif
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %files
128 %defattr(644,root,root,755)
129 %doc CHANGES README
130 %{_libdir}/libSDL_image.dll.a
131 %{_libdir}/libSDL_image.la
132 %{_includedir}/SDL/SDL_image.h
133 %{_pkgconfigdir}/SDL_image.pc
134
135 %files static
136 %defattr(644,root,root,755)
137 %{_libdir}/libSDL_image.a
138
139 %files dll
140 %defattr(644,root,root,755)
141 %{_dlldir}/libSDL_image-*.dll
This page took 0.068735 seconds and 3 git commands to generate.