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