From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YN3zBVyruGP4aQAAbAwnHQ (envelope-from ) for ; Sat, 07 Jan 2023 00:14:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OP3TBVyruGPU0QAAauVa8A (envelope-from ) for ; Sat, 07 Jan 2023 00:14:36 +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 963C433B3 for ; Sat, 7 Jan 2023 00:14:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDvud-0007fR-Af; Fri, 06 Jan 2023 18:14:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDvuZ-0007fB-Nk for guix-patches@gnu.org; Fri, 06 Jan 2023 18:14:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDvuU-0001Mh-C8 for guix-patches@gnu.org; Fri, 06 Jan 2023 18:14:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDvuU-0006xf-6f for guix-patches@gnu.org; Fri, 06 Jan 2023 18:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60612] [PATCH 1/1] gnu: Add ditaa. Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 06 Jan 2023 23:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60612 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60612@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167304681526715 (code B ref -1); Fri, 06 Jan 2023 23:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2023 23:13:35 +0000 Received: from localhost ([127.0.0.1]:56067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDvu2-0006wo-CC for submit@debbugs.gnu.org; Fri, 06 Jan 2023 18:13:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:49602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDvu0-0006wg-CG for submit@debbugs.gnu.org; Fri, 06 Jan 2023 18:13:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDvu0-0007cL-0r for guix-patches@gnu.org; Fri, 06 Jan 2023 18:13:32 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDvtx-0001Ir-7X for guix-patches@gnu.org; Fri, 06 Jan 2023 18:13:30 -0500 Received: by mail-pj1-x1029.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so6787998pjj.2 for ; Fri, 06 Jan 2023 15:13:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=cKz78GpmJw3STvua0dKI1jEgMI6mHhTGofjcLCvdtuM=; b=lWp4JPHTPEShvoKJMtvo0U5Qr60JoNKveuCyBgrnubXVjUG/9406NZUnvOlYaKLmr/ zxUzmPPG9Vtqo7fjfkGJsseObsGoJvvZAvTU+k+c99G+KXoRrfLzy4jMy1oUXt9/AHgr w2uCAQka4PwYDRUJ29S7geZ0kh2MfVGYP+uthjD2qXVqWjZHN2DQkc/utQDl7f9cas8L 8LNmAdEmvw5R6Wy27y7VR8m8/EP/LIx62CrN2pnMbyMGRhPzHrnTr+jRKHd0Ole//6z6 MYSmMTKvu/aMJbk+28IivIPw5ys65ye9hd2zA+AXFJrXFnnt+p4zP4bt7GGvcxlpanks cUhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cKz78GpmJw3STvua0dKI1jEgMI6mHhTGofjcLCvdtuM=; b=oZIafApTFzTzIPtOkuhD86Eq+hzvHCZfiRmhBHfpX9oLLZdFjeboDOnSdTzegntbKc BXHJ3uGOZhFYsFyTVZGbwU36hvgRGcXy9y4Mru4Gt+DTgkUifOJKTJCyKk7x3lC6qQtX F8rloqwGmm6mh2479IFkZNyck+DwCI+OwroubwegiX9LS3YP5OksRa801iAuOitLHYdI aOZ6XPcci9bkP89L5w6BV5SAt7V6u2d+oMkV0njHYFsRhEl5Q7tjp1h/88T4W7wNbMsf /C0dIY+Cvb2xsyDIwJus+rD/ZHj5myhU0toZjPWWyWm2uPYbitHiWgCnNMh+9NeMJH87 UiUQ== X-Gm-Message-State: AFqh2kpNryi9PCVsOcNtFETAkjY8rdbsKPO43/Aovmj9G0ekMQBD+bQp 96D4YiOgEPAkX64V3Yd1iad+nwgMGGM= X-Google-Smtp-Source: AMrXdXvJdizKEjnlFqhRf/Yfw1BiKY7Q2dz2mndgEIraNVFj15Xn4o/eHiPCWTVZ2NYEaYoqPpLr4A== X-Received: by 2002:a17:902:a711:b0:192:4ce1:3695 with SMTP id w17-20020a170902a71100b001924ce13695mr59084335plq.57.1673046805391; Fri, 06 Jan 2023 15:13:25 -0800 (PST) Received: from Ginko ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id k11-20020a170902c40b00b001889e58d520sm1397152plk.184.2023.01.06.15.13.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 15:13:24 -0800 (PST) From: Frank Pursel Date: Fri, 6 Jan 2023 10:46:18 -0800 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=frank.pursel@gmail.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, 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_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673046875; 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=cKz78GpmJw3STvua0dKI1jEgMI6mHhTGofjcLCvdtuM=; b=WxsfRlQRyUwUUHtMs9pFtPMCuo2O2lxWdONjV7VJzkIIOO/z6WzvrLTXvIsgvP9An6Jifl yIhPn2xTrI78nDpbyze4Z+KtBCnUaPE+6RykhCjC/edahmNOk4fWRTJ2KMTQYUu0N8nx/x g1H1bIyG5e/etZVB6EtDXJlxzS89S+DLAbGdCuKZpqTjlmgiBDi9776Vi3QGV6PdWKvI5W vSTNkSolHR1erqDIFuBCu9psEoauAZ3a7PMaCOrqLzEL2No0s7nQe7kziWMdVD38UzAM50 2vRQYKpZltOxRuq1U+mfSTIA7lYbLgDnzhDvkY3mGTLhR3Rr6BD7fPGx4KU0Mw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lWp4JPHT; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673046875; a=rsa-sha256; cv=none; b=qjEBoqGQbyu5P4AAc+RZYOHlMO2PhtHGiErx2s6DLtgqJexCje0zXUalP+dNCUHqT3EfOs C2nT4W44X7z1ckQ7h9j9cU0wOxYN/6Cg6/quF6FI/u1mxgNc2SDkjsNQ+IKq+LX/uHDb/O UHkuiy4rcSmRLeFVSsR9VJj4XO8e16uX7GxUx5NPzUWsvalHeVhPD0Mn0Ny3rIKZKCbBiK GNRcaQLSX8btvU9KH2oQBQQao4a04cv0nmNOWpURMysG6lldu0zd1cW1VflH0rWfr7k1zw fOy7jWZktWz42pyqXLLD3itrVyChe366SEEmgHaxyFUwuhc+ERk0wqE5FIRIHA== X-Spam-Score: 5.74 X-Migadu-Queue-Id: 963C433B3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lWp4JPHT; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 5.74 X-TUID: higdsoUMkegw * gnu/packages/ditaa.scm: New file. --- gnu/packages/ditaa.scm | 218 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 gnu/packages/ditaa.scm diff --git a/gnu/packages/ditaa.scm b/gnu/packages/ditaa.scm new file mode 100644 index 0000000000..295a716d5a --- /dev/null +++ b/gnu/packages/ditaa.scm @@ -0,0 +1,218 @@ +;;; GNU Guix --- Functional package management for GNU +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . +;;; +;;; Copyright =C2=A9 2023 Frank Pursel +;;; + +(define-module (gnu packages ditaa) + #:use-module (gnu packages) + #:use-module (gnu packages java) + #:use-module (gnu packages xml) + #:use-module (gnu packages javascript) + #:use-module (gnu packages batik) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system ant) + #:use-module (guix modules) + #:use-module (guix build utils) ) + +(define-public java-libbatik + (package + (name "batik") + (version "1.16+dfsg") + (source + (origin + (method url-fetch) + (uri (string-append + "https://deb.debian.org/debian/pool/main/b/batik/"=20 + name "_"=20 + version ".orig.tar.xz")) + (sha256 (base32 + "1xnmnnadp4l74dz55d3ask236lwy0iwg981851d01j2zlrgpw4p9")) )) + (build-system ant-build-system) + (arguments + `(#:tests? #f + #:jar-name (string-append ,name ".jar") + #:source-dir "sources" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-prepackaged-jars + (lambda _ + (for-each + (lambda (jarf) + (delete-file jarf) + (format #t "Deleted: ~s\n" jarf)) + (find-files "." ".*\\.jar")) + #t) ) + (add-after + 'remove-prepackaged-jars 'src-consolidation + (lambda _ + (mkdir-p "sources") + (let ((cwd (getcwd)) + (sub-dirs (list "anim" "awt-util" "bridge" + "codec" "constants" "css" + "dom" "ext" "extension" + "gui-util" "gvt" "i18n" + "parser" "script" "slideshow" + "svgbrowser" "svg-dom" + "svggen" "svgpp" + "svgrasterizer" "swing" + "transcoder" "ttf2svg" + "util" "xml")) ) + (for-each + (lambda (sdir) + (copy-recursively + (string-append + "batik-" sdir "/src/main/java/") "sources/")= ) + sub-dirs) ) + ;; Remove scripting subdirs for jpython, and jacl.= =20 + (for-each + (lambda (rfile) + (delete-file rfile) + (format #t "Deleted: ~s\n" rfile)) + (append + (find-files + "sources/org/apache/batik/script/jpython" ) + (find-files + "sources/org/apache/batik/script/jacl" ) )) + #t) ) ) ) ) + (inputs (list rhino java-xmlgraphics-commons libxslt + java-jaxen java-junit java-jaxp java-xerces + java-jdom quickjs)) + (home-page "https://xmlgraphics.apache.org/batik") + (synopsis "The java based toolkit for Scalable Vector Graphics") + (description "Batik is a Java-based toolkit for applications or=20 +applets that want to use images in the Scalable Vector Graphics (SVG)=20 +format for various purposes, such as display, generation or manipulation.") + (license license:asl2.0) ) ) + +(define-public ditaa + (package + (name "ditaa") + (version "0.11.0") + (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 + "1y3g17wp1wvb05m56pp25avww2njpgh0gk0jsbsf25scj7hyyj26")))) + (build-system ant-build-system) + (inputs (list java-libbatik java-commons-cli java-w3c-svg + `(,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-after 'unpack 'remove-prepackaged-jars + (lambda _ + (for-each (lambda (jarf) + (delete-file jarf) + (format #t "Deleted: ~s\n" jarf)) + (find-files "." ".*\\.jar")) #t)) + (add-before 'build 'build-prep + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((batik-jar (search-input-file inputs + "share/java/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"= )) + (with-directory-excursion "build" + (substitute* "release.xml" + (("source=3D\"1.6\"") + "source=3D\"7\"") + (("") + (string-append "" + "\n" "")))) + #t)) + (replace 'build + (lambda* _ + (setenv "ANT_OPTS" + (string-append "-Dversion.string=3D" + ,version)) + (with-directory-excursion "build" + (invoke "ant" "-f" "release.xml" "release-jar")) #= t)) + (replace 'check + (lambda* (#:key 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"))) #f))) + (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 + "\n" + "JAVA_HOME=3D" + jre + " " + java + " -jar " + out + "/lib/" + jar-name + " $@")))) + (chmod ditaa #o755)) #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 + "ditaa is a small command-line utility=20 +that converts diagrams drawn using ascii art=20 +('drawings' that contain characters that resemble lines like | / - ),=20 +into proper bitmap graphics.") + (license license:lgpl3))) + + + + + base-commit: 22ffa5e00a05f75bb3b4285cd1ede28f2e7c6325 --=20 2.38.1