diff mbox series

[bug#42958,core-updates,12/29] gnu: gdk-pixbuf: Update package definition.

Message ID 20200820151050.9529-12-dannym@scratchpost.org
State Accepted
Headers show
Series Big changes from wip-desktop. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Danny Milosavljevic Aug. 20, 2020, 3:10 p.m. UTC
From: Raghav Gururajan <raghavgururajan@disroot.org>

* gnu/packages/gtk.scm (gdk-pixbuf): Update package definition.
[arguments]<#:glib-or-gtk?>: New argument.
<#:configure-flags>[-Djasper]: New flag.
<#:phases>['patch-docbook]: New phase.
['disable-failing-tests]: Remove phase.
[native-inputs]: Add docbook-xml, docbook-xsl, perl and libxslt.
[inputs]: Add jasper and libpng. Remove libx11.
[propagated-inputs]: Add libx11. Remove libpng.
[synopsis]: Modify.
[description]: Modify.
[home-page]: Modify.
[license]: Update to lgpl2.1+.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
 gnu/packages/gtk.scm | 114 ++++++++++++++++++++++---------------------
 1 file changed, 58 insertions(+), 56 deletions(-)

Comments

Danny Milosavljevic Aug. 24, 2020, 12:19 a.m. UTC | #1
Should be "/xml/xsl/docbook-xsl-1.79.2/" instead of "/xml/xsl/docbook-xsl-1.79.1/", otherwise fails with:

FAILED: docs/gdk-pixbuf-csource.1 

/gnu/store/8mcjhrc6yir9gzrp0y71nj254giw75bd-libxslt-1.1.34/bin/xsltproc --nonet --stringparam man.output.quietly 1 --stringparam funcsynopsis.style ansi --stringparam man.th.extra1.suppress 1 --stringparam man.authors.section.enabled 0 --stringparam man.copyright.section.enabled 0 -o docs/gdk-pixbuf-csource.1 /gnu/store/6jxdry6q9yj4rw7ska0aniqjf42b6ply-docbook-xsl-1.79.2/xml/xsl/docbook-xsl-1.79.1/manpages/docbook.xsl ../gdk-pixbuf-2.40.0/docs/gdk-pixbuf-csource.xml
warning: failed to load external entity "/gnu/store/6jxdry6q9yj4rw7ska0aniqjf42b6ply-docbook-xsl-1.79.2/xml/xsl/docbook-xsl-1.79.1/manpages/docbook.xsl"
cannot parse /gnu/store/6jxdry6q9yj4rw7ska0aniqjf42b6ply-docbook-xsl-1.79.2/xml/xsl/docbook-xsl-1.79.1/manpages/docbook.xsl
[4/152] Compiling C object 'gdk-pixbuf/pixops/a255f19@@timescale@exe/timescale.c.o'.
[5/152] Generating gdk-pixbuf-enum-types.h with a meson_exe.py custom command.
[6/152] Compiling C object 'gdk-pixbuf/pixops/a255f19@@pixops@sta/pixops.c.o'.
ninja: build stopped: subcommand failed.
command "ninja" "-j" "4" failed with status 1
builder for `/gnu/store/8j55f3i81w274iif5pnsbyxp170s9814-gdk-pixbuf-2.40.0.drv' failed with exit code 1
build of /gnu/store/8j55f3i81w274iif5pnsbyxp170s9814-gdk-pixbuf-2.40.0.drv failed
View build log at '/var/log/guix/drvs/8j/55f3i81w274iif5pnsbyxp170s9814-gdk-pixbuf-2.40.0.drv.bz2'.
guix build: error: build of `/gnu/store/8j55f3i81w274iif5pnsbyxp170s9814-gdk-pixbuf-2.40.0.drv' failed
diff mbox series

Patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index c7bc9cf1a4..9af6e73e8a 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -491,63 +491,65 @@  highlighting and other features typical of a source code editor.")
 
 (define-public gdk-pixbuf
   (package
-   (name "gdk-pixbuf")
-   (version "2.40.0")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://gnome/sources/" name "/"
-                                (version-major+minor version)  "/"
-                                name "-" version ".tar.xz"))
-            (sha256
-             (base32
-              "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
-   (build-system meson-build-system)
-   (arguments
-    `(#:configure-flags '("-Dinstalled_tests=false")
-      #:phases
-      (modify-phases %standard-phases
-        (add-after
-         'unpack 'disable-failing-tests
-         (lambda _
-           (substitute* "tests/meson.build"
-             ;; XXX FIXME: This test fails on armhf machines with:
-             ;; SKIP Not enough memory to load bitmap image
-             ;; ERROR: cve-2015-4491 - too few tests run (expected 4, got 2)
-             ((".*'cve-2015-4491'.*") "")
-             ;; XXX FIXME: This test fails with:
-             ;; ERROR:pixbuf-jpeg.c:74:test_type9_rotation_exif_tag:
-             ;; assertion failed (error == NULL): Data differ
-             ;; (gdk-pixbuf-error-quark, 0)
-             ((".*'pixbuf-jpeg'.*") ""))
-           #t))
-        ;; The slow tests take longer than the specified timeout.
-        ,@(if (any (cute string=? <> (%current-system))
-                   '("armhf-linux" "aarch64-linux"))
-            '((replace 'check
-              (lambda _
-                (invoke "meson" "test" "--timeout-multiplier" "5"))))
-            '()))))
-   (propagated-inputs
-    `(;; Required by gdk-pixbuf-2.0.pc
-      ("glib" ,glib)
-      ("libpng" ,libpng)
-      ;; Used for testing and required at runtime.
-      ("shared-mime-info" ,shared-mime-info)))
-   (inputs
-    `(("libjpeg" ,libjpeg-turbo)
-      ("libtiff" ,libtiff)
-      ("libx11"  ,libx11)))
-   (native-inputs
-     `(("pkg-config" ,pkg-config)
+    (name "gdk-pixbuf")
+    (version "2.40.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://gnome/sources/" name "/"
+                       (version-major+minor version)  "/"
+                       name "-" version ".tar.xz"))
+       (sha256
+        (base32 "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+       #:configure-flags
+       (list
+        "-Djasper=true"
+        "-Dinstalled_tests=false")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-docbook
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs"
+               (substitute* "meson.build"
+                 (("http://docbook.sourceforge.net/release/xsl/current/")
+                  (string-append (assoc-ref inputs "docbook-xsl")
+                                 "/xml/xsl/docbook-xsl-1.79.1/")))
+               (substitute* '("gdk-pixbuf-csource.xml"
+                              "gdk-pixbuf-from-drawables.xml"
+                              "gdk-pixbuf-query-loaders.xml"
+                              "gdk-pixbuf-rendering.xml" "gdk-pixbuf.xml")
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/"))))
+             #t)))))
+    (native-inputs
+     `(("docbook-xml" ,docbook-xml-4.3)
+       ("docbook-xsl" ,docbook-xsl)
        ("gettext" ,gettext-minimal)
-       ("glib" ,glib "bin")                               ; glib-mkenums, etc.
-       ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc.
-   (synopsis "GNOME image loading and manipulation library")
-   (description
-    "GdkPixbuf is a library for image loading and manipulation developed
-in the GNOME project.")
-   (license license:lgpl2.0+)
-   (home-page "https://developer.gnome.org/gdk-pixbuf/")))
+       ("glib:bin" ,glib "bin")
+       ("gobject-introspection" ,gobject-introspection)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("xsltproc" ,libxslt)))
+    (inputs
+     `(("jasper" ,jasper)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("libtiff" ,libtiff)))
+    (propagated-inputs
+     `(("glib" ,glib)
+       ("libx11"  ,libx11)
+       ("shared-mime-info" ,shared-mime-info)))
+    (synopsis "Image loading library")
+    (description "GdkPixbuf is a library that loads image data in various
+formats and stores it as linear buffers in memory.  The buffers can then be
+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 varibale.  Also, librsvg adds 90MiB to the