]>
Commit | Line | Data |
---|---|---|
63590a42 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without gdiplus # use libjpeg and libtiff instead of system GDIPLUS | |
4 | # | |
e1a8334a JB |
5 | Summary: An image loading and scaling library - cross MinGW32 version |
6 | Summary(pl.UTF-8): Biblioteka ładująca i skalująca obrazki - wersja skrośna MinGW32 | |
7 | Name: crossmingw32-gdk-pixbuf2 | |
11c3111e | 8 | Version: 2.34.0 |
cd84fddd | 9 | Release: 1 |
e1a8334a JB |
10 | License: LGPL v2+ |
11 | Group: Development/Libraries | |
11c3111e JB |
12 | Source0: http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.34/gdk-pixbuf-%{version}.tar.xz |
13 | # Source0-md5: 63cb19f92cf7709ccf44bbb6fe1ff70c | |
0c9d22f7 | 14 | Patch0: gdk-pixbuf2-png-nodep.patch |
33d5c746 | 15 | Patch1: gdk-pixbuf2-gdip.patch |
63590a42 | 16 | URL: http://developer.gnome.org/gdk-pixbuf/ |
33d5c746 JB |
17 | BuildRequires: autoconf >= 2.63 |
18 | BuildRequires: automake >= 1:1.11 | |
e1a8334a | 19 | BuildRequires: crossmingw32-gcc |
f02b1778 | 20 | BuildRequires: crossmingw32-glib2 >= 2.37.6 |
e1a8334a JB |
21 | BuildRequires: crossmingw32-jasper |
22 | BuildRequires: crossmingw32-libpng | |
cd84fddd | 23 | BuildRequires: gettext-tools >= 0.19 |
fc20a71e | 24 | BuildRequires: gtk-doc >= 1.20 |
33d5c746 | 25 | BuildRequires: libtool >= 2:2.2.6 |
e1a8334a | 26 | BuildRequires: pkgconfig >= 1:0.15 |
63590a42 JB |
27 | BuildRequires: tar >= 1:1.22 |
28 | BuildRequires: xz | |
29 | %if %{without gdiplus} | |
30 | BuildRequires: crossmingw32-libjpeg | |
31 | BuildRequires: crossmingw32-libtiff | |
32 | %endif | |
f02b1778 | 33 | Requires: crossmingw32-glib2 >= 2.37.6 |
e1a8334a JB |
34 | Conflicts: crossmingw32-gtk+2 < 2.22.0 |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %define abiver 2.10.0 | |
38 | ||
39 | %define no_install_post_strip 1 | |
40 | ||
41 | %define target i386-mingw32 | |
42 | %define target_platform i386-pc-mingw32 | |
43 | ||
44 | %define _sysprefix /usr | |
45 | %define _prefix %{_sysprefix}/%{target} | |
46 | %define _libdir %{_prefix}/lib | |
47 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
48 | %define _dlldir /usr/share/wine/windows/system | |
49 | %define __cc %{target}-gcc | |
50 | %define __cxx %{target}-g++ | |
b0fb6ff3 | 51 | %define __pkgconfig_provides %{nil} |
6b48c5a3 | 52 | %define __pkgconfig_requires %{nil} |
e1a8334a JB |
53 | |
54 | #define filterout_ld (-Wl,)?-as-needed.* | |
55 | ||
56 | %ifnarch %{ix86} | |
57 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
58 | %define optflags -O2 | |
59 | %endif | |
aadfbf6f | 60 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
e1a8334a | 61 | %define filterout_ld -Wl,-z,.* |
aadfbf6f | 62 | %define filterout_c -f[-a-z0-9=]* |
e1a8334a JB |
63 | |
64 | %description | |
65 | gdk-pixbuf is an image loading and scaling library that can be | |
66 | extended by loadable modules for new image formats. | |
67 | ||
68 | This package contains the cross version for Win32. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | gdk-pixbuf to biblioteka ładująca i skalująca obrazki, której | |
72 | funkcjonalność może być rozszerzana o obsługę nowych formatów poprzez | |
73 | ładowane moduły. | |
74 | ||
75 | Ten pakiet zawiera wersję skrośną dla Win32. | |
76 | ||
77 | %package dll | |
78 | Summary: DLL gdk-pixbuf libraries for Windows | |
79 | Summary(pl.UTF-8): Biblioteki DLL gdk-pixbuf dla Windows | |
80 | Group: Applications/Emulators | |
f02b1778 | 81 | Requires: crossmingw32-glib2-dll >= 2.37.6 |
e1a8334a JB |
82 | Requires: wine |
83 | Conflicts: crossmingw32-gtk+2-dll < 2.22.0 | |
84 | ||
85 | %description dll | |
86 | DLL gdk-pixbuf libraries for Windows. | |
87 | ||
88 | %description dll -l pl.UTF-8 | |
89 | Biblioteki DLL gdk-pixbuf dla Windows. | |
90 | ||
91 | %prep | |
92 | %setup -q -n gdk-pixbuf-%{version} | |
69eb6b6a | 93 | %patch0 -p1 |
33d5c746 | 94 | %patch1 -p1 |
e1a8334a JB |
95 | |
96 | %build | |
33d5c746 JB |
97 | %{__gettextize} |
98 | %{__libtoolize} | |
99 | %{__aclocal} | |
100 | %{__autoconf} | |
101 | %{__autoheader} | |
102 | %{__automake} | |
e1a8334a JB |
103 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
104 | %configure \ | |
105 | --target=%{target} \ | |
106 | --host=%{target} \ | |
107 | --disable-gtk-doc \ | |
108 | --disable-man \ | |
c0100a0c | 109 | --disable-silent-rules \ |
63590a42 JB |
110 | --with-libjasper \ |
111 | %{!?with_gdiplus:--without-gdiplus} | |
e1a8334a JB |
112 | |
113 | %{__make} | |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %{__make} install \ | |
119 | DESTDIR=$RPM_BUILD_ROOT | |
120 | ||
121 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
122 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
123 | ||
124 | %if 0%{!?debug:1} | |
125 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll \ | |
126 | $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/*.dll | |
127 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
128 | %endif | |
129 | ||
130 | # shut up check-files | |
131 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{gtk-doc,locale,man} | |
132 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/*.{la,dll.a} | |
133 | ||
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %files | |
138 | %defattr(644,root,root,755) | |
139 | %{_libdir}/libgdk_pixbuf-2.0.dll.a | |
140 | %{_libdir}/libgdk_pixbuf-2.0.la | |
141 | %{_libdir}/gdk_pixbuf-2.0.def | |
142 | %{_includedir}/gdk-pixbuf-2.0 | |
143 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
144 | ||
145 | %files dll | |
146 | %defattr(644,root,root,755) | |
147 | %{_dlldir}/libgdk_pixbuf-2.0-*.dll | |
148 | %dir %{_libdir}/gdk-pixbuf-2.0 | |
149 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver} | |
150 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders | |
151 | %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/libpixbufloader-*.dll |