]> git.pld-linux.org Git - packages/crossmingw32-SDL_image.git/blob - crossmingw32-SDL_image.spec
- updated to 1.2.4
[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.4
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:  70bf617f99e51a2c94550fc79d542f0b
11 Patch0:         %{realname}-ac_fixes.patch
12 URL:            http://www.libsdl.org/projects/SDL_image/
13 BuildRequires:  autoconf
14 BuildRequires:  automake
15 BuildRequires:  crossmingw32-SDL
16 BuildRequires:  crossmingw32-gcc
17 BuildRequires:  crossmingw32-libjpeg
18 BuildRequires:  crossmingw32-libpng
19 BuildRequires:  crossmingw32-w32api
20 BuildRequires:  crossmingw32-zlib
21 BuildRequires:  libtool
22 Requires:       crossmingw32-SDL
23 Requires:       crossmingw32-runtime
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         no_install_post_strip   1
27
28 %define         target          i386-mingw32
29 %define         target_platform i386-pc-mingw32
30 %define         arch            %{_prefix}/%{target}
31 %define         gccarch         %{_prefix}/lib/gcc-lib/%{target}
32 %define         gcclib          %{_prefix}/lib/gcc-lib/%{target}/%{version}
33
34 %define         __cc            %{target}-gcc
35 %define         __cxx           %{target}-g++
36
37 %ifarch alpha sparc sparc64 sparcv9
38 %define         optflags        -O2
39 %endif
40
41 %description
42 This is a simple library to load images of various formats as SDL
43 surfaces. This library currently supports BMP, PPM, PCX, GIF, JPEG,
44 and PNG formats.
45
46 %description -l pl
47 Jest to prosta biblioteka s³u¿±ca do ³adowania ró¿nego formatu
48 obrazków jako powierzchni SDL. W chwili obecnej biblioteka obs³uguje
49 nastêpuj±ce formaty: BMP, PPM, PCX, GIF, JPEG oraz PNG.
50
51 %package dll
52 Summary:        %{realname} - DLL library for Windows
53 Summary(pl):    %{realname} - biblioteka DLL dla Windows
54 Group:          Applications/Emulators
55
56 %description dll
57 %{realname} - DLL library for Windows.
58
59 %description dll -l pl
60 %{realname} - biblioteka DLL dla Windows.
61
62 %prep
63 %setup -q -n %{realname}-%{version}
64 %patch0 -p1
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 rm -f acinclude.m4
79 %{__libtoolize}
80 %{__aclocal}
81 %{__autoconf}
82 %{__automake}
83 # no sdl test, because it requires configured wine to work
84 %configure \
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
This page took 0.085068 seconds and 3 git commands to generate.