diff options
author | 宋文武 <[email protected]> | 2025-01-10 11:36:51 +0800 |
---|---|---|
committer | 宋文武 <[email protected]> | 2025-01-10 11:36:51 +0800 |
commit | 3104c70faea7d5ef84d9423434d77abf69ccd4a0 (patch) | |
tree | 635274e23f41f45f9ad6b1f5a4f3472f1d8cf7b1 /gnu/packages/gtk.scm | |
parent | 4c8ea86e8ce2f3a197c8ac53ffb4ff7b82246e45 (diff) |
gnu: perl-gtk2: Fix tests.
This fixes <https://issues.guix.gnu.org/75471>.
* gnu/packages/gtk.scm (perl-gtk2)[inputs]: Add gdk-pixbuf.
[arguments]: Set GDK_PIXBUF_MODULE_FILE in 'fix-tests phase.
Change-Id: Ic5013d66d5b5eefa59e156f0d48dfc113237de14
Diffstat (limited to 'gnu/packages/gtk.scm')
-rw-r--r-- | gnu/packages/gtk.scm | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index ef1391e8ba..7ed7d7b7df 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -2125,19 +2125,24 @@ so that they can be used normally in signals and properties.") (native-inputs (list perl-extutils-depends perl-extutils-pkgconfig pkg-config)) (inputs - (list gtk+-2)) + (list gtk+-2 gdk-pixbuf)) (propagated-inputs (list perl-pango)) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'remove-broken-test - ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3. - (lambda _ - (substitute* "t/GdkPixbuf.t" - (("tests => 112") "tests => 111") - (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);") - "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'fix-tests + (lambda _ + ;; XXX: by default it uses 'loaders.cache' from librsvg, which supports SVG only. + (setenv "GDK_PIXBUF_MODULE_FILE" + (string-append #$(this-package-input "gdk-pixbuf") + "/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")) + ;; See https://gitlab.gnome.org/GNOME/perl-gtk2/issues/3. + (substitute* "t/GdkPixbuf.t" + (("tests => 112") "tests => 111") + (("ok \\(defined \\$pixbuf, \"Don't crash on partial pixmap data\"\\);") + "# ok (defined $pixbuf, \"Don't crash on partial pixmap data\");"))))))) (home-page "https://metacpan.org/release/Gtk2") (synopsis "Perl interface to the 2.x series of the Gimp Toolkit library") (description "Perl bindings to the 2.x series of the Gtk+ widget set. |