]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
b3802f47ca35d9551f03cc348674f8e7e14faca1
[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.5
6 Release:        1
7 License:        LGPL
8 Group:          Libraries
9 Source0:        http://www.libsdl.org/projects/SDL_image/release/%{realname}-%{version}.tar.gz
10 # Source0-md5:  cd006109a73bf7dcc93e1c3ed15ee782
11 URL:            http://www.libsdl.org/projects/SDL_image/
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 BuildRequires:  crossmingw32-SDL
15 BuildRequires:  crossmingw32-gcc
16 BuildRequires:  crossmingw32-libjpeg
17 BuildRequires:  crossmingw32-libpng
18 BuildRequires:  crossmingw32-w32api
19 BuildRequires:  crossmingw32-zlib
20 BuildRequires:  libtool
21 Requires:       crossmingw32-SDL
22 Requires:       crossmingw32-runtime
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         no_install_post_strip   1
26
27 %define         target          i386-mingw32
28 %define         target_platform i386-pc-mingw32
29 %define         arch            %{_prefix}/%{target}
30 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
31 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
32
33 %define         __cc            %{target}-gcc
34 %define         __cxx           %{target}-g++
35
36 %ifarch alpha sparc sparc64 sparcv9
37 %define         optflags        -O2
38 %endif
39
40 %description
41 This is a simple library to load images of various formats as SDL
42 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
43 and PNG formats.
44
45 %description -l pl.UTF-8
46 Jest to prosta biblioteka służąca do ładowania różnego formatu
47 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obsługuje
48 następujące formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
49
50 %package dll
51 Summary:        %{realname} - DLL library for Windows
52 Summary(pl.UTF-8):      %{realname} - biblioteka DLL dla Windows
53 Group:          Applications/Emulators
54
55 %description dll
56 %{realname} - DLL library for Windows.
57
58 %description dll -l pl.UTF-8
59 %{realname} - biblioteka DLL dla Windows.
60
61 %prep
62 %setup -q -n %{realname}-%{version}
63
64 rm -f acinclude.m4
65
66 %build
67 CC=%{target}-gcc ; export CC
68 CXX=%{target}-g++ ; export CXX
69 LD=%{target}-ld ; export LD
70 AR=%{target}-ar ; export AR
71 AS=%{target}-as ; export AS
72 CROSS_COMPILE=1 ; export CROSS_COMPILE
73 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
74 RANLIB=%{target}-ranlib ; export RANLIB
75 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
76 TARGET="%{target}" ; export TARGET
77
78 %{__libtoolize}
79 %{__aclocal}
80 %{__autoconf}
81 %{__automake}
82 # no sdl test, because it requires configured wine to work
83 %configure \
84         png_lib=png.dll \
85         --host=%{_host} \
86         --target=%{target} \
87         --with-sdl-prefix=%{arch} \
88         --disable-sdltest \
89         --enable-bmp \
90         --enable-gif \
91         --enable-jpg \
92         --enable-pcx \
93         --enable-png \
94         --enable-tga \
95         --disable-shared
96
97 %{__make} libSDL_image.la
98
99 %{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg
100
101 cp -f .libs/libSDL_image.a .
102
103 %if 0%{!?debug:1}
104 %{target}-strip -R.comment -R.note *.dll
105 %{target}-strip -g -R.comment -R.note *.a
106 %endif
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib}
111 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
112
113 install *.a $RPM_BUILD_ROOT%{arch}/lib
114 install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL
115 install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %{arch}/include/SDL/*
123 %{arch}/lib/*
124
125 %files dll
126 %defattr(644,root,root,755)
127 %{_datadir}/wine/windows/system/*.dll
This page took 0.035426 seconds and 2 git commands to generate.