From patchwork Thu Jan 26 16:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Pursel X-Patchwork-Id: 10361 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 31E0716BBF; Sun, 26 Feb 2023 00:32:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4274B1685F for ; Sun, 26 Feb 2023 00:32:14 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pW4xU-0008Gr-6T; Sat, 25 Feb 2023 19:32:12 -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 1pW4xO-0008Fi-1U for guix-patches@gnu.org; Sat, 25 Feb 2023 19:32:05 -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 1pW4xN-00089n-PX for guix-patches@gnu.org; Sat, 25 Feb 2023 19:32:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pW4xN-0006t8-LH for guix-patches@gnu.org; Sat, 25 Feb 2023 19:32:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60976] [PATCH v3 2/4] gnu: Add java-libbatik Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Feb 2023 00:32:01 +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 Received: via spool by 60976-submit@debbugs.gnu.org id=B60976.167737150126451 (code B ref 60976); Sun, 26 Feb 2023 00:32:01 +0000 Received: (at 60976) by debbugs.gnu.org; 26 Feb 2023 00:31:41 +0000 Received: from localhost ([127.0.0.1]:41852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pW4x2-0006sY-Gp for submit@debbugs.gnu.org; Sat, 25 Feb 2023 19:31:40 -0500 Received: from mail-pl1-f172.google.com ([209.85.214.172]:40876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pW4x0-0006sK-FN for 60976@debbugs.gnu.org; Sat, 25 Feb 2023 19:31:39 -0500 Received: by mail-pl1-f172.google.com with SMTP id u14so3295862ple.7 for <60976@debbugs.gnu.org>; Sat, 25 Feb 2023 16:31:38 -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=v81sBx/h55hBXu6+3ebuY4o25RzA3HVjpRFAqiaMh64=; b=ZpB4WyZrfrKK9ndMtVdjSrLfRsjDOTTrV6tGDH/zw6cpn15sorQwEySdgyVmoJgSNV Vo3lz3F4rwHkMfGaus8OZUzClxk7qzmDHvShLoVJf74TxAzfPyUmciaGVL+jfKC9LjAO xOXp1Hy4jqJaDbAM+OOJYJSyKmauCf2AhO79LIRD54Uk991jXiJu1pY7yJJQZG02UF9Q 94D/4qx3mrJrUh2h70soNM+7JSgfrrI/BZIGERC1GTla0SfSLN7LraQPdD7/iFXMuEmG +TaqEcx0m+TevOk+/dH2PkfkXS/+LX52QnO3ouTq6Vl1n8mhfCp1jkPZMc+JOmkg5wNL PrEg== 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=v81sBx/h55hBXu6+3ebuY4o25RzA3HVjpRFAqiaMh64=; b=7XVUHulYe6L+hqsVKGjC9+MHkDRcDleKwSkq82Ojkl00O/e2oZtPY0V5rsfbvzpndA l9pe1lcYuVRoNLQmfRwlC64LW/6asZa+Q0oZ+qhtHSpBzqOdLnASoPek8euVzmh15Idn vfv16g8FNqYbrgLO5pt+ljSBxBTl0b8e6zgxCHnz/1+ZGS96RcQb6CuVg+lApoxeQWT4 BMvswF2hWZCmfajU4QNiXYsM8H/1lRfcthmr3gfPZzA3g5Yum1U4YL6m0+65s+jpXojD S+SOLDddkstG/POiNMnSzWoi4JjbTl/INNyWUXc73rWExcw4zCfn/YWNpzLyVeR+EB2m yhew== X-Gm-Message-State: AO0yUKXqP01xdtQAGzMRT53YRTErxAwEFyVuj09e2GVmZ/Nvwm4lfdei qvAaXcz/iXgSCS+D0+6VTg7Uo90P3jM= X-Google-Smtp-Source: AK7set+yKX7dgTvI6l0EvuvxWZUD5H1goMJp/5u15nvXOB2ZxPCMsV2mZ8nCUV900JI+LPz+gFRB0g== X-Received: by 2002:a05:6a21:789c:b0:cb:c276:58cc with SMTP id bf28-20020a056a21789c00b000cbc27658ccmr18302993pzc.28.1677371491926; Sat, 25 Feb 2023 16:31:31 -0800 (PST) Received: from Ginko ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id g11-20020aa7818b000000b0059072daa002sm1679995pfi.192.2023.02.25.16.31.30 for <60976@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Feb 2023 16:31:31 -0800 (PST) From: Frank Pursel In-Reply-To: <1351eea169a28d30040826b14079fb49de3c98b8.1677369969.git.frank.pursel@gmail.com> Date: Thu, 26 Jan 2023 08:53:09 -0800 References: <1351eea169a28d30040826b14079fb49de3c98b8.1677369969.git.frank.pursel@gmail.com> Message-Id: <4dded0fd7cc5556c2468bba775ecfe1a290ff5e2.1677369969.git.frank.pursel@gmail.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches --- gnu/packages/batik.scm | 82 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/gnu/packages/batik.scm b/gnu/packages/batik.scm index 7f159010a5..662c4f5cd5 100644 --- a/gnu/packages/batik.scm +++ b/gnu/packages/batik.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Danny Milosavljevic ;;; Copyright © 2020 Tobias Geerinckx-Rice +;;; Copyright © 2023 Frank Pursel ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,8 +28,87 @@ (define-module (gnu packages batik) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages java) + #:use-module (gnu packages javascript) #:use-module (gnu packages java-xml) - #:use-module (gnu packages textutils)) + #:use-module (gnu packages textutils) + #:use-module (gnu packages xml)) + +(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/" + name "_" + version ".orig.tar.xz")) + (sha256 (base32 + "1xnmnnadp4l74dz55d3ask236lwy0iwg981851d01j2zlrgpw4p9")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Identify and delete bundled jars. + (format #t "~%~a~%" "Removing sourced jars") + (for-each + (lambda (f) + (delete-file f) + (format #t "Deleted: ~a~%" f)) + (find-files "." "\\.jar$")) + )))) + (build-system ant-build-system) + (arguments + `(#:jar-name (string-append ,name ".jar") + #:source-dir "sources/src/main/java" + #:test-dir "sources/src/test" + #:test-exclude (list "**/util/*.java") + #:phases + (modify-phases %standard-phases + (add-after + 'unpack '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" "test" + "test-svg" "transcoder" "ttf2svg" + "util" "xml" "test-swing")) ) + (for-each + (lambda (sdir) + (copy-recursively + (string-append + "batik-" sdir) "sources/") ) + sub-dirs) ) + ;; Prep testing + (copy-recursively + "test-resources" "sources") + ;; Remove scripting subdirs for jpython, and jacl. + (for-each + (lambda (rfile) + (delete-file rfile) + (format #t "Deleted: ~s\n" rfile)) + (append + (find-files + "sources/src/main/java/org/apache/batik/script/jpython" ) + (find-files + "sources/src/main/java/org/apache/batik/script/jacl" ) )) + #t) ) ) ) ) + (native-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 +applets that want to use images in the Scalable Vector Graphics (SVG) +format for various purposes, such as display, generation or manipulation.") + (license license:asl2.0) ) ) (define-public java-w3c-smil-3.0 (package