]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
- fix alpha, sparc
[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:        2
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 %ifarch alpha sparc sparc64 sparcv9
36 %define         optflags        -O2
37 %endif
38
39 %description
40 This is a simple library to load images of various formats as SDL
41 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
42 and PNG formats.
43
44 %description -l pl
45 jest to prosta biblioteka s³u¿±ca do ³adowania ró¿nego formatu
46 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obs³uguje
47 nastepuj±ce formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
48
49 %package dll
50 Summary:        %{realname} - DLL library for Windows
51 Summary(pl):    %{realname} - biblioteka DLL dla Windows
52 Group:          Applications/Emulators
53
54 %description dll
55 %{realname} - DLL library for Windows.
56
57 %description dll -l pl
58 %{realname} - biblioteka DLL dla Windows.
59
60 %prep
61 %setup -q -n %{realname}-%{version}
62 %patch0 -p1
63
64 %build
65 CC=%{target}-gcc ; export CC
66 CXX=%{target}-g++ ; export CXX
67 LD=%{target}-ld ; export LD
68 AR=%{target}-ar ; export AR
69 AS=%{target}-as ; export AS
70 CROSS_COMPILE=1 ; export CROSS_COMPILE
71 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
72 RANLIB=%{target}-ranlib ; export RANLIB
73 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
74 TARGET="%{target}" ; export TARGET
75
76 rm -f acinclude.m4
77 %{__libtoolize}
78 %{__aclocal}
79 %{__autoconf}
80 %{__automake}
81 # no sdl test, because it requires configured wine to work
82 %configure \
83         --host=%{_host} \
84         --target=%{target} \
85         --with-sdl-prefix=%{arch} \
86         --disable-sdltest \
87         --enable-bmp \
88         --enable-gif \
89         --enable-jpg \
90         --enable-pcx \
91         --enable-png \
92         --enable-tga \
93         --disable-shared
94
95 %{__make}
96
97 %{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg
98
99 cp -f .libs/libSDL_image.a .
100
101 %if 0%{!?debug:1}
102 %{target}-strip -R.comment -R.note *.dll
103 %{target}-strip -g -R.comment -R.note *.a
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib}
109 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
110
111 install *.a $RPM_BUILD_ROOT%{arch}/lib
112 install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL
113 install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %files
119 %defattr(644,root,root,755)
120 %{arch}/include/SDL/*
121 %{arch}/lib/*
122
123 %files dll
124 %defattr(644,root,root,755)
125 %{_datadir}/wine/windows/system
This page took 0.069327 seconds and 4 git commands to generate.