From feab09f72abc6d6eec16a1b8d27c231c747c0e00 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 2 Oct 2021 21:39:26 -0400 Subject: gnu: gtk: Replace gdk-pixbuf+svg by librsvg. With the addition of a profile hook for computing the gdk-pixbuf loaders cache file, there is no longer a need for gdk-pixbuf+svg, and librsvg can propagate gdk-pixbuf without fear, so replace the former for the latter. The replacement was automated with the following command: $ git grep -l ',gdk-pixbuf+svg)' \ | xargs sed 's/(".*" ,gdk-pixbuf+svg)/("librsvg" ,librsvg)/' -i * gnu/packages/gtk.scm (gdk-pixbuf+svg): Delete package. (gtk+-2)[propagated-inputs]: Replace gdk-pixbuf+svg with librsvg. (gtk+)[propagated-inputs]: Likewise. * gnu/packages/gnome.scm (gdk-pixbuf+svg): Add deprecated package. --- gnu/packages/gtk.scm | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) (limited to 'gnu/packages/gtk.scm') diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 005d2b8399..b199032f15 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -712,35 +712,6 @@ scaled, composited, modified, saved, or rendered.") (home-page "https://wiki.gnome.org/Projects/GdkPixbuf") (license license:lgpl2.1+))) -;; To build gdk-pixbuf with SVG support, we need librsvg, and librsvg depends -;; on gdk-pixbuf, so this new variable. Also, librsvg adds 90MiB to the -;; closure size. -(define-public gdk-pixbuf+svg - (package/inherit gdk-pixbuf - (name "gdk-pixbuf+svg") - (inputs - `(("librsvg" ,librsvg) - ,@(package-inputs gdk-pixbuf))) - (arguments - (substitute-keyword-arguments (package-arguments gdk-pixbuf) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'install 'register-svg-loader - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (librsvg (assoc-ref inputs "librsvg")) - (loaders - (append - (find-files out "^libpixbufloader-.*\\.so$") - (find-files librsvg "^libpixbufloader-.*\\.so$"))) - (gdk-pixbuf-query-loaders - (string-append out "/bin/gdk-pixbuf-query-loaders"))) - (apply invoke - gdk-pixbuf-query-loaders - "--update-cache" - loaders)))))))) - (synopsis "Image loading library, with SVG support"))) - ;;; A minimal variant used to prevent a cycle with Inkscape. (define-public at-spi2-core-minimal (hidden-package @@ -901,7 +872,7 @@ is part of the GNOME accessibility project.") ;; Rust is not supported well on every architecture yet. ("gdk-pixbuf" ,(if (string-prefix? "x86_64" (or (%current-target-system) (%current-system))) - gdk-pixbuf+svg + librsvg gdk-pixbuf)) ("glib" ,glib) ("pango" ,pango))) @@ -1003,7 +974,7 @@ application suites.") ;; SVG support is optional and requires librsvg, which pulls in rust. ;; Rust is not supported well on every architecture yet. ("gdk-pixbuf" ,(if (target-x86-64?) - gdk-pixbuf+svg + librsvg gdk-pixbuf)) ("glib" ,glib) ("libcloudproviders" ,libcloudproviders-minimal) @@ -1263,7 +1234,7 @@ application suites.") ;; Following dependencies are referenced in .pc files. `(("cairo" ,cairo) ("fontconfig" ,fontconfig) - ("gdk-pixbuf+svg" ,gdk-pixbuf+svg) + ("librsvg" ,librsvg) ("glib" ,glib) ("graphene" ,graphene) ("libepoxy" ,libepoxy) -- cgit v1.2.3