From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4AGBC2PH/2MeWQAAbAwnHQ (envelope-from ) for ; Wed, 01 Mar 2023 22:45:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iAG7C2PH/2PnOwEA9RJhRA (envelope-from ) for ; Wed, 01 Mar 2023 22:45:07 +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 CB61E86A0 for ; Wed, 1 Mar 2023 22:45:06 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=IGAiBV7s; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677707106; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=EyXCuX9ZAblLxDdYzVpY8q5K3/W7HxUmui5TRvPlsf4=; b=iMfbVlEXcJlGoo28hOdD+Wc5N1viWK/GjE62MDi6/F7NROcV13wqpzm7f86kLVUggMOsvD wE4K/lX96CwSVKLtdA5XHTmEuXVt0kthi7h97eQHt49U9SQUCiNn7VpdBwPZ/B2POuNlj0 32fGNlOETTRRfL3MmBiAjSoS92+m3aQb2WJH30ff9OZFsWe9RaENcSQ3tVkudUHEZp9MNM FRZr27/FlfVbbUD+AmLovdldjdPlEsM0m4XTBhLg56Au5GR8PJapLFxB1uS36bghzerxjb njQdiIZkBr69LFW+Qj9hzmopGJlRdaOmmMOpGwj7+LE9QE8jfAbclQdf/ZH+AA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=IGAiBV7s; 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=1677707106; a=rsa-sha256; cv=none; b=rNoiSca9RRZc980L9lkOUzarjgD5wXjWZWUyUMKxtM0Nlgkl5UTegiLObI1H7PV/ZD4QNh fxFIgZIqxYYJPS8hYHtLE/BhxIghTVxtO4RxgF+MSwvR+BMy9+koxqHZwpo9zm0sTLutCI 5fdE67fy4HbPm/tVx6qRrbQbvWjYIWxNkRSNZ0DqN8JgUAHvrM45mjF6IVfp7J4164Y0uS qs3Y1YKTyBEw2y4ssMHJ6esKlaxUkY3fhFUtL8UJyrop5EHrf99yUwIjr+zkD1pUVP/8FK 9MWdIux8Xf6J15et7vtLN9VrNb1Xo7q91fr9QNnll00aniA9CFkcmZpjsB3B2Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXUG0-0006T4-E8; Wed, 01 Mar 2023 16:45:04 -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 1pXUFy-0006O8-PU for guix-patches@gnu.org; Wed, 01 Mar 2023 16:45:02 -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 1pXUFy-0003PO-Fx for guix-patches@gnu.org; Wed, 01 Mar 2023 16:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXUFy-0001ZW-Cd for guix-patches@gnu.org; Wed, 01 Mar 2023 16:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60976] [PATCH v4 3/3] gnu: Add ditaa Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Mar 2023 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60976 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60976@debbugs.gnu.org, julien@lepillar.eu Received: via spool by 60976-submit@debbugs.gnu.org id=B60976.16777071006016 (code B ref 60976); Wed, 01 Mar 2023 21:45:02 +0000 Received: (at 60976) by debbugs.gnu.org; 1 Mar 2023 21:45:00 +0000 Received: from localhost ([127.0.0.1]:55181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXUFv-0001Yy-E0 for submit@debbugs.gnu.org; Wed, 01 Mar 2023 16:44:59 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:44985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXUFt-0001Yn-RV for 60976@debbugs.gnu.org; Wed, 01 Mar 2023 16:44:58 -0500 Received: by mail-pj1-f48.google.com with SMTP id h11-20020a17090a2ecb00b00237c740335cso683893pjs.3 for <60976@debbugs.gnu.org>; Wed, 01 Mar 2023 13:44:57 -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:references:date :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EyXCuX9ZAblLxDdYzVpY8q5K3/W7HxUmui5TRvPlsf4=; b=IGAiBV7sHzYqA74L/9+i29ft1A+flGlKENA+OwdaTHc8IVwEag2cMcjnd5aDesgQwW Pnlc9SYJ0od0Qf8sTY4hS4X2xyne1Az0zYwWmAH+jZ6zgl6pj22SNC/rG9Y8+NcX7STH s5IyduMgogtGAaNh1stlbOLCioInhnExUdVxkMzrUyy9D6J0Vklm6eV8NAWOvCXuuU9l sOba3TYYvm3nXLzCVqp3lzL7OSKcXmkDAVE2MV4z/qmwtEPI5P2uxPg03x3gTKAasJWC zUBauYzgWN1P8rljLe6r2eo38m1Gv7vt3IPIfirYDta3zWW0V1p5VKzkNql3zKS5QAja OESw== 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:references:date :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=EyXCuX9ZAblLxDdYzVpY8q5K3/W7HxUmui5TRvPlsf4=; b=2Yl2QUgqpkoYV2RLPiGqjSr6GRv96KIt2hzpu4TlMN1SM8eG8/DlFIQH6pRx7/Wam7 11s1aPazSKvTLbmFxagNkhjfBF/crmvrUuyiBC2pIHA7ypnH1JXRuwAFmc6Lo4wYR1nG pyQuY3sbguy71xXmDxegoTcSYCwC5eOxGKfza4D5AVFAgOKck6xuCWAr0iB+f1cV+5y2 G81zJ6pGeBcd4WLP7T7xmbCITo6iQpgBi9HUioQBewE8n4kyrNsz3l1cP26OnnhzzIqI 02SafR5mCs0Idu7fFKQtyURbTXPfu0OkJ3kIhsW7y5alVbvScjcXnK9e/OCAPiIjIePP VMvw== X-Gm-Message-State: AO0yUKWMJDUvLzNKm/bZRxhxdF/lR60RthnDxwpWsv/AUftMmdRT2eUX KeScVDV8/BnherZQlvIAiVnCdvXwypA= X-Google-Smtp-Source: AK7set+xfIhdyaWMOPIDqHRqDshsu3qAoxlyHp2DyIF17Y0s/aPyhALo752ssgSDGXz1OoDdmSqNIw== X-Received: by 2002:a17:90b:4f84:b0:237:9c41:de07 with SMTP id qe4-20020a17090b4f8400b002379c41de07mr18171040pjb.5.1677707091962; Wed, 01 Mar 2023 13:44:51 -0800 (PST) Received: from Ginko ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id c13-20020a17090ab28d00b0023440af7aafsm250582pjr.9.2023.03.01.13.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 13:44:51 -0800 (PST) From: Frank Pursel In-Reply-To: <48adf8ab622e5051d0012bfb45703c8a73cad92c.1677706130.git.frank.pursel@gmail.com> Date: Thu, 26 Jan 2023 09:01:17 -0800 References: <48adf8ab622e5051d0012bfb45703c8a73cad92c.1677706130.git.frank.pursel@gmail.com> Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: X-Migadu-Spam-Score: -0.99 X-Spam-Score: -0.99 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: CB61E86A0 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 X-TUID: ORNlBsEMnNkN --- The final piece, again. I've moved it into java-graphic.scm. Thanks for the feedback to get this on track. Regards, Frank Pursel gnu/packages/java-graphics.scm | 131 +++++++++++++++++++++++++++++++-- 1 file changed, 126 insertions(+), 5 deletions(-) diff --git a/gnu/packages/java-graphics.scm b/gnu/packages/java-graphics.scm index 9a71548b9c..6178bfbe4f 100644 --- a/gnu/packages/java-graphics.scm +++ b/gnu/packages/java-graphics.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2019 Ricardo Wurmus +;;; Copyright =C2=A9 2023 Frank Pursel ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,15 +19,135 @@ =20 (define-module (gnu packages java-graphics) #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix git-download) - #:use-module (guix utils) - #:use-module (guix build-system ant) - #:use-module (gnu packages) + #:use-module (gnu packages bash) + #:use-module (gnu packages batik) #:use-module (gnu packages java) + #:use-module (gnu packages java-xml) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages) + #:use-module (guix build utils) + #:use-module (guix build-system ant) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix utils) #:use-module (ice-9 match)) =20 +(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")) + (modules '((guix build utils))) + (snippet + '(begin + (format #t "~%~a~%" "Finding and removing embedded jars.= ") + (for-each + (lambda (jarf) + (delete-file jarf) + (format #t "Deleted: ~a~%" jarf)) + (find-files "." "\\.jar$")))))) + (build-system ant-build-system) + (inputs (list bash-minimal)) + (native-inputs (list + java-commons-cli + java-jericho-html + java-junit + java-libbatik + java-w3c-svg)) + (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 + "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" ""))))= )) + (replace 'build + (lambda* _ + (setenv "ANT_OPTS" + (string-append "-Dversion.string=3D" + ,version)) + (with-directory-excursion "build" + (invoke "ant" "-f" "release.xml" "release-jar")))) + (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 _ + (format #t "#!~a~%JAVA_HOME=3D~a ~a -jar ~a/~a $@~%" + bash jre java lib jar-name))) + (chmod ditaa #o755)))) + (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")))))))) + (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 @samp{|}=20 +@samp{/} @samp{-}),=20 +into proper bitmap graphics.") + (license license:lgpl3))) + (define-public java-piccolo2d-core (package (name "java-piccolo2d-core") --=20 2.39.1