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