2022-11-21 19:45:13 +00:00
|
|
|
%bcond_without check
|
|
|
|
|
2018-01-24 22:25:58 +00:00
|
|
|
# https://github.com/rust-lang/rust/issues/47714
|
|
|
|
%undefine _strict_symbol_defs_build
|
|
|
|
|
|
|
|
# We want verbose builds
|
|
|
|
%global _configure_disable_silent_rules 1
|
|
|
|
|
2018-08-08 09:06:25 +00:00
|
|
|
# Use bundled deps as we don't ship the exact right versions for all the
|
|
|
|
# required rust libraries
|
2023-04-27 20:38:20 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
%global bundled_rust_deps 1
|
|
|
|
%else
|
2022-11-21 19:45:13 +00:00
|
|
|
%global bundled_rust_deps 0
|
2023-04-27 20:38:20 +00:00
|
|
|
%endif
|
2018-08-08 09:06:25 +00:00
|
|
|
|
2019-05-14 20:42:47 +00:00
|
|
|
%global cairo_version 1.16.0
|
2018-10-26 06:15:55 +00:00
|
|
|
|
2010-10-26 16:31:42 +00:00
|
|
|
Name: librsvg2
|
|
|
|
Summary: An SVG library based on cairo
|
2023-07-03 22:42:20 +00:00
|
|
|
Version: 2.56.90
|
2023-07-21 14:52:47 +00:00
|
|
|
Release: %autorelease
|
2010-03-30 01:33:51 +00:00
|
|
|
|
|
|
|
License: LGPLv2+
|
2015-02-16 15:53:24 +00:00
|
|
|
URL: https://wiki.gnome.org/Projects/LibRsvg
|
2023-03-29 10:38:02 +00:00
|
|
|
Source0: https://download.gnome.org/sources/librsvg/2.56/librsvg-%{version}.tar.xz
|
2023-04-27 20:38:20 +00:00
|
|
|
# upstream dropped vendoring since 2.55.0 (GNOME/librsvg#718), to create:
|
|
|
|
# tar xf librsvg-%%{version}.tar.xz ; pushd librsvg-%%{version} ; \
|
|
|
|
# cargo vendor && tar Jcvf ../librsvg-%%{version}-vendor.tar.xz vendor/ ; popd
|
|
|
|
Source1: librsvg-%{version}-vendor.tar.xz
|
2018-01-24 22:25:58 +00:00
|
|
|
|
2022-11-21 19:45:13 +00:00
|
|
|
%if ! 0%{?bundled_rust_deps}
|
|
|
|
# Patches to build with Fedora-packaged rust crates
|
2023-03-02 14:54:05 +00:00
|
|
|
Patch: 0001-Fedora-Drop-dependencies-required-for-benchmarking.patch
|
2022-11-21 19:45:13 +00:00
|
|
|
%endif
|
|
|
|
|
2018-08-08 09:09:27 +00:00
|
|
|
BuildRequires: chrpath
|
2018-01-24 22:25:58 +00:00
|
|
|
BuildRequires: gcc
|
2022-01-09 21:10:06 +00:00
|
|
|
BuildRequires: gi-docgen
|
2018-01-24 22:25:58 +00:00
|
|
|
BuildRequires: gobject-introspection-devel
|
2021-01-29 16:00:44 +00:00
|
|
|
BuildRequires: make
|
2018-10-26 06:15:55 +00:00
|
|
|
BuildRequires: pkgconfig(cairo) >= %{cairo_version}
|
2019-07-08 07:57:13 +00:00
|
|
|
BuildRequires: pkgconfig(cairo-gobject) >= %{cairo_version}
|
2018-10-26 06:15:55 +00:00
|
|
|
BuildRequires: pkgconfig(cairo-png) >= %{cairo_version}
|
2018-01-24 22:25:58 +00:00
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
2018-08-08 09:09:27 +00:00
|
|
|
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
|
|
|
|
BuildRequires: pkgconfig(gio-2.0)
|
|
|
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(gthread-2.0)
|
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
|
|
BuildRequires: pkgconfig(pangocairo)
|
|
|
|
BuildRequires: pkgconfig(pangoft2)
|
|
|
|
BuildRequires: vala
|
2022-01-09 21:10:06 +00:00
|
|
|
BuildRequires: /usr/bin/rst2man
|
2018-08-08 09:06:25 +00:00
|
|
|
%if 0%{?bundled_rust_deps}
|
2023-04-27 20:38:20 +00:00
|
|
|
BuildRequires: rust-toolset
|
2018-08-08 09:06:25 +00:00
|
|
|
%else
|
2018-01-24 22:25:58 +00:00
|
|
|
BuildRequires: rust-packaging
|
2018-08-08 09:06:25 +00:00
|
|
|
%endif
|
2004-09-09 07:40:29 +00:00
|
|
|
|
2019-07-08 07:57:13 +00:00
|
|
|
Requires: cairo%{?_isa} >= %{cairo_version}
|
|
|
|
Requires: cairo-gobject%{?_isa} >= %{cairo_version}
|
2023-07-24 15:15:25 +00:00
|
|
|
Requires: rsvg-pixbuf-loader
|
2014-10-13 19:11:37 +00:00
|
|
|
|
2004-09-09 07:40:29 +00:00
|
|
|
%description
|
2005-12-09 12:21:53 +00:00
|
|
|
An SVG library based on cairo.
|
2004-09-09 07:40:29 +00:00
|
|
|
|
|
|
|
%package devel
|
2010-03-30 01:33:51 +00:00
|
|
|
Summary: Libraries and include files for developing with librsvg
|
2014-09-14 10:34:39 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2004-09-09 07:40:29 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package provides the necessary development libraries and include
|
|
|
|
files to allow you to develop with librsvg.
|
|
|
|
|
2023-07-21 15:08:26 +00:00
|
|
|
%package -n rsvg-pixbuf-loader
|
|
|
|
Summary: SVG image loader for gdk-pixbuf
|
|
|
|
Requires: gdk-pixbuf2%{?_isa}
|
2023-07-21 21:26:52 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2023-07-21 15:08:26 +00:00
|
|
|
|
|
|
|
%description -n rsvg-pixbuf-loader
|
|
|
|
This package provides a gdk-pixbuf plugin for loading SVG images in GTK apps.
|
|
|
|
|
2013-05-11 19:43:35 +00:00
|
|
|
%package tools
|
|
|
|
Summary: Extra tools for librsvg
|
2014-09-14 10:34:39 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
2013-05-11 19:43:35 +00:00
|
|
|
|
|
|
|
%description tools
|
|
|
|
This package provides extra utilities based on the librsvg library.
|
|
|
|
|
2004-09-09 07:40:29 +00:00
|
|
|
%prep
|
2022-01-03 09:54:42 +00:00
|
|
|
%autosetup -n librsvg-%{version} -p1
|
2018-08-08 09:06:25 +00:00
|
|
|
%if 0%{?bundled_rust_deps}
|
2018-08-08 10:01:20 +00:00
|
|
|
# Use the bundled deps
|
2023-08-01 18:23:53 +00:00
|
|
|
sed -i Makefile.am -e 's/-Z unstable-options//'
|
2023-04-27 20:38:20 +00:00
|
|
|
%cargo_prep -V 1
|
2018-08-08 09:06:25 +00:00
|
|
|
%else
|
2018-01-24 22:25:58 +00:00
|
|
|
# No bundled deps
|
2019-02-19 06:29:08 +00:00
|
|
|
rm -vrf vendor .cargo Cargo.lock
|
2022-11-21 19:45:13 +00:00
|
|
|
sed -i Makefile.am -e 's/$(CARGO) --locked/$(CARGO)/'
|
2022-08-28 14:22:47 +00:00
|
|
|
%cargo_prep
|
2018-08-08 09:06:25 +00:00
|
|
|
%endif
|
2004-09-09 07:40:29 +00:00
|
|
|
|
2020-02-23 07:32:32 +00:00
|
|
|
%if ! 0%{?bundled_rust_deps}
|
|
|
|
%generate_buildrequires
|
2022-08-28 14:22:47 +00:00
|
|
|
%cargo_generate_buildrequires
|
2020-02-23 07:32:32 +00:00
|
|
|
%endif
|
|
|
|
|
2004-09-09 07:40:29 +00:00
|
|
|
%build
|
2022-11-21 19:45:13 +00:00
|
|
|
export CARGO="%__cargo"
|
2010-10-26 16:31:42 +00:00
|
|
|
%configure --disable-static \
|
2022-05-13 08:50:10 +00:00
|
|
|
--enable-gtk-doc \
|
2022-01-09 21:10:06 +00:00
|
|
|
--docdir=%{_pkgdocdir} \
|
2018-06-24 11:35:29 +00:00
|
|
|
--enable-introspection \
|
|
|
|
--enable-vala
|
2018-01-24 22:25:58 +00:00
|
|
|
%make_build
|
2004-09-09 07:40:29 +00:00
|
|
|
|
|
|
|
%install
|
2014-10-13 19:14:50 +00:00
|
|
|
%make_install
|
2018-01-24 22:25:58 +00:00
|
|
|
find %{buildroot} -type f -name '*.la' -print -delete
|
2004-09-09 07:40:58 +00:00
|
|
|
|
2017-04-11 12:10:41 +00:00
|
|
|
# Remove lib64 rpaths
|
2018-01-24 22:25:58 +00:00
|
|
|
chrpath --delete %{buildroot}%{_bindir}/rsvg-convert
|
|
|
|
chrpath --delete %{buildroot}%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-svg.so
|
2017-04-11 12:10:41 +00:00
|
|
|
|
2022-01-09 21:10:06 +00:00
|
|
|
# Not useful in this package.
|
|
|
|
rm -f %{buildroot}%{_pkgdocdir}/COMPILING.md
|
2018-01-27 10:40:29 +00:00
|
|
|
|
2023-08-01 09:57:39 +00:00
|
|
|
%if %{with check}
|
|
|
|
%ifnarch s390x
|
|
|
|
%check
|
|
|
|
%make_build check
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2021-10-05 18:30:10 +00:00
|
|
|
%files
|
2023-03-29 10:38:02 +00:00
|
|
|
%doc code-of-conduct.md NEWS README.md
|
2019-10-23 22:15:18 +00:00
|
|
|
%license COPYING.LIB
|
2010-06-11 13:13:30 +00:00
|
|
|
%{_libdir}/librsvg-2.so.*
|
2018-01-24 22:25:58 +00:00
|
|
|
%dir %{_libdir}/girepository-1.0
|
|
|
|
%{_libdir}/girepository-1.0/Rsvg-2.0.typelib
|
2017-04-11 12:10:18 +00:00
|
|
|
%dir %{_datadir}/thumbnailers
|
|
|
|
%{_datadir}/thumbnailers/librsvg.thumbnailer
|
2004-09-09 07:40:29 +00:00
|
|
|
|
|
|
|
%files devel
|
2010-06-11 13:13:30 +00:00
|
|
|
%{_libdir}/librsvg-2.so
|
2018-01-24 22:25:58 +00:00
|
|
|
%{_includedir}/librsvg-2.0/
|
2004-09-09 07:40:29 +00:00
|
|
|
%{_libdir}/pkgconfig/librsvg-2.0.pc
|
2018-01-24 22:25:58 +00:00
|
|
|
%dir %{_datadir}/gir-1.0
|
|
|
|
%{_datadir}/gir-1.0/Rsvg-2.0.gir
|
2012-09-22 22:18:35 +00:00
|
|
|
%dir %{_datadir}/vala
|
|
|
|
%dir %{_datadir}/vala/vapi
|
|
|
|
%{_datadir}/vala/vapi/librsvg-2.0.vapi
|
2022-05-15 09:41:34 +00:00
|
|
|
%{_docdir}/Rsvg-2.0
|
2010-06-11 13:13:30 +00:00
|
|
|
|
2023-07-21 15:08:26 +00:00
|
|
|
%files -n rsvg-pixbuf-loader
|
|
|
|
%{_libdir}/gdk-pixbuf-2.0/*/loaders/libpixbufloader-svg.so
|
|
|
|
|
2013-05-11 19:43:35 +00:00
|
|
|
%files tools
|
|
|
|
%{_bindir}/rsvg-convert
|
|
|
|
%{_mandir}/man1/rsvg-convert.1*
|
|
|
|
|
2004-09-09 07:40:29 +00:00
|
|
|
%changelog
|
2023-07-21 14:52:47 +00:00
|
|
|
%autochangelog
|