]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
- rel++
[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:        4
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 Requires:       crossmingw32-runtime
14 BuildRequires:  autoconf
15 BuildRequires:  automake
16 BuildRequires:  crossmingw32-gcc
17 BuildRequires:  crossmingw32-libjpeg
18 BuildRequires:  crossmingw32-libpng
19 BuildRequires:  crossmingw32-SDL
20 BuildRequires:  crossmingw32-w32api
21 BuildRequires:  crossmingw32-zlib
22 BuildRequires:  libtool
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
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):    %{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
59 %{realname} - biblioteka DLL dla Windows.
60
61 %prep
62 %setup -q -n %{realname}-%{version}
63 %patch0 -p1
64
65 %build
66 CC=%{target}-gcc ; export CC
67 CXX=%{target}-g++ ; export CXX
68 LD=%{target}-ld ; export LD
69 AR=%{target}-ar ; export AR
70 AS=%{target}-as ; export AS
71 CROSS_COMPILE=1 ; export CROSS_COMPILE
72 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
73 RANLIB=%{target}-ranlib ; export RANLIB
74 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
75 TARGET="%{target}" ; export TARGET
76
77 rm -f acinclude.m4
78 %{__libtoolize}
79 %{__aclocal}
80 %{__autoconf}
81 %{__automake}
82 # no sdl test, because it requires configured wine to work
83 %configure \
84         --host=%{_host} \
85         --target=%{target} \
86         --with-sdl-prefix=%{arch} \
87         --disable-sdltest \
88         --enable-bmp \
89         --enable-gif \
90         --enable-jpg \
91         --enable-pcx \
92         --enable-png \
93         --enable-tga \
94         --disable-shared
95
96 %{__make} libSDL_image.la
97
98 %{__cc} --shared IMG*.o -Wl,--enable-auto-image-base -o SDL_image.dll -Wl,--out-implib,libSDL_image.dll.a -lSDL -lpng -ljpeg
99
100 cp -f .libs/libSDL_image.a .
101
102 %if 0%{!?debug:1}
103 %{target}-strip -R.comment -R.note *.dll
104 %{target}-strip -g -R.comment -R.note *.a
105 %endif
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{arch}/{include/SDL,lib}
110 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
111
112 install *.a $RPM_BUILD_ROOT%{arch}/lib
113 install SDL_image.h $RPM_BUILD_ROOT%{arch}/include/SDL
114 install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %files
120 %defattr(644,root,root,755)
121 %{arch}/include/SDL/*
122 %{arch}/lib/*
123
124 %files dll
125 %defattr(644,root,root,755)
126 %{_datadir}/wine/windows/system
This page took 0.037539 seconds and 4 git commands to generate.