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