From cffe17c384893d2a43156ebf0cc5780d6ccf2123 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 21 Jul 2020 03:45:21 -0400 Subject: [PATCH 11/36] gnu: gegl: Update package definition. * gnu/packages/gimp.scm (gegl): Update package definition. [source][patches]: Add gegl-mrg.patch. [outputs]: New output "doc". [arguments]<#:configure-flags>[-Dintrospection]: Remove flag. [-Ddocs]: New flag. [-Dworkshop]: New flag. [-Dsdl1]: New flag. <#:phases>['patch-docbook-xml]: New phase. ['move-doc]: New phase. [native-inputs]: Add asciidoc, docbook-xml, docbook-xsl, enscript, gobject-introspection, gtk-doc, perl, python-pygobject, python-wrapper, ruby and vala. [inputs]: Add exiv2, gdk-pixbuf+svg, gexiv2, jasper, lcms, lensfun, ffmpeg, libnsgif, libraw, librsvg, libspiro, libtiff, lua, luajit, mrg, openexr, poly2tri-c, poppler, sdl, sdl2, suitesparse, v4l-utils and libwebp. [synopsis]: Modify. [description]: Modify. [license]: Remove gpl3+. * gnu/packages/patches/gegl-mrg.patch: New file. * gnu/local.mk (gegl-mrg.patch): New reference. --- gnu/local.mk | 1 + gnu/packages/gimp.scm | 134 +++++++++++++++++++++------- gnu/packages/patches/gegl-mrg.patch | 89 ++++++++++++++++++ 3 files changed, 192 insertions(+), 32 deletions(-) create mode 100644 gnu/packages/patches/gegl-mrg.patch diff --git a/gnu/local.mk b/gnu/local.mk index a5a7125087..0c5be2fa22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -974,6 +974,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdb-hurd.patch \ %D%/packages/patches/gdm-default-session.patch \ + %D%/packages/patches/gegl-mrg.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm index a8f85ad264..bcb4679a83 100644 --- a/gnu/packages/gimp.scm +++ b/gnu/packages/gimp.scm @@ -35,8 +35,10 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages fontutils) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) @@ -45,13 +47,19 @@ #:use-module (gnu packages ghostscript) #:use-module (gnu packages compression) #:use-module (gnu packages xml) + #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages linux) #:use-module (gnu packages ncurses) #:use-module (gnu packages patchutils) + #:use-module (gnu packages perl) #:use-module (gnu packages pdf) #:use-module (gnu packages photo) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages python) #:use-module (gnu packages ruby) + #:use-module (gnu packages sdl) + #:use-module (gnu packages video) #:use-module (gnu packages w3m) #:use-module (gnu packages web) #:use-module (gnu packages xorg)) @@ -209,46 +217,108 @@ specific code paths.") (package (name "gegl") (version "0.4.24") - (source (origin - (method url-fetch) - (uri (list (string-append "https://download.gimp.org/pub/gegl/" - (string-take version 3) - "/gegl-" version ".tar.xz") - (string-append "https://ftp.gtk.org/pub/gegl/" - (version-major+minor version) - "/gegl-" version ".tar.xz") - (string-append "ftp://ftp.gtk.org/pub/gegl/" - (version-major+minor version) - "/gegl-" version ".tar.xz"))) - (sha256 - (base32 - "0ji57s7cba94vzy49agn7x47ca61rccm6rif0cb0s6rl4ygljrbp")))) + (source + (origin + (method url-fetch) + (uri + (list + (string-append "https://download.gimp.org/pub/gegl/" + (string-take version 3) + "/gegl-" version ".tar.xz") + (string-append "https://ftp.gtk.org/pub/gegl/" + (version-major+minor version) + "/gegl-" version ".tar.xz") + (string-append "ftp://ftp.gtk.org/pub/gegl/" + (version-major+minor version) + "/gegl-" version ".tar.xz"))) + (sha256 + (base32 "0ji57s7cba94vzy49agn7x47ca61rccm6rif0cb0s6rl4ygljrbp")) + (patches + ;; Fix for the bug, + ;; https://gitlab.gnome.org/GNOME/gegl/-/issues/259 + (search-patches "gegl-mrg.patch")))) (build-system meson-build-system) + (outputs '("out" "doc")) (arguments `(#:configure-flags - (list "-Dintrospection=false"))) - ;; These are propagated to satisfy 'gegl-0.4.pc'. + (list + "-Ddocs=true" + "-Dworkshop=true" + "-Dsdl1=auto") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs" + (substitute* "gegl-docs.xml" + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out "/share/gtk-doc") + (string-append doc "/share/gtk-doc")) + #t)))))) + (native-inputs + `(("asciidoc" ,asciidoc) + ("docbook-xml" ,docbook-xml-4.3) + ("docbook-xsl" ,docbook-xsl) + ("enscript" ,enscript) + ("glib" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) + ("intltool" ,intltool) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("pygobject" ,python-pygobject) + ("python" ,python-wrapper) + ("ruby" ,ruby) + ("vapigen" ,vala))) + (inputs + `(("cairo" ,cairo) + ("exiv2" ,exiv2) + ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("gexiv2" ,gexiv2) + ("jasper" ,jasper) + ("lcms" ,lcms) + ("lensfun" ,lensfun) + ("libav" ,ffmpeg) + ("libnsgif" ,libnsgif) + ("libpng" ,libpng) + ("libjpeg" ,libjpeg-turbo) + ("libraw" ,libraw) + ("librsvg" ,librsvg) + ("libspiro" ,libspiro) + ("libtiff" ,libtiff) + ("lua" ,lua) + ("luajit" ,luajit) + ("mrg" ,mrg) + ("openexr" ,openexr) + ("pango" ,pango) + ;; To be enabled after upstream fixes the bug, + ;; https://gitlab.gnome.org/GNOME/gegl/-/issues/258 + ;; ("poly2tri-c" ,poly2tri-c) + ("poppler" ,poppler) + ("sdl1" ,sdl) + ("sdl2" ,sdl2) + ("umfpack" ,suitesparse) + ("v4l" ,v4l-utils) + ("webp" ,libwebp))) (propagated-inputs `(("babl" ,babl) ("glib" ,glib) ("json-glib" ,json-glib))) - (inputs - `(("cairo" ,cairo) - ("pango" ,pango) - ("libpng" ,libpng) - ("libjpeg" ,libjpeg-turbo))) - (native-inputs - `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") ; for gtester - ("intltool" ,intltool))) + (synopsis "Generic Graphics Library") + (description "GEGL is a data flow based image processing framework, +providing floating point processing and non-destructive image processing +capabilities to GNU Image Manipulation Program and other projects.") (home-page "http://gegl.org") - (synopsis "Graph based image processing framework") - (description "GEGL (Generic Graphics Library) provides infrastructure to -do demand based cached non destructive image editing on larger than RAM -buffers.") - ;; The library itself is licensed under LGPL while the sample commandline - ;; application and GUI binary gegl is licensed under GPL. - (license (list license:lgpl3+ license:gpl3+)))) + (license license:lgpl3+))) (define-public gimp (package diff --git a/gnu/packages/patches/gegl-mrg.patch b/gnu/packages/patches/gegl-mrg.patch new file mode 100644 index 0000000000..15603cd9ad --- /dev/null +++ b/gnu/packages/patches/gegl-mrg.patch @@ -0,0 +1,89 @@ +From 1cc5a08d7860fa9cbd22a469e2d270533e689f23 Mon Sep 17 00:00:00 2001 +From: Raghav Gururajan +Date: Tue, 21 Jul 2020 02:57:39 -0400 +Subject: [PATCH] Fix build with mrg. + +--- + bin/argvs.c | 4 ++-- + bin/mrg-gegl.c | 2 +- + bin/ui-collection.c | 4 ++-- + bin/ui-core.c | 4 ++-- + bin/ui-viewer.c | 4 ++-- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/bin/argvs.c b/bin/argvs.c +index 254b754a0..300370d5c 100644 +--- a/bin/argvs.c ++++ b/bin/argvs.c +@@ -25,8 +25,8 @@ + + + #ifdef MRG_PRINTF +-#include +-#include ++#include ++#include + extern Mrg *mrg; + extern MrgList *scrollback; + extern int use_ui; +diff --git a/bin/mrg-gegl.c b/bin/mrg-gegl.c +index dd0e55686..ffdbb5ee8 100644 +--- a/bin/mrg-gegl.c ++++ b/bin/mrg-gegl.c +@@ -36,7 +36,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/bin/ui-collection.c b/bin/ui-collection.c +index 671d2dc1f..eee0b0925 100644 +--- a/bin/ui-collection.c ++++ b/bin/ui-collection.c +@@ -25,8 +25,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + #include + #include +diff --git a/bin/ui-core.c b/bin/ui-core.c +index 16dec03af..6350b4cba 100644 +--- a/bin/ui-core.c ++++ b/bin/ui-core.c +@@ -107,8 +107,8 @@ const char *css = + #include + #include + #include +-#include +-#include ++#include ++#include + #include + #include + #include +diff --git a/bin/ui-viewer.c b/bin/ui-viewer.c +index 4a70a4518..9468a246b 100644 +--- a/bin/ui-viewer.c ++++ b/bin/ui-viewer.c +@@ -24,8 +24,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + #include + #include +-- +GitLab + -- 2.27.0