2010-08-09 15:15:56 +02:00
#
2011-02-18 11:55:25 +01:00
# spec file for package gdk-pixbuf
2010-08-09 15:15:56 +02:00
#
2018-01-08 13:31:19 +01:00
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
2010-08-09 15:15:56 +02:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-03-21 09:44:08 +01:00
2010-10-15 12:44:53 +02:00
# When updating the binary version, do not forget to also update baselibs.conf
%define gdk_pixbuf_binary_version 2.10.0
2010-08-09 15:15:56 +02:00
Name : gdk-pixbuf
2017-10-05 14:24:29 +02:00
Version : 2.36.11
2011-12-21 05:10:28 +01:00
Release : 0
2010-08-09 15:15:56 +02:00
Summary : An image loading library
2018-03-05 14:47:01 +01:00
License : LGPL-2.1-or-later
2017-09-09 12:24:58 +02:00
Group : Development/Libraries/GNOME
2018-03-05 14:47:01 +01:00
URL : https://www.gnome.org/
2017-08-14 16:26:13 +02:00
Source : https://download.gnome.org/sources/gdk-pixbuf/2.36/%{name} -%{version} .tar.xz
2010-08-09 15:15:56 +02:00
Source1 : macros.gdk-pixbuf
Source2 : README.SUSE
2017-10-05 14:24:29 +02:00
Source3 : gdk-pixbuf-rpmlintrc
2010-08-09 15:15:56 +02:00
Source99 : baselibs.conf
2018-01-08 13:31:19 +01:00
# PATCH-FIX-UPSTREAM gdk-pixbuf-bgo779012-ico-overflow.patch boo#1027026 mgorse@suse.com -- fix potential integer overflow (CVE-2017-6312).
Patch0 : gdk-pixbuf-bgo779012-ico-overflow.patch
# PATCH-FIX-UPSTREAM gdk-pixbuf-gif-negative-array-indexes.patch bgo#778584 mgorse@suse.com -- gif: prevent access to negative array indexes.
Patch1 : gdk-pixbuf-gif-negative-array-indexes.patch
# PATCH-FIX-UPSTREAM gdk-pixbuf-gif-uninitialized-variable.patch bgo#778584 mgorse@suse.com -- fix uninitialized variable.
Patch2 : gdk-pixbuf-gif-uninitialized-variable.patch
# PATCH-FIX-UPSTREAM gdk-pixbuf-tiff-overflow.patch bgo#779020 mgorse@suse.com -- avoid overflow during size computation.
Patch3 : gdk-pixbuf-tiff-overflow.patch
# PATCH-FIX-UPSTREAM gdk-pixbuf-icns-handle-short-blocklen.patch boo#1027024 bgo#779016 mgorse@suse.com -- icns: protect against too short blocklen (CVE-2017-6313).
Patch4 : gdk-pixbuf-icns-handle-short-blocklen.patch
2017-08-31 09:45:44 +02:00
BuildRequires : docbook-xsl-stylesheets
BuildRequires : gtk-doc
2010-08-09 15:15:56 +02:00
BuildRequires : libjpeg-devel
BuildRequires : libtiff-devel
2017-08-31 09:45:44 +02:00
BuildRequires : meson
BuildRequires : pkgconfig
2018-03-22 10:44:10 +01:00
BuildRequires : translation-update-upstream
2017-08-31 09:45:44 +02:00
BuildRequires : xsltproc
2017-02-15 12:03:40 +01:00
BuildRequires : pkgconfig(glib-2.0) >= 2.48.0
2010-08-09 15:15:56 +02:00
BuildRequires : pkgconfig(gobject-introspection-1.0)
BuildRequires : pkgconfig(libpng)
BuildRequires : pkgconfig(x11)
%description
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
%package -n libgdk_pixbuf-2_0-0
Summary : An image loading library
2016-09-08 23:21:36 +02:00
# Provide %%{name} to make the lang package installable
2017-01-09 12:31:09 +01:00
Group : System/Libraries
2010-08-09 15:15:56 +02:00
Requires(post) : gdk-pixbuf-query-loaders
Recommends: %{name} -lang = %{version}
Conflicts : gtk2 < 2.21.3
2017-08-31 09:45:44 +02:00
Provides : %{name} = %{version}
2010-08-09 15:15:56 +02:00
%description -n libgdk_pixbuf-2_0-0
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
2011-12-12 16:48:38 +01:00
%package -n typelib-1_0-GdkPixbuf-2_0
2017-09-09 12:24:58 +02:00
Summary : Introspection bindins for gdk-pixbuf
2011-12-12 16:48:38 +01:00
Group : System/Libraries
%description -n typelib-1_0-GdkPixbuf-2_0
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
2011-12-21 05:10:28 +01:00
This package provides the GObject Introspection bindings for gdk-pixbuf.
2011-12-12 16:48:38 +01:00
2010-08-09 15:15:56 +02:00
%package query-loaders
2017-09-09 12:24:58 +02:00
Summary : Utility to create a cache of gdk-pixbuf loaders
Group : System/X11/Utilities
2010-08-09 15:15:56 +02:00
%description query-loaders
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
This package contains the utility to create the cache file needed for
loadable modules.
2016-12-15 19:27:28 +01:00
%package thumbnailer
Summary : System helper creating thumbnails
2017-09-09 12:24:58 +02:00
Group : System/X11/Utilities
2017-05-10 14:55:29 +02:00
Supplements: libgdk_pixbuf-2_0-0
2016-12-15 19:27:28 +01:00
%description thumbnailer
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
This package contains the thumbnailer utility.
2010-08-09 15:15:56 +02:00
%package devel
2017-09-09 12:24:58 +02:00
Summary : Development files for gdk-pixbuf, an image loading library
2010-08-09 15:15:56 +02:00
Group : Development/Languages/C and C++
Requires : libgdk_pixbuf-2_0-0 = %{version}
2011-12-12 16:48:38 +01:00
Requires : typelib-1_0-GdkPixbuf-2_0 = %{version}
2010-08-09 15:15:56 +02:00
%description devel
gdk-pixbuf is an image loading library that can be extended by loadable
modules for new image formats. It is used by toolkits such as GTK+ or
Clutter.
2017-09-09 12:24:58 +02:00
This package contains the development files for gdk-pixbuf.
2010-08-09 15:15:56 +02:00
%lang_package
2017-08-31 09:45:44 +02:00
2010-08-09 15:15:56 +02:00
%prep
%setup -q
2011-02-16 08:50:52 +01:00
translation-update-upstream
2018-01-08 13:31:19 +01:00
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
2018-03-05 14:47:01 +01:00
%if "%{_lib}" == "lib64"
2017-08-31 09:45:44 +02:00
cp -a %{SOURCE2} .
2010-08-09 15:15:56 +02:00
%endif
%build
2017-08-31 09:45:44 +02:00
%meson -D with_docs=true
%meson_build
2010-08-09 15:15:56 +02:00
%install
2017-08-31 09:45:44 +02:00
%meson_install
rm -rf %{buildroot} {%{_libexecdir} ,%{_datadir} }/installed-tests/
2010-08-09 15:15:56 +02:00
%find_lang %{name}
2010-10-15 12:44:53 +02:00
touch %{buildroot} %{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} /loaders.cache
2018-03-05 14:47:01 +01:00
%if "%{_lib}" == "lib64"
2010-08-09 15:15:56 +02:00
mv %{buildroot} %{_bindir} /gdk-pixbuf-query-loaders %{buildroot} %{_bindir} /gdk-pixbuf-query-loaders-64
mv %{buildroot} %{_mandir} /man1/gdk-pixbuf-query-loaders.1 %{buildroot} %{_mandir} /man1/gdk-pixbuf-query-loaders-64.1
%endif
# Install rpm macros
mkdir -p %{buildroot} %{_sysconfdir} /rpm
2017-08-31 09:45:44 +02:00
cp %{SOURCE1} %{buildroot} %{_sysconfdir} /rpm
2010-08-09 15:15:56 +02:00
2017-10-05 14:24:29 +02:00
#############################################################################
# Note: when updating scriptlets, don't forget to also update baselibs.conf #
#############################################################################
2010-10-15 12:44:53 +02:00
2016-09-08 23:21:36 +02:00
# Convenient %%define for the scriplets
2018-03-05 14:47:01 +01:00
%if "%{_lib}" == "lib64"
2010-10-15 12:44:53 +02:00
%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders-64
2010-09-23 23:56:21 +02:00
%else
2010-10-15 12:44:53 +02:00
%define _gdk_pixbuf_query_loaders %{_bindir}/gdk-pixbuf-query-loaders
2010-09-23 23:56:21 +02:00
%endif
2010-10-15 12:44:53 +02:00
%define _gdk_pixbuf_query_loaders_update_cache %{_gdk_pixbuf_query_loaders} --update-cache
2010-09-23 23:56:21 +02:00
2010-10-14 09:47:06 +02:00
%post -n libgdk_pixbuf-2_0-0
/sbin/ldconfig
2010-10-15 12:44:53 +02:00
%if 0
# In case libgdk_pixbuf-2_0-0 gets installed before gdk-pixbuf-query-loaders,
# we don't want to fail. So we make the call to gdk-pixbuf-query-loaders
2016-09-08 23:21:36 +02:00
# dependent on the existence of the binary. This is why we also have a %%post
2010-10-15 12:44:53 +02:00
# for gdk-pixbuf-query-loaders.
%endif
if test -f %{_gdk_pixbuf_query_loaders}; then
%{_gdk_pixbuf_query_loaders_update_cache}
2010-09-23 23:56:21 +02:00
fi
2010-08-09 15:15:56 +02:00
2010-10-14 09:47:06 +02:00
%post query-loaders
2010-10-15 12:44:53 +02:00
%if 0
# If we install gdk-pixbuf-query-loaders for the first time, then we should run
# it in case libgdk_pixbuf-2_0-0 was installed first (ie, if
2016-09-08 23:21:36 +02:00
# %%{_libdir}/gdk-pixbuf-2.0/%%{gdk_pixbuf_binary_version} already exists) which
2010-10-15 12:44:53 +02:00
# means gdk-pixbuf-query-loaders couldn't run there.
%endif
2014-11-11 00:15:33 +01:00
if [ $1 = 1 ]; then
2010-10-15 12:44:53 +02:00
test -d %{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}
2010-08-09 15:15:56 +02:00
if test $? -eq 0; then
2010-10-15 12:44:53 +02:00
%{_gdk_pixbuf_query_loaders_update_cache}
2010-08-09 15:15:56 +02:00
fi
fi
2010-10-15 12:44:53 +02:00
%if 0
2010-08-09 15:15:56 +02:00
# No need to call gdk-pixbuf-query-loaders in postun:
# - if it's an upgrade, it will have been called in post
# - if it's an uninstall, we don't care about this anymore
2010-10-15 12:44:53 +02:00
%endif
2010-08-09 15:15:56 +02:00
%postun -n libgdk_pixbuf-2_0-0 -p /sbin/ldconfig
%files -n libgdk_pixbuf-2_0-0
2018-03-05 14:47:01 +01:00
%license COPYING
%doc AUTHORS NEWS
%if "%{_lib}" == "lib64"
2010-08-09 15:15:56 +02:00
%doc README.SUSE
%endif
%{_libdir} /libgdk_pixbuf-2.0.so.0*
%{_libdir} /libgdk_pixbuf_xlib-2.0.so.0*
%dir %{_libdir} /gdk-pixbuf-2.0
2010-10-15 12:44:53 +02:00
%dir %{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}
%dir %{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} /loaders
%{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} /loaders/*.so
%ghost %{_libdir} /gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version} /loaders.cache
2011-12-12 16:48:38 +01:00
%files -n typelib-1_0-GdkPixbuf-2_0
2010-08-09 15:15:56 +02:00
%{_libdir} /girepository-1.0/GdkPixbuf-2.0.typelib
%files query-loaders
%{_bindir} /gdk-pixbuf-query-loaders*
%{_mandir} /man1/gdk-pixbuf-query-loaders*.1*
2016-12-15 19:27:28 +01:00
%files thumbnailer
%{_bindir} /gdk-pixbuf-thumbnailer
%dir %{_datadir} /thumbnailers
%{_datadir} /thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer
2010-08-09 15:15:56 +02:00
%files devel
%{_bindir} /gdk-pixbuf-csource
2012-02-08 11:55:27 +01:00
%{_bindir} /gdk-pixbuf-pixdata
2010-08-09 15:15:56 +02:00
%{_mandir} /man1/gdk-pixbuf-csource.1*
%{_includedir} /gdk-pixbuf-2.0
%{_libdir} /pkgconfig/*.pc
%{_libdir} /*.so
%{_datadir} /gir-1.0/GdkPixbuf-2.0.gir
%doc %{_datadir} /gtk-doc/html/gdk-pixbuf
%{_sysconfdir} /rpm/macros.gdk-pixbuf
%files lang -f %{name}.lang
2010-09-23 23:56:21 +02:00
2010-08-09 15:15:56 +02:00
%changelog