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