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