From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uAFgE9s2BGLLXQEAgWs5BA (envelope-from ) for ; Wed, 09 Feb 2022 22:49:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aD4MDNs2BGITiwAAG6o9tA (envelope-from ) for ; Wed, 09 Feb 2022 22:49:15 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.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 5EA8D3400F for ; Wed, 9 Feb 2022 22:49:14 +0100 (CET) Received: from localhost ([::1]:37696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHupt-0001M9-1P for larch@yhetil.org; Wed, 09 Feb 2022 16:49:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHupi-0001Lj-Po for guix-patches@gnu.org; Wed, 09 Feb 2022 16:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHupi-0006ve-Gu for guix-patches@gnu.org; Wed, 09 Feb 2022 16:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHupi-0005sG-CP for guix-patches@gnu.org; Wed, 09 Feb 2022 16:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53908] [PATCH] Adding a package for ditaa Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Feb 2022 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53908 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53908@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164444333522562 (code B ref -1); Wed, 09 Feb 2022 21:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Feb 2022 21:48:55 +0000 Received: from localhost ([127.0.0.1]:52998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHupW-0005rm-0Y for submit@debbugs.gnu.org; Wed, 09 Feb 2022 16:48:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:39552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHupT-0005rd-ER for submit@debbugs.gnu.org; Wed, 09 Feb 2022 16:48:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHupT-0001AH-73 for guix-patches@gnu.org; Wed, 09 Feb 2022 16:48:47 -0500 Received: from [2607:f8b0:4864:20::1030] (port=46022 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHupQ-0006tL-6t for guix-patches@gnu.org; Wed, 09 Feb 2022 16:48:46 -0500 Received: by mail-pj1-x1030.google.com with SMTP id d15-20020a17090a564f00b001b937f4ae2fso1247899pji.4 for ; Wed, 09 Feb 2022 13:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Efd8V0FzHt2974h9eBBPRqkubLyFIoKhPlLoVhAxngM=; b=LMqGtQZyP1aV7PwN08m6BbDI7r4izM5j4bnodRek3SuojTD6LqAtk/7Jzi00Id8czV Ix0CFCNh1PhWtO46MVGzxZavHvTrBsyO5jMgymK5QNrVNghrWS0wZ8z6r36oCil6ZAdb cB8CycXUFKgAwUoFvb5Z+5Z+qpA1Bx+G8XkP1Q93q8WaavpNk16v9wuyyAtnG/EO0u3g UK0rgo4cuV7iMUxAq3Zc/72PYxaB/Weai5ATE5nAcnedFD0JKKmTYKDhDfi+e3ul3Dq+ Qa3/eDDCeu8t105LcskRux8E7B3FTG1rCG66GyaWu6FaTSiI2Cy/J80pm0J4XAbqJ5vy GPVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Efd8V0FzHt2974h9eBBPRqkubLyFIoKhPlLoVhAxngM=; b=J1FaikzoddLQZmfa8U1oRKVyoyVHSxBxfNESnLN1fPo4KgG5lVfDmvguOWPkF7WmMV k9d8Kn4KrhaUuVZfH97UFa2CXklvOigPB3+ZDsPf/dvmoRLpaQF1FioyzAGKPjffMex9 FRPcAO31V9y1po89QbzLjMKGZVzNJHA5CnhfW6vYytjf5DjgvAIZMCfgXYIHQzJjsEte 79hkWmE2aO84lapgvLQSnbwtXGAc1mBqbLlMSCFTpmL5mjfA0m4+YHvDuD04Ey86laxw hxg82dd1/38G1onj8ebGDa7DfdMb8deauK4ktKh2OyhSPxLHyid+ij0KZ9owPRs/Rh6V ofWw== X-Gm-Message-State: AOAM531fmLYDCKMnX45Oy4iq1YOUWrlfO7OqWfbMAY8BwmJm0VoVrBOX jP4IHYhtopLkUkobi6jqM0s= X-Google-Smtp-Source: ABdhPJzi+ahFSeqMA0EtHQUipB0fVwbuz+9OQlWkK8Kef35dbydMackwL8qSHN0mk2MzKIXsvNsmww== X-Received: by 2002:a17:902:c40b:: with SMTP id k11mr4368127plk.50.1644443321843; Wed, 09 Feb 2022 13:48:41 -0800 (PST) Received: from Ginko.local ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id u18sm20886453pfk.14.2022.02.09.13.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 13:48:41 -0800 (PST) From: Frank Pursel Date: Wed, 09 Feb 2022 13:48:36 -0800 Message-ID: <87r18bk8y3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=frank.pursel@gmail.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644443354; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Efd8V0FzHt2974h9eBBPRqkubLyFIoKhPlLoVhAxngM=; b=UC6L+rTFfzjdUPSb25NiTuWZ66ROaj8LWOmB0lKB+mMe8C0DDthV42gDoxN179ccoa+mqF VLey/dWXKPH0/q3I9d66j9na5fEJ0LFc7TbrQqnoolQUBvNSFpmvOaZm0KzfwKNk0tDJLx 0zqbMPA/dsbjt0ix1Onkm8FcFmyENKeft/y/fW73cJDRaFCq8Rhs0vyaWF5Xf5/5gfdEfQ Eb4ICJTKg2wcfTHpC4TWtvl7BrItWws6SQ+7nI+57DVtGsvVAlHCIgl5FjVRMlMirIo+YB +di684GqbMtlBUupcNwQqP5LCSKVjpfWSEaxhAXln40768FvbClzyejnHkbJwg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644443354; a=rsa-sha256; cv=none; b=KbFlWIJB8Jkf3nW1G0zUO1r7O/o0RuLYWxN9ehZsk3KN9PjeaitefcYNFYnRF0LqDMb6ol 9dj+RGUXIEm/SwcRW6YZ651DPLswEQgoIgFJ7wWX9rqeb4rP57J4u3VEvSxdcpc9Gvn3wO stx8ogThIE1bfP67CnPVa5LC+Cp3pbbdo5I7B9howC1PhDlYGepJ8zMQLL6DNhh0vXYDjm VQzbatjgqRp9cSkYx0wP8lf9AmyYHCZU4Bjx1ckxe7JUYhMAdUUP09MKK7+H12T51pIGZ2 /aDzPrKYLu8+vyPBgSyQBZZfippxphtwkYVsI85HgOsU0/uc45Xw4e1Eb8o6wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=LMqGtQZy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=LMqGtQZy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5EA8D3400F X-Spam-Score: -2.23 X-Migadu-Scanner: scn1.migadu.com X-TUID: YCQt0ZtCVaaS >From 0d0df722f31d306c1c95229408fc2bcc43c4a59e Mon Sep 17 00:00:00 2001 Message-Id: <0d0df722f31d306c1c95229408fc2bcc43c4a59e.1644442953.git.frank.= pursel@gmail.com> From: Frank Pursel Date: Wed, 9 Feb 2022 09:07:50 -0800 Subject: [PATCH] Adding ditaa executable * gnu/packages/batik.scm (java-batik-all-jar): Providing dependent class fi= les for the ditaa package. * gnu/packages/graph.scm (ditaa): Adding the ditaa package. --- gnu/packages/batik.scm | 60 ++++++++++++++++++++ gnu/packages/graph.scm | 121 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) diff --git a/gnu/packages/batik.scm b/gnu/packages/batik.scm index 2072dd467c..74f2d5b82a 100644 --- a/gnu/packages/batik.scm +++ b/gnu/packages/batik.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2018 Danny Milosavljevic ;;; Copyright =C2=A9 2020 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2022 Frank Pursel ;;; ;;; This file is part of GNU Guix. ;;; @@ -254,3 +255,62 @@ (define-public java-xmlgraphics-commons (description "This package provides XMLGraphics constants (originally from @code{batik}).") (license license:asl2.0))) + +(define-public java-batik-all-jar + (let ((short-pkg-name "batik") (ver "1.14") + (hash "1g1vqg2gqw31bk2655vszxqrs8whj3sd5rbk649a9qqvqgqfdv13")) + (package + (name "java-batik-all-jar") + (version ver) + (source (origin + (method url-fetch) + (uri (string-append + "https://archive.apache.org/dist/xmlgraphics/batik/s= ource/" + short-pkg-name "-src-" + version ".tar.gz")) + (sha256 + (base32 + hash)))) + (build-system ant-build-system) + (arguments + `(#:build-target "jars" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-build.xml + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "build.xml" + (("batik-all/target/batik-all-.*jar") (string-append "bat= ik-" + ,version + "/lib/batik-all-" + ,version ".jar")) + (("") + "")) #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((name+ver (string-append ,short-pkg-name "-" + ,version))) + (copy-recursively (string-append "./" name+ver) + (assoc-ref outputs "out")) + (copy-file (string-append "./" + name+ver + "/lib/" + ,short-pkg-name + "-all-" + ,version + ".jar") + (string-append (assoc-ref outputs "out") + "/lib/batik.jar"))) #t)) + (delete 'generate-jar-indices) + (delete 'check)))) + (inputs (list java-junit java-hamcrest-core)) + (home-page "https://xmlgraphics.apache.org/batik/") + (synopsis + "Jar of the complete set of batik classes for dependency fulfullmen= t") + (description + "Batik is a Java-based toolkit for applications or applets that wan= t to +use images in the Scalable Vector Graphics (SVG) format for various purpos= es, +such as display, generation or manipulation. This package provides the +batik-all.jar upon whch other packages may depend but no executable or oth= er +content.") + (license license:asl2.0)))) + diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 4b46904318..45dd83edb8 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -10,6 +10,7 @@ ;;; Copyright =C2=A9 2021 Alexandre Hannud Abdo ;;; Copyright =C2=A9 2021, 2022 Maxim Cournoyer ;;; Copyright =C2=A9 2022 Marius Bakke +;;; Copyright =C2=A9 2022 Frank Pursel ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ (define-module (gnu packages graph) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix build-system ant) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -39,6 +41,7 @@ (define-module (gnu packages graph) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages batik) #:use-module (gnu packages bioconductor) #:use-module (gnu packages bioinformatics) #:use-module (gnu packages boost) @@ -50,6 +53,7 @@ (define-module (gnu packages graph) #:use-module (gnu packages graphics) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) + #:use-module (gnu packages java) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) @@ -652,3 +656,120 @@ (define-public python-graph-tool time) to that of a pure C/C++ library.") (home-page "https://graph-tool.skewed.de/") (license license:lgpl3+))) + +(define-public ditaa + (let* ((ver "0.11.0") (hash + "1y3g17wp1wvb05m56pp25avww2njpgh0gk0jsbsf25scj7hy= yj26")) + (package + (name "ditaa") + (version ver) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stathissideris/ditaa") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + hash)))) + (build-system ant-build-system) + (inputs (list java-batik-all-jar java-commons-cli + `(,icedtea "jdk") java-junit)) + (arguments + `(#:build-target "release-all" + #:phases + (modify-phases %standard-phases + ;; Ant's buildfile and build tree need to be modified to provide + ;; access to the guix builds of the batik and the java-commons-= cli + ;; jar files. Also some of the source requires java7. + (add-before 'build 'build-prep + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((batik-jar + (search-input-file inputs "lib/batik.jar")) + (commons-cli-jar + (search-input-file + inputs + "lib/m2/commons-cli/commons-cli/1.4/commons-cli-1.= 4.jar"))) + (mkdir-p "lib") + (copy-file batik-jar "./lib/batik.jar") + (copy-file commons-cli-jar "./lib/commons-cli.jar")) + (copy-recursively "service/web/lib" "lib" + #:log + (current-output-port)) + (with-directory-excursion "build" + (substitute* "release.xml" + (("source=3D\"1.6\"") "source= =3D\"7\"") + (("") + (string-append + "" + " +" ""))) + ;; (invoke "ant" "clean") + ) #t)) + (replace 'build + (lambda* _ + ;; (invoke "ant" "-f" "release.xml" "release-jar") + (setenv "ANT_OPTS" + (string-append "-Dversion.string=3D" + ,version)) + (with-directory-excursion "build" + ;; (invoke "ant" "compile") + (invoke "ant" "-f" "release.xml" + "release-jar")) #t)) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (if tests? + (begin + (setenv "ANT_OPTS" + (string-append "-Dversion.string=3D" + ,version)) + (mkdir-p "tests/testlib") + (with-directory-excursion "build" + (invoke "ant" "-f" "release.xml" + "generate-test-images") + (invoke "ant" "test")))) + #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) (lib (string-append = out + "/lib")) + (bin (string-append out "/bin")) + (bash (search-input-file inputs "bin/bash")) + (java (search-input-file inputs "bin/java")) + (jre (search-input-directory inputs "jre")) + (ditaa (string-append out "/bin/ditaa")) + (jar-name (string-append ,name + ,version ".jar"))) + (with-directory-excursion "releases" + (install-file jar-name lib)) + (mkdir-p bin) + (with-output-to-file ditaa + (lambda () + (display (string-append "#!" + bash + " +" + "JAVA_HOME=3D" + jre + " " + java + " -jar " + out + "/lib/" + jar-name + " $@")))) + (chmod ditaa 493)) #t)) + (add-after 'install 'install-docs + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") + "/share/doc/"))) + (for-each (lambda (filen) + (install-file filen doc)) + (find-files "." ".*README\\.md"))) #t))))) + (home-page "https://github.com/stathissideris/ditaa") + (synopsis "Create graphics from ascii art") + (description + "@code{ditaa} is a small command-line utility that can convert diag= rams +drawn using ascii art ('drawings' that contain characters that resemble li= nes +like | / - ), into proper bitmap or svg graphics.") + (license license:lgpl3)))) --=20 2.34.0