#
# Conditional build
-%bcond_without apidocs # disable gtk-doc
-%bcond_without static_libs # don't build static library
+%bcond_without apidocs # gtk-doc based API documentation
+%bcond_without static_libs # static library
%bcond_without vala # Vala API (vala up to 0.38.x already contains librsvg-2.0.vapi)
%define mver 2.50
-%define pver 0
+%define pver 5
Summary: A Raph's Library for Rendering SVG Data
Summary(pl.UTF-8): Biblioteka Raph's SVG do renderowania danych SVG
Summary(pt_BR.UTF-8): Biblioteca SVG
Epoch: 1
License: LGPL v2+
Group: X11/Libraries
-Source0: http://ftp.gnome.org/pub/GNOME/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
-# Source0-md5: 4c6068b7b296274f50e83e477d27a05b
+Source0: https://download.gnome.org/sources/librsvg/%{mver}/%{name}-%{version}.tar.xz
+# Source0-md5: b36298821ea956c5a16a38f737aafe9f
Source1: rsvg
Patch0: x32.patch
Patch1: %{name}-gtkdoc.patch
BuildRequires: libxml2-devel >= 1:2.9.0
BuildRequires: pango-devel >= 1:1.38.0
BuildRequires: pkgconfig
+BuildRequires: rpm-build >= 4.6
BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: rust >= 1.40
BuildRequires: sed >= 4.0
BuildRequires: tar >= 1:1.22
Requires: libcroco >= 0.6.1
Requires: libxml2 >= 1:2.9.0
Requires: pango >= 1:1.38.0
-Obsoletes: browser-plugin-librsvg
-Obsoletes: librsvg-gtk+2
-Obsoletes: librsvg-gtk+3
+Obsoletes: browser-plugin-librsvg < 1:2.15
+Obsoletes: librsvg-gtk+2 < 1:2.40
+Obsoletes: librsvg-gtk+3 < 1:2.46
Obsoletes: librsvg0
-Obsoletes: mozilla-plugin-rsvg
+Obsoletes: mozilla-plugin-rsvg < 1:2.16.1
# rust archs
-ExclusiveArch: %{x8664} %{ix86} aarch64
+ExclusiveArch: %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# see gdk-pixbuf2.spec for source of these ifdefs
Summary(pl.UTF-8): Dokumentacja API biblioteki librsvg
Group: Documentation
Requires: gtk-doc-common
-%if "%{_rpmversion}" >= "4.6"
BuildArch: noarch
-%endif
%description apidocs
librsvg API documentation.
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
Requires: vala >= 2:0.40
+BuildArch: noarch
%description -n vala-librsvg
Vala API for librsvg library.
%patch1 -p1
%if %{without apidocs}
-echo 'CLEANFILES=' > gtk-doc.make
-echo 'AC_DEFUN([GTK_DOC_CHECK],[])' >> acinclude.m4
+cat <<EOF > gtk-doc.make
+CLEANFILES=
+EXTRA_DIST=
+EOF
+cat <<EOF >> acinclude.m4
+AC_DEFUN([GTK_DOC_CHECK],[
+AM_CONDITIONAL([ENABLE_GTK_DOC], [/bin/false])
+])
+EOF
+%endif
+
+%ifarch x32
+%{__sed} -i -e 's/test "\?x\?\$cross_compiling"\? = "\?x\?yes"\?/true/' configure.ac
%endif
%build
%{__autoheader}
%{__automake}
%configure \
+%ifarch x32
+ RUST_TARGET=x86_64-unknown-linux-gnux32 \
+%endif
%{__enable_disable apidocs gtk-doc} \
--enable-introspection \
--disable-silent-rules \