From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sAc+Mk5/s14dPgAA0tVLHw (envelope-from ) for ; Thu, 07 May 2020 03:23:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2PsqM1p/s164OgAAbx9fmQ (envelope-from ) for ; Thu, 07 May 2020 03:24:10 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B89F940068 for ; Thu, 7 May 2020 03:24:07 +0000 (UTC) Received: from localhost ([::1]:33958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWX8o-0004Rt-Hb for larch@yhetil.org; Wed, 06 May 2020 23:24:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWX8k-0004Rj-Pg for guix-patches@gnu.org; Wed, 06 May 2020 23:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWX8k-0002wJ-Er for guix-patches@gnu.org; Wed, 06 May 2020 23:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jWX8k-0007QR-9s for guix-patches@gnu.org; Wed, 06 May 2020 23:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41118] [PATCH] gnu: inkscape: Update to 1.0. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 May 2020 03:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41118 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41118@debbugs.gnu.org Cc: Leo Famulari X-Debbugs-Original-To: guix-patches Received: via spool by submit@debbugs.gnu.org id=B.158882182628516 (code B ref -1); Thu, 07 May 2020 03:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 May 2020 03:23:46 +0000 Received: from localhost ([127.0.0.1]:41694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWX8L-0007Pi-Lx for submit@debbugs.gnu.org; Wed, 06 May 2020 23:23:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:39238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWX8D-0007PN-17 for submit@debbugs.gnu.org; Wed, 06 May 2020 23:23:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWX8C-0004QP-QL for guix-patches@gnu.org; Wed, 06 May 2020 23:23:28 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:45403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jWX88-0002qb-8A for guix-patches@gnu.org; Wed, 06 May 2020 23:23:28 -0400 Received: by mail-qk1-x72e.google.com with SMTP id c64so4570343qkf.12 for ; Wed, 06 May 2020 20:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version; bh=yF4jdVb539q5JDKFJZ1R4WUWGLYZxBMezD3uWcyCIL4=; b=PxBPG9SDWaM+Ms1gqb17+BqLubXYMGqUN1kFhXsTQV0beJ2+OT7bg4jsy9hQh5hnpj 5Wt6YY9LQMeyLNjC+SYzMbNVz/jNG1Jt3GJ33IfgL6SD3w9qVo2okNt978NM65v680q2 VSNGvPCWWsmS7jSw0FDN4C74SJS3imltRxwBnBc9WVpUWikfrhGed7FSekyUCTgEbP7p XVERGk6J9VNGotwayNpDGwDH9Jd3GY12g7zeOlAR5uPDZcjgC16ARDCdOH4pj39uHtwl L8jZ7XSHbXyKV3L38xvGdeqcQQwj2VrSG17UuBP8RBc2KI5XrLX22bn6tG641+bwvMnO IEhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=yF4jdVb539q5JDKFJZ1R4WUWGLYZxBMezD3uWcyCIL4=; b=MTq/5oYp1lRmsxwuJwulNVRxIzkGwgxXIB9CLcExEQVCpX9CtLaORaNaJVnqXRBRyX PvzavAQ0GuMmXWSVgUMLqZIdDkpvrPPUMjvj0E7F+qwIiuoxkgEVU5tnVxTf4osDY4L3 kBUcmw9pA0DKP+M2/8yUSm54f2SQB6w3xRXLGDKjKDxatgcsAIarnuimkNCPE6rKUA5u pDRQqNhHdPVfKWIfOp6G3nN+OqcbQXOMTHSrL7cfYdlnz5Mi/MjtJL6B4GcE6kiz1V7Z bbyCv9/EPf0HNGFp0wNd1tWmY5XsgO0FrveFEEge9cKZPl5Ir72EOvxbxhlyFIjUAFjA XiuQ== X-Gm-Message-State: AGi0PuYDVbE5W3MZtNdz6c79f9XEHK38ehT0z8FP3QbqXVR+A8ULjVSz eB0WfY+fQD0Akg159gJsky9cB+IN X-Google-Smtp-Source: APiQypIlkBLrwRf1+YDWqMYuqFHGm+QQB/hA8V/guhuLUxeqbaGneexL6+m6pUfyP0+SKQGMkpAfPw== X-Received: by 2002:a37:7b01:: with SMTP id w1mr12938099qkc.167.1588821802903; Wed, 06 May 2020 20:23:22 -0700 (PDT) Received: from hurd (dsl-236-123-224.b2b2c.ca. [207.236.123.224]) by smtp.gmail.com with ESMTPSA id 62sm120401qkh.113.2020.05.06.20.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 20:23:21 -0700 (PDT) From: Maxim Cournoyer Date: Wed, 06 May 2020 23:23:10 -0400 Message-ID: <87y2q41l9d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.0 (/) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=PxBPG9SD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [-2.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49756347935255]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[gmail.com:s=20161025]; HAS_ATTACHMENT(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.11), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DKIM_TRACE(0.00)[gmail.com:-]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; SIGNED_PGP(-2.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:+,5:+,6:+,7:+,8:+,9:+,10:+,11:+,12:+,13:+,14:+,15:+,16:+,17:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[maximcournoyer@gmail.com,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[gitlab.com:url,mdc-berlin.de:email,fastmail.com:email,launchpad.net:url,mykolab.com:email,fsf.org:email,brendan.scot:email,asu.edu:email,gnu.org:url,tobias.gr:email,nicolasgoaziou.fr:email,vkten.in:email,pstoedit.net:url,johanneskopf.de:url,gnome.org:url,libpng.org:url,inkscape.org:url,elephly.net:email,autogen.sh:url,posteo.net:email,vurv.cz:email,disroot.org:email,autistici.org:email,hypermove.net:email,kadziolka.net:email]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain,text/x-patch]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[11]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : SPF not aligned (relaxed),none] X-TUID: /PJAHUZFwbzB --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello! The following updates Inkscape to its 1.0 version. The test suite is enabled and an effort is made to unbundle as much of 3rd party libraries as possible (but more can be done, if you'd like to help: see the comments in the patch). The last patch of the series (Add libdepixelize) is added as a WIP, and is included as a curiosity only (not intended to be merged in its current state). Enjoy! Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-libsoup-Add-the-missing-PHP-dependency.patch Content-Transfer-Encoding: quoted-printable From=2000421dc8f22a84260ade4cccec9d0a27b532f9ca Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 8 Jan 2020 21:56:33 -0500 Subject: [PATCH 01/14] gnu: libsoup: Add the missing PHP dependency. * gnu/packages/gnome.scm (libsoup)[native-inputs]: Add php. =2D-- gnu/packages/gnome.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index b07c2dbb05..d768a0a348 100644 =2D-- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -141,6 +141,7 @@ #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages photo) + #:use-module (gnu packages php) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) #:use-module (gnu packages popt) @@ -3702,8 +3703,7 @@ libxml to ease remote use of the RESTful API.") ("pkg-config" ,pkg-config) ("python" ,python-wrapper) ("vala" ,vala) =2D ;; These are needed for the tests. =2D ;; FIXME: Add PHP once available. + ("php" ,php) ("curl" ,curl) ("gnutls" ,gnutls) ;for 'certtool' ("httpd" ,httpd))) =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-Add-libsoup-minimal.patch Content-Transfer-Encoding: quoted-printable From=20989b4169c38751e3056e0dad3e571e9939aa5bf8 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 8 Jan 2020 21:57:33 -0500 Subject: [PATCH 02/14] gnu: Add libsoup-minimal. * gnu/packages/gnome.scm (libsoup-minimal): New variable. =2D-- gnu/packages/gnome.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d768a0a348..f252fac978 100644 =2D-- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -179,6 +179,7 @@ #:use-module (gnu packages xml) #:use-module (gnu packages xorg) #:use-module (gnu artwork) + #:use-module ((guix build utils) #:select (modify-phases)) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system glib-or-gtk) @@ -3725,6 +3726,22 @@ libxml to ease remote use of the RESTful API.") and the GLib main loop, to integrate well with GNOME applications.") (license license:lgpl2.0+))) =20 + +;;; A minimal version of libsoup used to prevent a cycle with Inkscape. +(define-public libsoup-minimal + (package + (inherit libsoup) + (name "libsoup-minimal") + (outputs (delete "doc" (package-outputs libsoup))) + (arguments + (substitute-keyword-arguments (package-arguments libsoup) + ((#:configure-flags configure-flags) + `(delete "-Dgtk_doc=3Dtrue" ,configure-flags)) + ((#:phases phases) + `(modify-phases ,phases + (delete 'move-doc))))) + (native-inputs (alist-delete "gtk-doc" (package-native-inputs libsoup)= )))) + (define-public libsecret (package (name "libsecret") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0003-gnu-Add-at-spi2-atk-minimal.patch Content-Transfer-Encoding: quoted-printable From=200c935e1d6c6ecafc625f08537fd43a4fc32c5036 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 8 Jan 2020 23:18:17 -0500 Subject: [PATCH 03/14] gnu: Add at-spi2-atk-minimal. * gnu/packages/gtk.scm (at-spi2-atk-minimal): New variable. =2D-- gnu/packages/gtk.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index f375ca9b82..822177afb1 100644 =2D-- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -24,6 +24,7 @@ ;;; Copyright =C2=A9 2019 Giacomo Leidi ;;; Copyright =C2=A9 2020 Brendan Tildesley ;;; Copyright =C2=A9 2020 Guillaume Le Vaillant +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -650,6 +651,24 @@ is part of the GNOME accessibility project.") (license license:lgpl2.0+) (home-page "https://projects.gnome.org/accessibility/"))) =20 +;;; A minimal variant used to prevent a cycle with Inkscape. +(define at-spi2-core-minimal + (package + (inherit at-spi2-core) + (name "at-spi2-core-minimal") + (outputs (delete "doc" (package-outputs at-spi2-core))) + (arguments + (substitute-keyword-arguments (package-arguments at-spi2-core) + ((#:configure-flags configure-flags) + `(delete "-Ddocs=3Dtrue" ,configure-flags)) + ((#:phases phases) + `(modify-phases ,phases + (delete 'set-documentation-path) + (delete 'prepare-doc-directory) + (delete 'move-documentation))))) + (native-inputs + (alist-delete "gtk-doc" (package-native-inputs at-spi2-core))))) + (define-public at-spi2-atk (package (name "at-spi2-atk") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-at-spi2-atk-Use-at-spi2-core-minimal-to-break-a-.patch Content-Transfer-Encoding: quoted-printable From=20444a257bffe92af6cdc6c371f21a7a9cf2a11d98 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 8 Jan 2020 23:19:09 -0500 Subject: [PATCH 04/14] gnu: at-spi2-atk: Use at-spi2-core-minimal to break a cycle. This breaks a cycle between Inkscape 1.0 and gtk+. * gnu/packages/gtk.scm (at-spi2-atk)[propagated-inputs]: Replace at-spi2-co= re by its minimal variant. =2D-- gnu/packages/gtk.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 822177afb1..930cbf11d3 100644 =2D-- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -691,7 +691,7 @@ is part of the GNOME accessibility project.") (setenv "DBUS_FATAL_WARNINGS" "0") (invoke "dbus-launch" "meson" "test")))))) (propagated-inputs =2D `(("at-spi2-core" ,at-spi2-core))) ; required by atk-bridge-2.0.pc + `(("at-spi2-core" ,at-spi2-core-minimal))) ; required by atk-bridge-2.= 0.pc (inputs `(("atk" ,atk))) (native-inputs =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-Add-gdl.patch Content-Transfer-Encoding: quoted-printable From=20ea5b9fd34629b97e1ddbc8420bb04cd811eb6a17 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 9 Jan 2020 23:01:24 -0500 Subject: [PATCH 05/14] gnu: Add gdl. * gnu/packages/gnome.scm (gdl): New variable. =2D-- gnu/packages/gnome.scm | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index f252fac978..6ce08f2f2d 100644 =2D-- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1489,6 +1489,53 @@ accessing key stores. It also provides the viewer f= or crypto files on the GNOME Desktop.") (license license:lgpl2.1+))) =20 +(define-public gdl + (package + (name "gdl") + (version "3.34.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.gnome.org/GNOME/gdl.git") + (commit (string-append "GDL_" (string-map (match-lambda + (#\. #\_) + (c c)) + version))))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "154qcr0x6f68f4q526y87imv0rscmp34n47nk1pp82rsq52h2zna")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + ;; The autogen.sh script in gnome-common will run ./configure + ;; by default, which is problematic because source shebangs + ;; have not yet been patched. + (setenv "NOCONFIGURE" "t") + (invoke "sh" "autogen.sh")))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("glib" ,glib "bin") ; for glib-genmarshal, etc. + ("gnome-common" ,gnome-common) + ("gtk-doc" ,gtk-doc) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("libtool" ,libtool) + ("which" ,which))) + (inputs + `(("libxml2" ,libxml2))) + (propagated-inputs + ;; The gdl-3.0.pc file 'Requires' GTK+. + `(("gtk+" ,gtk+))) + (home-page "https://gitlab.gnome.org/GNOME/gdl/") + (synopsis "GNOME docking library") + (description "This library provides docking features for gtk+.") + (license license:lgpl2.1+))) + (define-public libgnome-keyring (package (name "libgnome-keyring") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-gdl-minimal.patch Content-Transfer-Encoding: quoted-printable From=2051b7cf2b908daf472d415a5417afd6e3e94f7e9e Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 9 Jan 2020 23:01:59 -0500 Subject: [PATCH 06/14] gnu: Add gdl-minimal. * gnu/packages/gnome.scm (gdl-minimal): New variable. =2D-- gnu/packages/gnome.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 6ce08f2f2d..1c5148cbaf 100644 =2D-- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1536,6 +1536,27 @@ GNOME Desktop.") (description "This library provides docking features for gtk+.") (license license:lgpl2.1+))) =20 +;;; A minimal variant used to break a cycle with Inkscape. +(define-public gdl-minimal + (package + (inherit gdl) + (name "gdl-minimal") + (arguments + (substitute-keyword-arguments (package-arguments gdl) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'disable-doc-generation + ;; XXX: There is no easy way to disable generating the + ;; documentation. + (lambda _ + (substitute* "configure.in" + (("GTK_DOC_CHECK.*") "") + (("docs/.*") "")) + (substitute* "Makefile.am" + (("gdl docs po") "gdl po")) + #t)))))) + (native-inputs (alist-delete "gtk-doc" (package-native-inputs gdl))))) + (define-public libgnome-keyring (package (name "libgnome-keyring") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0007-gnu-Add-lib2geom.patch Content-Transfer-Encoding: quoted-printable From=20b0bcda4147930348ff8c0321c062f8fca4d32b00 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 14 Jan 2020 23:20:31 -0500 Subject: [PATCH 07/14] gnu: Add lib2geom. * gnu/packages/graphics.scm (lib2geom): New variable. * gnu/packages/patches/lib2geom-enable-assertions.patch, lib2geom-link-tests-against-glib.patch, lib2geom-use-system-googletest.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new patches. =2D-- gnu/local.mk | 5 +- gnu/packages/graphics.scm | 79 ++++++++++++++++ .../patches/lib2geom-enable-assertions.patch | 36 +++++++ .../lib2geom-link-tests-against-glib.patch | 34 +++++++ .../lib2geom-use-system-googletest.patch | 94 +++++++++++++++++++ 5 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lib2geom-enable-assertions.patch create mode 100644 gnu/packages/patches/lib2geom-link-tests-against-glib.p= atch create mode 100644 gnu/packages/patches/lib2geom-use-system-googletest.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index be02f93ec7..ba9f9728b2 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -19,7 +19,7 @@ # Copyright =C2=A9 2018 Amirouche Boubekki # Copyright =C2=A9 2018, 2019, 2020 Oleg Pykhalov # Copyright =C2=A9 2018 Stefan Stefanovi=C4=87 =2D# Copyright =C2=A9 2018 Maxim Cournoyer +# Copyright =C2=A9 2018, 2020 Maxim Cournoyer # Copyright =C2=A9 2019 Guillaume Le Vaillant # Copyright =C2=A9 2019 John Soo # Copyright =C2=A9 2019 Jonathan Brielmaier @@ -1150,6 +1150,9 @@ dist_patch_DATA =3D \ %D%/packages/patches/ldc-disable-phobos-tests.patch \ %D%/packages/patches/leela-zero-gtest.patch \ %D%/packages/patches/less-hurd-path-max.patch \ + %D%/packages/patches/lib2geom-enable-assertions.patch \ + %D%/packages/patches/lib2geom-link-tests-against-glib.patch \ + %D%/packages/patches/lib2geom-use-system-googletest.patch \ %D%/packages/patches/liba52-enable-pic.patch \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 16ab9d20a4..6f022e9d79 100644 =2D-- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -21,6 +21,7 @@ ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka ;;; Copyright =C2=A9 2020 Nicolas Goaziou ;;; Copyright =C2=A9 2020 Raghav Gururajan +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +62,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages jemalloc) + #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) @@ -328,6 +330,83 @@ quaternions and other useful 2D and 3D math functions.= Iex is an exception-handling library.") (license license:bsd-3))) =20 +(define-public lib2geom + ;; Use the latest master commit, as the 1.0 release suffer build problem= s. + (let ((revision "1") + (commit "42e119d94934a9514c61571cfb6b4af503ece082")) + (package + (name "lib2geom") + (version (git-version "1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/inkscape/lib2geom.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "195rs0kdbs8w62irha1nwy83bccz04wglmk578qrj1mky7fc4rjv")) + (patches + ;; Patch submitted to upstream (see: + ;; https://gitlab.com/inkscape/lib2geom/merge_requests/17= ). + (search-patches "lib2geom-enable-assertions.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix py2geom module initialization (see: + ;; https://gitlab.com/inkscape/lib2geom/merge_requests= /18). + (substitute* "src/py2geom/__init__.py" + (("_py2geom") "py2geom._py2geom")) + #t)))) + (build-system cmake-build-system) + (arguments + `(#:imported-modules ((guix build python-build-system) + ,@%cmake-build-system-modules) + #:configure-flags '("-D2GEOM_BUILD_SHARED=3DON" + "-D2GEOM_BOOST_PYTHON=3DON" + ;; Compiling the Cython bindings fail (see: + ;; https://gitlab.com/inkscape/lib2geom/issue= s/21). + "-D2GEOM_CYTHON_BINDINGS=3DOFF") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-python-lib-install-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((python-version (@ (guix build python-build-system) + python-version)) + (python-maj-min-version (python-version + (assoc-ref inputs "python")= )) + (site-package (string-append + (assoc-ref outputs "out") + "/lib/python" python-maj-min-version + "/site-packages"))) + (substitute* '("src/cython/CMakeLists.txt" + "src/py2geom/CMakeLists.txt") + (("PYTHON_LIB_INSTALL \"[^\"]*\"") + (format #f "PYTHON_LIB_INSTALL ~s" site-package)))) + #t))))) + (native-inputs `(("python" ,python-wrapper) + ("googletest" ,googletest) + ("pkg-config" ,pkg-config))) + (inputs `(("cairo" ,cairo) + ("pycairo" ,python-pycairo) + ("double-conversion" ,double-conversion) + ("glib" ,glib) + ("gsl" ,gsl))) + (propagated-inputs + `(("boost" ,boost))) ;referred to in 2geom/pathvector.h. + (home-page "https://gitlab.com/inkscape/lib2geom/") + (synopsis "C++ 2D graphics library") + (description "2geom is a C++ library of mathematics for paths, curve= s, +and other geometric calculations. Designed for vector graphics, it tackles +B=C3=A9zier curves, conic sections, paths, intersections, transformations,= and +basic geometries.") + ;; The actual license differs from the advertised license, as linking + ;; with the GNU Scientif GSL is GPLv3+ means the whole must be licen= sed + ;; under a GPLv3+ compatible license, which the advertised LGPLv2.1+= or + ;; MPLv1.1 aren't (see: https://gitlab.com/inkscape/lib2geom/issues/3 + ;; and https://gitlab.com/inkscape/inkscape/issues/784). + (license license:gpl3+)))) + (define-public ogre (package (name "ogre") diff --git a/gnu/packages/patches/lib2geom-enable-assertions.patch b/gnu/pa= ckages/patches/lib2geom-enable-assertions.patch new file mode 100644 index 0000000000..8feb44acbf =2D-- /dev/null +++ b/gnu/packages/patches/lib2geom-enable-assertions.patch @@ -0,0 +1,36 @@ +From 4aa78f52232682b353eb15c219171e466987bac7 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Thu, 16 Jan 2020 00:19:29 -0500 +Subject: [PATCH] build: Enable assertions for the RelWithDebugInfo build t= ype. + +This fixes issue #5 (see: +https://gitlab.com/inkscape/lib2geom/issues/5). + +* CMakeLists.txt: Remove the "-DNDEBUG" CXX flag from the default +configuration for the RelWithDebugInfo build type. +--- + CMakeLists.txt | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfeb8f03..a663a1b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,6 +19,14 @@ enable_testing() +=20 + include(CheckCXXSourceCompiles) +=20 ++# Enable assertions for the RelWithDebugInfo build type. This is ++# useful as some tests make use of it (see: ++# https://gitlab.com/inkscape/lib2geom/issues/5). ++if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ++ string(REPLACE "-DNDEBUG" "" ++ CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") ++endif() ++ + # Find dependencies + find_package(Boost 1.40 REQUIRED) + find_package(DoubleConversion REQUIRED) +--=20 +2.24.1 + diff --git a/gnu/packages/patches/lib2geom-link-tests-against-glib.patch b/= gnu/packages/patches/lib2geom-link-tests-against-glib.patch new file mode 100644 index 0000000000..2b4f7ca6bf =2D-- /dev/null +++ b/gnu/packages/patches/lib2geom-link-tests-against-glib.patch @@ -0,0 +1,34 @@ +From f95925afef451755fc1449e57fbfdc2e7277f4b4 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Sat, 11 Jan 2020 00:44:55 -0500 +Subject: [PATCH 1/3] tests: Link against GLib. + +This resolves an error about not finding when linking the +tests that make use of GLib. + +* src/tests/CMakeLists.txt[2GEOM_GTESTS_SRC]: Add the glib library to +the link target libraries. +--- + src/tests/CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt +index 5ddf7f9c..626cfd87 100644 +--- a/src/tests/CMakeLists.txt ++++ b/src/tests/CMakeLists.txt +@@ -32,8 +32,10 @@ sbasis-test +=20 + foreach(source ${2GEOM_GTESTS_SRC}) + add_executable(${source} ${source}.cpp) +- target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_= INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} = ${GTK3_LIBRARIES}) ++ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ++ ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS}) ++ target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} ++ ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach() +=20 +--=20 +2.24.1 + diff --git a/gnu/packages/patches/lib2geom-use-system-googletest.patch b/gn= u/packages/patches/lib2geom-use-system-googletest.patch new file mode 100644 index 0000000000..16cce1799f =2D-- /dev/null +++ b/gnu/packages/patches/lib2geom-use-system-googletest.patch @@ -0,0 +1,94 @@ +From 6693b9c8ff1ae1ec02c9002c0a8f5f416f0c88f0 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Sun, 12 Jan 2020 23:23:33 -0500 +Subject: [PATCH 3/3] build: Prefer googletest from the system. + +Fixes issue #4. + +The build system now look for a system installed googletest or falls +back to the bundled copy of googletest otherwise. + +* CMakeLists.txt: Add call to find_package(GTest). +(include_directories): Remove "src/googletest/googletest/include" from +arg. +* src/CMakeLists.txt[NOT GTEST_FOUND]: Define the gtest and gtest_main +libraries when GTEST_FOUND is false. Globally include the googletest +headers here. Define aliases for the gtest and gtest_main libraries +that match those defined by the FindGTest module. +* src/tests/CMakeLists.txt: Replace references to gtest_main and gtest +by GTest::Main and GTest::GTest, respectively. +--- + CMakeLists.txt | 3 ++- + src/CMakeLists.txt | 15 +++++++++++---- + src/tests/CMakeLists.txt | 6 +++--- + 3 files changed, 16 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfeb8f03..96fbd58c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,13 +25,14 @@ find_package(DoubleConversion REQUIRED) + find_package(PkgConfig REQUIRED) + find_package(Cython) + find_package(Threads) ++find_package(GTest) + pkg_check_modules(GTK3 gtk+-3.0) + pkg_check_modules(GLIB glib-2.0) + pkg_check_modules(CAIRO cairo) + pkg_check_modules(GSL gsl) +=20 + # Add global include and link directories +-include_directories(src src/googletest/googletest/include ${CMAKE_CURRENT= _BINARY_DIR}) ++include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) + link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/2geom) +=20 + check_cxx_source_compiles("#include \nint main() { double a=3D0.5= ,b=3D0.5,c=3D0.5; sincos(a, &b, &c); return 0; }" HAVE_SINCOS) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index eefb3ac5..941dc4c7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,14 @@ +-add_library(gtest SHARED googletest/googletest/src/gtest-all.cc) +-target_include_directories(gtest PRIVATE googletest/googletest) +-target_link_libraries(gtest Threads::Threads) +-add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc) ++if(NOT GTEST_FOUND) ++ message("No system googletest library: using bundled copy.") ++ add_library(gtest SHARED googletest/googletest/src/gtest-all.cc) ++ add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc) ++ target_include_directories(gtest PRIVATE googletest/googletest) ++ target_link_libraries(gtest Threads::Threads) ++ include_directories(SYSTEM googletest/googletest/include) ++ # Aliases to share the same nomenclature with FindGTest. ++ add_library(GTest::GTest ALIAS gtest) ++ add_library(GTest::Main ALIAS gtest_main) ++endif() +=20 + add_subdirectory(2geom) + add_subdirectory(tests) +diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt +index 626cfd87..3538f8cf 100644 +--- a/src/tests/CMakeLists.txt ++++ b/src/tests/CMakeLists.txt +@@ -34,15 +34,15 @@ foreach(source ${2GEOM_GTESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} + ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} +- ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) ++ target_link_libraries(${source} 2geom GTest::Main GTest::GTest ++ ${GSL_LIBRARIES} ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach() +=20 + foreach(source ${2GEOM_TESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GT= K3_INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest ${GSL_LIBRARIES} ${GTK3_L= IBRARIES}) ++ target_link_libraries(${source} 2geom GTest::GTest ${GSL_LIBRARIES} $= {GTK3_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach(source) +=20 +--=20 +2.24.1 + =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0008-gnu-plotutils-Build-libplotter.patch Content-Transfer-Encoding: quoted-printable From=20926c4b5def384fcdd03a7939a6765068fb0100e7 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jan 2020 23:13:46 -0500 Subject: [PATCH 08/14] gnu: plotutils: Build libplotter. * gnu/packages/plotutils.scm (plotutils)[origin]: Port the patch to a snipp= et, which catches all the problematic occurrences. [configure-flags]: Pass "--enable-libplotter". [description]: Mention the newly added C++ libplotter library. =2D-- gnu/local.mk | 1 - .../patches/plotutils-libpng-jmpbuf.patch | 23 ------------------ gnu/packages/plotutils.scm | 24 ++++++++++++------- 3 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/plotutils-libpng-jmpbuf.patch diff --git a/gnu/local.mk b/gnu/local.mk index ba9f9728b2..86efba5d2d 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1369,7 +1369,6 @@ dist_patch_DATA =3D \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plib-CVE-2011-4620.patch \ %D%/packages/patches/plib-CVE-2012-4552.patch \ =2D %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ diff --git a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch b/gnu/packa= ges/patches/plotutils-libpng-jmpbuf.patch deleted file mode 100644 index 07ef60996c..0000000000 =2D-- a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch +++ /dev/null @@ -1,23 +0,0 @@ =2DUse the `png_jmpbuf' accessor, as recommended since libpng 1.4.0: =2Dhttp://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt . =2D =2D--- plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:12.000000000 +0200 =2D+++ plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:07.000000000 +0200 =2D@@ -164,7 +164,7 @@ _pl_z_maybe_output_image (S___(Plotter * =2D } =2D=20 =2D /* cleanup after libpng errors (error handler does a longjmp) */ =2D- if (setjmp (png_ptr->jmpbuf)) =2D+ if (setjmp (png_jmpbuf (png_ptr))) =2D { =2D png_destroy_write_struct (&png_ptr, (png_info **)NULL); =2D return -1; =2D@@ -444,7 +444,7 @@ _our_error_fn_stdio (png_struct *png_ptr =2D #endif =2D } =2D=20 =2D- longjmp (png_ptr->jmpbuf, 1); =2D+ longjmp (png_jmpbuf (png_ptr), 1); =2D } =2D=20 =2D static void=20 diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index a1e32eb398..15a310b5fe 100644 =2D-- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2015 Eric Bavier ;;; Copyright =C2=A9 2016, 2017, 2019, 2020 Nicolas Goaziou ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,7 +57,6 @@ (sha256 (base32 "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg")) =2D (patches (search-patches "plotutils-libpng-jmpbuf.patch")) (modules '((guix build utils))) (snippet ;; Force the use of libXaw7 instead of libXaw. When not doi= ng @@ -67,22 +67,28 @@ (substitute* "configure" (("-lXaw") "-lXaw7")) + ;; Use the `png_jmpbuf' accessor, as recommended since li= bpng + ;; 1.4.0 (see: + ;; http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.= x-summary.txt). + (substitute* "libplot/z_write.c" + (("png_ptr->jmpbuf") + "png_jmpbuf (png_ptr)")) #t)))) (build-system gnu-build-system) + (arguments + `(#:configure-flags (list "--enable-libplotter"))) (inputs `(("libpng" ,libpng) ("libx11" ,libx11) ("libxt" ,libxt) ("libxaw" ,libxaw))) =2D =2D (home-page =2D "https://www.gnu.org/software/plotutils/") + (home-page "https://www.gnu.org/software/plotutils/") (synopsis "Plotting utilities and library") (description =2D "GNU Plotutils is a package for plotting and working with 2D graphi= cs.=20 =2DIt includes a library, \"libplot\", for C and C++ for exporting 2D vector =2Dgraphics in many file formats. It also has support for 2D vector graphi= cs =2Danimations. The package also contains command-line programs for plotting =2Dscientific data.") + "GNU Plotutils is a package for plotting and working with 2D graphics. +It includes the C library @code{libplot} and the C++ @code{libplotter} lib= rary +for exporting 2D vector graphics in many file formats. It also has support +for 2D vector graphics animations. The package also contains command-line +programs for plotting scientific data.") (license license:gpl2+))) =20 (define-public guile-charting =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0009-gnu-Add-pstoedit.patch Content-Transfer-Encoding: quoted-printable From=206a8afe75604b2150ef1656f4d6e8fc884f8b437f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jan 2020 23:40:38 -0500 Subject: [PATCH 09/14] gnu: Add pstoedit. * gnu/packages/graphics.scm (pstoedit): New variable. =2D-- gnu/packages/graphics.scm | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 6f022e9d79..777ad837b4 100644 =2D-- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -68,6 +68,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages plotutils) #:use-module (gnu packages pth) #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate #:use-module (gnu packages python) @@ -407,6 +408,45 @@ basic geometries.") ;; and https://gitlab.com/inkscape/inkscape/issues/784). (license license:gpl3+)))) =20 +(define-public pstoedit + (package + (name "pstoedit") + (version "3.75") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/pstoedit/pstoedit/" + version "/pstoedit-" version ".tar.gz")) + (sha256 + (base32 + "1kv46g2wsvsvcngkavxl5gnw3l6g5xqnh4kmyx4b39a01d8xiddp")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("ghostscript" ,ghostscript) + ("imagemagick" ,imagemagick) + ("libplot" ,plotutils) + ("libjpeg" ,libjpeg-turbo) + ("zlib" ,zlib))) ;else libp2edrvmagick++.so fails to = link + (home-page "http://www.pstoedit.net/") + (synopsis "Converter for PostScript and PDF graphics") + (description "The @code{pstoedit} utility allows translating graphics +in the PostScript or PDF (Portable Document Format) formats to various +other vector formats such as: +@itemize +@item Tgif (.obj) +@item gnuplot +@item xfig (.fig) +@item Flattened PostScript +@item DXF, a CAD (Computed-Aided Design) exchange format +@item PIC (for troff/groff) +@item MetaPost (for usage with TeX/LaTeX) +@item LaTeX2e picture +@item GNU Metafile (for use with plotutils/libplot) +@item Any format supported by ImageMagick +@end itemize") + (license license:gpl2+))) + (define-public ogre (package (name "ogre") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0010-gnu-Add-autotrace.patch Content-Transfer-Encoding: quoted-printable From=20bcc629985280d9421d72d7e57b96c1f7202b5dec Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 25 Jan 2020 00:33:14 -0500 Subject: [PATCH 10/14] gnu: Add autotrace. * gnu/packages/graphics.scm (autotrace): New variable. =2D-- gnu/packages/graphics.scm | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 777ad837b4..208e2a521c 100644 =2D-- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -43,6 +43,7 @@ #:use-module (gnu packages algebra) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) @@ -52,6 +53,7 @@ #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -146,6 +148,61 @@ objects!") (home-page "http://www.fox-toolkit.org") (license license:lgpl2.1+))) =20 +(define-public autotrace + (let ((commit "travis-20190624.59") + (version-base "0.40.0")) + (package + (name "autotrace") + (version (string-append version-base "-" + (if (string-prefix? "travis-" commit) + (string-drop commit 7) + commit))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/autotrace/autotrace.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0mk4yavy42dj0pszr1ggnggpvmzs4ds46caa9wr55cqsypn7bq6s"))= )) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + ;; See: https://github.com/autotrace/autotrace/issues/= 27. + (add-after 'unpack 'include-spline.h-header + (lambda _ + (substitute* "Makefile.am" + ((".*src/types.h.*" all) + (string-append all "\t\tsrc/spline.h \\\n"))) + #t)) + ;; See: https://github.com/autotrace/autotrace/issues/= 26. + (replace 'check + (lambda _ + (invoke "sh" "tests/runtests.sh")))))) + (native-inputs + `(("which" ,which) + ("pkg-config" ,pkg-config) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("intltool" ,intltool) + ("libtool" ,libtool) + ("gettext" ,gettext-minimal))) + (inputs + `(("glib" ,glib) + ("libjpeg" ,libjpeg-turbo) + ("libpng" ,libpng) + ("imagemagick" ,imagemagick) + ("pstoedit" ,pstoedit))) + (home-page "https://github.com/autotrace/autotrace") + (synopsis "Bitmap to vector graphics converter") + (description "AutoTrace is a utility for converting bitmap into vect= or +graphics. It can trace outlines and midlines, effect color reduction or +despeckling and has support for many input and output formats. It can be = used +with the @command{autotrace} utility or as a C library, @code{libautotrace= }.") + (license (list license:gpl2+ ;for the utility itself + license:lgpl2.1+))))) ;for use as a library + (define-public blender (package (name "blender") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0011-gnu-Add-drm-tools.patch Content-Transfer-Encoding: quoted-printable From=20f8773c2a7fa27b070d48ba04a726fa6f6f1fb2da Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 28 Jan 2020 00:15:29 -0500 Subject: [PATCH 11/14] gnu: Add drm-tools. * gnu/packages/textutils.scm (drm-tools): New variable. =2D-- gnu/packages/textutils.scm | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 62988ec574..8e74963b49 100644 =2D-- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -19,6 +19,7 @@ ;;; Copyright =C2=A9 2019 Yoshinori Arai ;;; Copyright =C2=A9 2019 M=C4=83d=C4=83lin Ionel Patra=C8=99cu ;;; Copyright =C2=A9 2019 Wiktor =C5=BBelazny +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,6 +54,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages java) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -717,6 +719,110 @@ categories.") (license (list license:lgpl2.1 ; Main distribution. license:asl1.1)))) ; src/readdir.{c,h} =20 +(define-public drm-tools + (package + (name "drm-tools") + (version "1.1.32") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/drmtools/drm_tools= -" + version ".tar.gz")) + (sha256 + (base32 + "0nky82mm9rgsvw1xxw1nh0jz7r3k4l4b0wdqvynka0h1vn82wj91")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ;the test suite fails + #:phases (modify-phases %standard-phases + (add-after 'unpack 'set-install-prefixes + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (substitute* "CMakeLists.txt" + (("tmp/testinstall") + (string-drop out 1)) + (("/man/man1") + "/share/man/man1")) + #t))) + (add-after 'unpack 'adjust-test-paths + (lambda _ + (substitute* '("test_extract_increment.sh" + "test_extract_features.sh" + "test_extract_features2.sh" + "test_dmath.sh") + (("\\./extract") "extract") + (("\\./dmath") "dmath") + (("/usr/local/bin/") "") + (("/bin/rm") "rm") + (("/bin/cp") "cp")) + #t)) + (delete 'check) + ;; The produced binaries are written directly to %output= /bin. + (delete 'install) + (add-after 'build 'check + (lambda* (#:key outputs tests? #:allow-other-keys) + (when tests? + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (setenv "PATH" (string-append bin ":" + (getenv "PATH"))) + (with-directory-excursion + (format #f "../drm_tools-~a" ,version) + (invoke "sh" "test_all.sh"))))))))) + (native-inputs `(("which" ,which))) ;for tests + (inputs `(("pcre" ,pcre))) + (home-page "http://drmtools.sourceforge.net/") + (synopsis "Utilities to manipulate text and binary files") + (description "The drm_tools package contains the following commands: +@table @command +@item accudate +An extended version of the \"date\" program that has sub-second accuracy. +@item binformat +Format complex binary data into text. +@item binload +Load data into a binary file using simple commands from the input. +@item binorder +Sort, merge, search, retrieve or generate test data consisting of fixed si= ze +binary records. +@item binreplace +Find or find/replace in binary files. +@item binsplit +Split test data consisting of fixed size binary records into one or more +output streams. +@item chardiff +Find changes between two files at the character level. Unlike \"diff\", it +lists just the characters that differ, so if the 40,000th character is +different only that one character will be shown, not the entire line. +@item columnadd +Add columns of integers, decimals, and/or times. +@item datasniffer +A utility for formatting binary data dumps. +@item dmath +Double precision interactive command line math calculator. +@item extract +Extract and emit data from text files based on character or token position. +@item execinput +A utility that reads from STDIN and executes each line as a command in a +sub-process. +@item indexed_text +A utility for rapid retrieval of text by line numbers, in any order, from a +text file. +@item mdump +Format binary data. +@item msgqueue +Create message queues and send/receive messages. +@item mbin +@itemx mbout +Multiple buffer in and out. Used for buffering a lot of data between a sl= ow +device and a fast device. Mostly for buffering streaming tape drives for = use +with slower network connections, so that streaming is maintained as much as +possible to minimize wear on the tape device. +@item pockmark +Corrupt data streams - useful for testing error correction and data recove= ry. +@item tarsieve +Filter, list, or split a tar file. +@end table") + (license license:gpl2+))) + (define-public java-rsyntaxtextarea (package (name "java-rsyntaxtextarea") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0012-gnu-Add-libuemf.patch Content-Transfer-Encoding: quoted-printable From=20586c0ea29f3533e7b2cb558ecf1dfea82d12dfae Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 28 Jan 2020 01:21:24 -0500 Subject: [PATCH 12/14] gnu: Add libuemf. * gnu/packages/image.scm (libuemf): New variable. =2D-- gnu/packages/image.scm | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index c6fc26f9b8..d6afd96e3b 100644 =2D-- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -25,6 +25,7 @@ ;;; Copyright =C2=A9 2018 Rutger Helling ;;; Copyright =C2=A9 2020 Giacomo Leidi ;;; Copyright =C2=A9 2020 R Veera Kumar +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,6 +75,7 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages sphinx) + #:use-module (gnu packages textutils) #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xml) @@ -856,6 +858,55 @@ compose, and analyze GIF images.") (home-page "http://giflib.sourceforge.net/") (license license:x11))) =20 +(define-public libuemf + (package + (name "libuemf") + (version "0.2.7") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libuemf/libUEMF-" + version ".tar.gz")) + (sha256 + (base32 + "05djs99vqf067x81xfpskh7a66y5x7b4mmjavybcy7swnm0swg7v")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Overriding CMAKE_INSTALL_PREFIX is not a good idea. + (add-after 'unpack 'fix-CMakeLists.txt + (lambda _ + (substitute* "CMakeLists.txt" + ((".*SET\\(CMAKE_INSTALL_PREFIX.*") "")) + #t)) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (sources (string-append "../libUEMF-" ,version)) + (drm-tools (assoc-ref inputs "drm-tools")) + (extract (string-append drm-tools "/bin/extract")) + (execinput (string-append drm-tools "/bin/execinput"))) + (with-directory-excursion sources + (substitute* "testit.sh" + (("^EPATH=3D.*") + (format #f "EPATH=3D~a~%" bin)) + (("`which diff`") + "diff") + (("^EXTRACT=3D.*") + (format #f "EXTRACT=3D~a~%" extract)) + (("^EXECINPUT=3D.*") + (format #f "EXECINPUT=3D~a~%" execinput))) + (invoke "sh" "testit.sh")))))))) + (native-inputs `(("drm-tools" ,drm-tools))) ;for tests + (home-page "http://libuemf.sourceforge.net/") + (synopsis "Library for working with WFM, EMF and EMF+ images") + (description "The libUEMF library is a portable C99 implementation for +reading and writing @abbr{WFM, Windows Metafile}, @abbr{EMF, Enhanced +Metafile}, and @abbr{EMF+, Enhanced Metafile Plus} files.") + (license license:gpl2+))) + (define-public libungif (package (name "libungif") =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0013-gnu-inkscape-Update-to-1.0.patch Content-Transfer-Encoding: quoted-printable From=2070e1a1e89145b99aab6ba118da23a996af445107 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 6 Jan 2020 16:37:44 -0500 Subject: [PATCH 13/14] gnu: inkscape: Update to 1.0. * gnu/packages/inkscape.scm (inkscape)[version]: Update to 1.0. [origin]: Remove the obsolete Poppler patch. Add a macro to remove bundled libraries where possible. [inputs]: Upgrade gtk+-2 and gtkmm-2 to their current version. Add autotra= ce, gdl-minimal, lib2geom, libjpeg and libsoup. Upgrade python-2 to its current version, and move it... [native-inputs]: ...here. Add imagemagick and googletest. [arguments]: Enable tests, specifying the test target as "check". Move the check phase after the install phase. Remove the obsoleted adjust-for-new-poppler phase. Add a set-home phase to quiet Inkscape warnings. Add a disable-latex-export-tests phase to skip failing tests. [license]: Change to GPLv3+, although upstream says GPLv2+, due to an unresolved license incompatibility when building with the external lib2geom library. * gnu/packages/patches/inkscape-poppler-0.76.patch: Delete file. * gnu/local.mk: Unregister it. =2D-- gnu/local.mk | 1 - gnu/packages/inkscape.scm | 187 ++++++++++++++---- .../patches/inkscape-poppler-0.76.patch | 36 ---- 3 files changed, 148 insertions(+), 76 deletions(-) delete mode 100644 gnu/packages/patches/inkscape-poppler-0.76.patch diff --git a/gnu/local.mk b/gnu/local.mk index 86efba5d2d..da8ac7c130 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -1089,7 +1089,6 @@ dist_patch_DATA =3D \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ %D%/packages/patches/inetutils-hurd.patch \ =2D %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index 26d4642547..803f58a8cb 100644 =2D-- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2016, 2018 Ricardo Wurmus ;;; Copyright =C2=A9 2017, 2020 Marius Bakke ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,8 +31,12 @@ #:use-module (gnu packages aspell) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) + #:use-module (gnu packages check) #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages graphics) #:use-module (gnu packages gtk) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pdf) @@ -46,64 +51,168 @@ (define-public inkscape (package (name "inkscape") =2D (version "0.92.4") =2D (source (origin =2D (method url-fetch) =2D (uri (string-append "https://media.inkscape.org/dl/" =2D "resources/file/" =2D "inkscape-" version ".tar.bz2")) =2D (patches (search-patches "inkscape-poppler-0.76.patch")) =2D (sha256 =2D (base32 =2D "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"))= )) + (version "1.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://media.inkscape.org/dl/" + "resources/file/" + "inkscape-" version ".tar.xz")) + (sha256 + (base32 + "1fwl7yjkykqb86555k4fm24inhc40mrvxqwgl2v2vi9alv8j7hc9")) + (modules '((guix build utils) + (ice-9 format))) + (snippet + '(begin + (let-syntax + ;; XXX: The build system doesn't currently support using + ;; system libraries over bundled ones (see: + ;; https://gitlab.com/inkscape/inkscape/issues/876). + ((unbundle + (syntax-rules () + ((_ (name source-dir use-pkg-config?) ...) + (begin + ;; Delete bundled source directories. + (delete-file-recursively source-dir) ... + (substitute* '("src/CMakeLists.txt" + "src/3rdparty/CMakeLists.txt") + (((string-append ".*add_subdirectory\\(" + (basename source-dir) "\\).*")) + "") ...) + ;; Remove bundled entries from INKSCAPE_TARGET_LIBS. + (substitute* "src/CMakeLists.txt" + (((string-append name "_LIB.*")) "") ...) + ;; Register the external libraries, so that their + ;; headers are added to INKSCAPE_INCS_SYS and their + ;; shared libraries added to INKSCAPE_LIBS. + (if use-pkg-config? + (let* ((width (string-length "pkg_check_modules(= ")) + (indent (string-join (make-list width " "= ) ""))) + (substitute* "CMakeScripts/DefineDependsandFla= gs.cmake" + (("^pkg_check_modules\\(INKSCAPE_DEP REQUIRE= D.*" start) + (string-append start + (format #f "~a~a~%" indent n= ame))))) + (substitute* "CMakeScripts/DefineDependsandFlags= .cmake" + (("^find_package\\(Iconv REQUIRED\\).*" start) + (string-append (format #f " +find_path(~a_INCLUDE_DIR NAMES ~:*~a/~:*~a.h ~:*~a.h) +if(NOT ~:*~a_INCLUDE_DIR) + message(FATAL_ERROR \"~:*~a headers not found\") +else() + list(APPEND INKSCAPE_INCS_SYS ${~:*~a_INCLUDE_DIR}) +endif() + +find_library(~:*~a_LIB NAMES ~:*~a) +if(NOT ~:*~a_LIB) + message(FATAL_ERROR \"~:*~a library not found\") +else() + list(APPEND INKSCAPE_LIBS ~:*~a_LIB) +endif()~%~%" + name) + start)))) ... + ;; Fix the references to the headers of the + ;; unbundled libraries. + (substitute* (find-files "." "\\.h$|\\.cpp$") + (((string-append "#include (\"|<)3rdparty/" + (basename source-dir)) _ quote) + (string-append "#include " quote + (basename source-dir))) + ...)))))) + (unbundle ("2geom" "src/2geom" #t) + ;; libcroco cannot be unbundled as it is heavily + ;; modified (see: + ;; https://gitlab.com/inkscape/inkscape/issues/876#= note_276114904). + ;; ("croco" "src/3rdparty/libcroco" #t) + ;; FIXME: Unbundle the following libraries once they + ;; have been packaged. + ;; ("cola" "src/3rdparty/adaptagrams/libcola") + ;; ("avoid" "src/3rdparty/adaptagrams/libavoid") + ;; ("vpsc" "src/3rdparty/adaptagrams/libvpsc") + ;; libuemf cannot be unbundled as it slightly modif= ied + ;; from upstream (see: + ;; https://gitlab.com/inkscape/inkscape/issues/973). + ;; ("uemf" "src/3rdparty/libuemf" #f) + ;; FIXME: libdepixelize upstream is ancient and doe= sn't + ;; build with a recent lib2geom + ;; (see: https://bugs.launchpad.net/libdepixelize/+= bug/1862458). + ;;("depixelize" "src/3rdparty/libdepixelize") + ("autotrace" "src/3rdparty/autotrace" #t))) + ;; Lift the requirement on the double-conversion library, as + ;; it is only needed by lib2geom, which is now unbundled. + (substitute* "CMakeScripts/DefineDependsandFlags.cmake" + ((".*find_package\\(DoubleConversion.*") "")) + #t)))) (build-system cmake-build-system) + (arguments + `(#:tests? #t + #:test-target "check" ;otherwise some test binaries are = missing + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-icon-cache-generator + (lambda _ + (substitute* "share/icons/application/CMakeLists.txt" + (("gtk-update-icon-cache") "true")) + #t)) + (add-after 'unpack 'disable-latex-export-tests + ;; FIXME: For some reason the test.pdf_tex file generated by the + ;; "--export-latex" lacks "some text" in its content when run in + ;; the build environment. Skip the related tests. + (lambda _ + (substitute* "testfiles/cli_tests/CMakeLists.txt" + (("add_cli_test\\(export-latex") + "message(TEST_DISABLED: export-latex")) + #t)) + (add-after 'unpack 'set-home + ;; Mute Inkscape warnings during tests. + (lambda _ + (setenv "HOME" (getcwd)) + (format #t "ARGS is set to: ~a" (getenv "ARGS")) + #t)) + ;; Move the check phase after the install phase, as when run in t= he + ;; tests, Inkscape relies on files that are not yet installed, su= ch + ;; as the "share/inkscape/ui/units.xml" file. + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check))))) (inputs `(("aspell" ,aspell) =2D ("gtkmm" ,gtkmm-2) =2D ("gtk" ,gtk+-2) + ("autotrace" ,autotrace) + ("gdl" ,gdl-minimal) + ("gtkmm" ,gtkmm) + ("gtk" ,gtk+) ("gsl" ,gsl) ("poppler" ,poppler) + ;;("libcroco" ,libcroco) ;see comment in origin snippet above + ("lib2geom" ,lib2geom) + ;; ("libdepixelize" ,libdepixelize) ;build is currently broken + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) + ;;("libuemf" ,libuemf) ;see comment in origin snippet above ("libxml2" ,libxml2) ("libxslt" ,libxslt) ("libgc" ,libgc) + ("libsoup" ,libsoup-minimal) ("freetype" ,freetype) ("popt" ,popt) ("potrace" ,potrace) =2D ("python" ,python-2) ("lcms" ,lcms) ("boost" ,boost))) (native-inputs =2D `(("intltool" ,intltool) + `(("imagemagick" ,imagemagick) ;for tests + ("intltool" ,intltool) ("glib" ,glib "bin") + ("googletest" ,googletest) ("perl" ,perl) =2D ("pkg-config" ,pkg-config))) =2D ;; FIXME: tests require gmock =2D (arguments =2D `(#:tests? #f =2D #:phases =2D (modify-phases %standard-phases =2D (add-after 'unpack 'patch-icon-cache-generator =2D (lambda _ =2D (substitute* "share/icons/application/CMakeLists.txt" =2D (("gtk-update-icon-cache") "true")) =2D #t)) =2D (add-after 'unpack 'adjust-for-new-poppler =2D (lambda _ =2D (substitute* (find-files "src/extension/internal/pdfinput") =2D ;; Needed for Poppler 0.82. =2D (("Unicode \\*u") "Unicode const *u") =2D ;; Needed for Poppler 0.83. =2D (("\\(GfxPath") "(const GfxPath") =2D (("GfxSubpath") "const GfxSubpath") =2D (("new GlobalParams\\(\\)") =2D "std::unique_ptr(new GlobalParams())") =2D (("new GlobalParams\\(poppler_datadir\\)") =2D "std::unique_ptr(new GlobalParams(poppler_= datadir))")) =2D #t))))) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) (home-page "https://inkscape.org/") (synopsis "Vector graphics editor") (description "Inkscape is a vector graphics editor. What sets Inkscape apart is its use of Scalable Vector Graphics (SVG), an XML-based W3C stand= ard, as the native format.") =2D (license license:gpl2+))) + ;; The external, unbundled lib2geom library effective license is GPLv3= +, + ;; given it links against the GNU Scientific Library, which in turn me= ans + ;; that the license of Inkscape should also be GPLv3+, when built this= way + ;; (see: https://gitlab.com/inkscape/inkscape/issues/784). + (license license:gpl3+))) diff --git a/gnu/packages/patches/inkscape-poppler-0.76.patch b/gnu/package= s/patches/inkscape-poppler-0.76.patch deleted file mode 100644 index 08e8303892..0000000000 =2D-- a/gnu/packages/patches/inkscape-poppler-0.76.patch +++ /dev/null @@ -1,36 +0,0 @@ =2DThis patch adds support for Poppler 0.76 and later. =2D =2DTaken from upstream: =2D =2D =2Ddiff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extens= ion/internal/pdfinput/pdf-parser.cpp =2Dindex 8484984bdf..4f798e35bf 100644 =2D--- a/src/extension/internal/pdfinput/pdf-parser.cpp =2D+++ b/src/extension/internal/pdfinput/pdf-parser.cpp =2D@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) { =2D error(errInternal, -1, "Weird page contents"); =2D return; =2D } =2D- parser =3D new Parser(xref, new Lexer(xref, obj), gFalse); =2D+ parser =3D new _POPPLER_NEW_PARSER(xref, obj); =2D go(topLevel); =2D delete parser; =2D parser =3D nullptr; =2Ddiff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/= src/extension/internal/pdfinput/poppler-transition-api.h =2Dindex 61a15083a0..5e8bc4ae90 100644 =2D--- a/src/extension/internal/pdfinput/poppler-transition-api.h =2D+++ b/src/extension/internal/pdfinput/poppler-transition-api.h =2D@@ -14,6 +14,13 @@ =2D=20 =2D #include =2D=20 =2D+#if POPPLER_CHECK_VERSION(0, 76, 0) =2D+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) =2D+#else =2D+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj= ), gFalse) =2D+#endif =2D+ =2D+ =2D #if POPPLER_CHECK_VERSION(0, 72, 0) =2D #define getCString c_str =2D #endif =2D-=20 2.26.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0014-gnu-WIP-Add-libdepixelize.patch Content-Transfer-Encoding: quoted-printable From=203853fb03cbd15ab84a6744cb8f65231e5702b0e1 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 6 Feb 2020 00:13:06 -0500 Subject: [PATCH 14/14] gnu: WIP: Add libdepixelize. WIP: This currently fails to build. We need to figure out which ancient version of lib2geom it needs to link against. * gnu/packages/graphics.scm (libdepixelize): New variable. =2D-- gnu/packages/graphics.scm | 67 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 208e2a521c..d27440dfea 100644 =2D-- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -71,6 +71,7 @@ #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages plotutils) + #:use-module (gnu packages popt) #:use-module (gnu packages pth) #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate #:use-module (gnu packages python) @@ -87,6 +88,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix download) + #:use-module (guix bzr-download) #:use-module (guix git-download) #:use-module (guix hg-download) #:use-module ((guix licenses) #:prefix license:) @@ -465,6 +467,71 @@ basic geometries.") ;; and https://gitlab.com/inkscape/inkscape/issues/784). (license license:gpl3+)))) =20 +;;; This older version of 2geom is used by libpixelize. +(define-public lib2geom-0.9 + (package + (inherit lib2geom) + (name "lib2geom") + (version "0.9") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/inkscape/lib2geom.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1zfb9mkggn36pxyp04z67dvj7r0vqfdw8yy2a41zg7rlcw5v6v67")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "src/googletest") + ;; Fix py2geom module initialization (see: + ;; https://gitlab.com/inkscape/lib2geom/merge_requests/1= 8). + (substitute* "src/py2geom/__init__.py" + (("_py2geom") "py2geom._py2geom")) + ;; Disable toys and tests, as they cause build issues. + (substitute* "src/CMakeLists.txt" + ((".*ADD_SUBDIRECTORY \\(.*tests\\).*") "") + ((".*ADD_SUBDIRECTORY \\(toys\\).*") "") + ((".*gtest.*") "")) + #t)))))) + +(define-public libdepixelize + (let ((revision "187") ;no tags or official releases + (guix-revision "1")) + (package + (name "libdepixelize") + (version (string-append "0.0.0-" guix-revision "." revision)) + (source (origin + (method bzr-fetch) + (uri (bzr-reference + (url (string-append "lp:" name)) + (revision revision))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "19znvam2d2bya05d9sxcj37lnrnvj9c0403aa2p5fv60985xi5b9"))= )) + (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-sources + (lambda _ + (substitute* "src/priv/splines-kopf2011.h" + ((".*dest\\.pathVector\\.reserve.*") "")) + #t))))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs `(("gtkmm" ,gtkmm-2) + ("lib2geom" ,lib2geom-0.9) + ("popt" ,popt))) + (home-page "https://launchpad.net/libdepixelize") + (synopsis "C++ library for vectorizing raster graphics") + (description "Depixelize is a library (and utility) for converting +raster graphics into vector graphics. It implements the algorithm describ= ed in +@url{https://johanneskopf.de/publications/pixelart/paper/pixel.pdf,Depixel= izing +Pixel Art}.") + (license (list license:gpl2+ license:lgpl2.1+))))) ;dual licensed + (define-public pstoedit (package (name "pstoedit") =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAl6zfx8ACgkQEmDkZILm NWLc0A//ZDZ+YduzLAjCWowCdfbZafXyRshib0PddSFPy3D9vKthyTt3v4QDuaqj MxQ+KZKdpCP/Um374SjOt/mq95AiY0o7/geEnDXiE25S896Hu74pUja5+f4ssKyz sRFxZcr0Cba7+tTsZE9fpdsj6hAFIpAosYocIA8y+pgKcPlSeLkUmDJREE0NQ2ga yFlrhqEDjo5DFjW70RaJ+Hvca89wtLCWjA0GJ3SIV2bPJZRt9EvFt6edeKlnfU7M 5aajlLXslXAm1p3KvoKUQkCH2ZRQZmVG5ezt5JLscuh86HnBXYM0P+qg5ytilB6i ax0PAe4c+880KxPZkS4euM29Y8Yz0ZZYv02g0z/GQuIb+WB79KMkrQ1LXKEYdTqJ Fe3YT/qd2uK/d9usocVQcS+Lm1b1aQQcHopFB+ZqUAhxDAqKKg7wA5lBaOF8NdIg olF+h5NrBn95Vto9nF9SpNwNQYEplpN+GFd0mD8rNmSI/vxFZsayK9gwHFynVn4c C09LQB0gN85gdUoIt7Yqlx5VovoKh7QuSq1wZLDbwgZdKdc3IQSVVL215Zu7Z+NO bS/kWa9Qi7fJlz6Nqf39wwEBBNfjw+NKMfbO1T0KQ7TTot7Y9v1n/5pWggwfMbKY kqld0S1glzJEJIRKQMKBuz53y3mGLSCLWv6V19jh55pgnqGWuJM= =5G1p -----END PGP SIGNATURE----- --==-=-=--