]>
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 | |
abf0e518 | 8 | Version: 2.38.2 |
93526fea | 9 | Release: 1 |
e1a8334a JB |
10 | License: LGPL v2+ |
11 | Group: Development/Libraries | |
41796a38 | 12 | Source0: http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.38/gdk-pixbuf-%{version}.tar.xz |
abf0e518 | 13 | # Source0-md5: cc1d712a1643b92ff0904d589963971f |
644e715c | 14 | URL: https://developer.gnome.org/gdk-pixbuf/ |
e1a8334a | 15 | BuildRequires: crossmingw32-gcc |
7e81c801 | 16 | BuildRequires: crossmingw32-glib2 >= 2.48.0 |
e1a8334a | 17 | BuildRequires: crossmingw32-jasper |
7e81c801 | 18 | BuildRequires: crossmingw32-libpng >= 1.0 |
cd84fddd | 19 | BuildRequires: gettext-tools >= 0.19 |
969f93f5 JB |
20 | # glib-genmarshal, glib-mkenums |
21 | BuildRequires: glib2-devel >= 1:2.48.0 | |
fc20a71e | 22 | BuildRequires: gtk-doc >= 1.20 |
41796a38 JB |
23 | BuildRequires: meson >= 0.46.0 |
24 | BuildRequires: ninja | |
e1a8334a | 25 | BuildRequires: pkgconfig >= 1:0.15 |
70010bb0 | 26 | BuildRequires: rpmbuild(macros) >= 1.727 |
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 | |
b0fb6ff3 | 50 | %define __pkgconfig_provides %{nil} |
6b48c5a3 | 51 | %define __pkgconfig_requires %{nil} |
f9096f40 | 52 | # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* in meson-cross.txt |
e1a8334a | 53 | |
e1a8334a JB |
54 | %ifnarch %{ix86} |
55 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
56 | %define optflags -O2 | |
57 | %endif | |
aadfbf6f | 58 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
e1a8334a | 59 | %define filterout_ld -Wl,-z,.* |
aadfbf6f | 60 | %define filterout_c -f[-a-z0-9=]* |
e1a8334a JB |
61 | |
62 | %description | |
63 | gdk-pixbuf is an image loading and scaling library that can be | |
64 | extended by loadable modules for new image formats. | |
65 | ||
66 | This package contains the cross version for Win32. | |
67 | ||
68 | %description -l pl.UTF-8 | |
69 | gdk-pixbuf to biblioteka ładująca i skalująca obrazki, której | |
70 | funkcjonalność może być rozszerzana o obsługę nowych formatów poprzez | |
71 | ładowane moduły. | |
72 | ||
73 | Ten pakiet zawiera wersję skrośną dla Win32. | |
74 | ||
41796a38 JB |
75 | %package static |
76 | Summary: Static gdk-pixbuf library (cross MinGW32 version) | |
77 | Summary(pl.UTF-8): Statyczna biblioteka gdk-pixbuf (wersja skrośna MinGW32) | |
78 | Group: Development/Libraries | |
79 | Requires: %{name} = %{version}-%{release} | |
80 | ||
81 | %description static | |
82 | Static gdk-pixbuf library (cross MinGW32 version). | |
83 | ||
84 | %description static -l pl.UTF-8 | |
85 | Statyczna biblioteka gdk-pixbuf (wersja skrośna MinGW32). | |
86 | ||
e1a8334a JB |
87 | %package dll |
88 | Summary: DLL gdk-pixbuf libraries for Windows | |
89 | Summary(pl.UTF-8): Biblioteki DLL gdk-pixbuf dla Windows | |
90 | Group: Applications/Emulators | |
7e81c801 | 91 | Requires: crossmingw32-glib2-dll >= 2.48.0 |
e1a8334a JB |
92 | Requires: wine |
93 | Conflicts: crossmingw32-gtk+2-dll < 2.22.0 | |
94 | ||
95 | %description dll | |
96 | DLL gdk-pixbuf libraries for Windows. | |
97 | ||
98 | %description dll -l pl.UTF-8 | |
99 | Biblioteki DLL gdk-pixbuf dla Windows. | |
100 | ||
101 | %prep | |
102 | %setup -q -n gdk-pixbuf-%{version} | |
103 | ||
41796a38 JB |
104 | # disable loaders.cache generation |
105 | %{__sed} -i -e "/^loaders_cache/,/^loaders_dep/ d" gdk-pixbuf/meson.build | |
106 | # disable tests and thumbnailer (unwanted, generates files using built library/binary) | |
107 | %{__sed} -i -e "/^subdir('tests')/d" meson.build | |
108 | %{__sed} -i -e "/^subdir('thumbnailer')/d" meson.build | |
109 | ||
110 | cat > meson-cross.txt <<'EOF' | |
111 | [host_machine] | |
112 | system = 'windows' | |
113 | cpu_family = 'x86' | |
114 | cpu = 'i386' | |
115 | endian='little' | |
116 | [binaries] | |
f9096f40 | 117 | c = '%{target}-gcc' |
41796a38 JB |
118 | ar = '%{target}-ar' |
119 | windres = '%{target}-windres' | |
120 | pkgconfig = 'pkg-config' | |
121 | [properties] | |
122 | ; force gnu99 to disable __STRICT_ANSI__ and unblock fdopen() in mingw32 | |
123 | c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")', '-std=gnu99'] | |
124 | EOF | |
cba6696c | 125 | |
e1a8334a JB |
126 | %build |
127 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig | |
41796a38 JB |
128 | %meson build \ |
129 | --cross-file meson-cross.txt \ | |
130 | -Ddocs=false \ | |
131 | -Dgir=false \ | |
132 | -Dinstalled_tests=false \ | |
133 | -Djasper=true \ | |
134 | -Dman=false \ | |
135 | %{?with_gdiplus:-Dnative_windows_loaders=true} \ | |
136 | -Dx11=false | |
137 | ||
138 | %meson_build -C build | |
e1a8334a JB |
139 | |
140 | %install | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
41796a38 | 143 | %meson_install -j1 -C build |
e1a8334a JB |
144 | |
145 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
644e715c | 146 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
e1a8334a JB |
147 | |
148 | %if 0%{!?debug:1} | |
149 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll \ | |
150 | $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/*.dll | |
151 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
152 | %endif | |
153 | ||
154 | # shut up check-files | |
93526fea | 155 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/*.exe |
41796a38 JB |
156 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale |
157 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/*.dll.a | |
e1a8334a JB |
158 | |
159 | %clean | |
160 | rm -rf $RPM_BUILD_ROOT | |
161 | ||
162 | %files | |
163 | %defattr(644,root,root,755) | |
164 | %{_libdir}/libgdk_pixbuf-2.0.dll.a | |
e1a8334a JB |
165 | %{_includedir}/gdk-pixbuf-2.0 |
166 | %{_pkgconfigdir}/gdk-pixbuf-2.0.pc | |
167 | ||
41796a38 JB |
168 | %files static |
169 | %defattr(644,root,root,755) | |
170 | %{_libdir}/libgdk_pixbuf-2.0.a | |
171 | ||
e1a8334a JB |
172 | %files dll |
173 | %defattr(644,root,root,755) | |
174 | %{_dlldir}/libgdk_pixbuf-2.0-*.dll | |
175 | %dir %{_libdir}/gdk-pixbuf-2.0 | |
176 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver} | |
177 | %dir %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders | |
178 | %{_libdir}/gdk-pixbuf-2.0/%{abiver}/loaders/libpixbufloader-*.dll |