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: 46427 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 2FBE427BBED; Thu, 26 Jan 2023 17:20:17 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham 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 0989627BBE9 for ; Thu, 26 Jan 2023 17:20:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pL5uu-0004EP-Ml; Thu, 26 Jan 2023 12:20: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 1pL5us-0004Dm-2B for guix-patches@gnu.org; Thu, 26 Jan 2023 12:20: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 1pL5ur-0003pz-Pj for guix-patches@gnu.org; Thu, 26 Jan 2023 12:20:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pL5ur-0005sx-J3 for guix-patches@gnu.org; Thu, 26 Jan 2023 12:20:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60976] [PATCH 2/3] gnu: Add java-libbatik Resent-From: Frank Pursel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Jan 2023 17:20: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.167475357522586 (code B ref 60976); Thu, 26 Jan 2023 17:20:01 +0000 Received: (at 60976) by debbugs.gnu.org; 26 Jan 2023 17:19:35 +0000 Received: from localhost ([127.0.0.1]:36093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5uQ-0005sE-Mh for submit@debbugs.gnu.org; Thu, 26 Jan 2023 12:19:35 -0500 Received: from mail-pj1-f44.google.com ([209.85.216.44]:44797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pL5uP-0005s1-Aa for 60976@debbugs.gnu.org; Thu, 26 Jan 2023 12:19:33 -0500 Received: by mail-pj1-f44.google.com with SMTP id h5-20020a17090a9c0500b0022bb85eb35dso2378451pjp.3 for <60976@debbugs.gnu.org>; Thu, 26 Jan 2023 09:19:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:date:in-reply-to :subject:to:from:message-id:from:to:cc:subject:date:message-id :reply-to; bh=XUFhXheDIdetPOrZmvvNj32BCBH2ReY/GBLjtEmCQs8=; b=KZXrcC9O+bMqOanRcHXFbdLP5q4nlsF2CsFtpIkuLbqEfQgLeN8xfFxlcm3PC3AxqZ 0/QKkGWqCYzEm9XBarINfGUNgmmnwYwdRURSBaLalpAUI1IbZa9eZ/D8uvjvXnnAyzak UsGK3ODoo9iOhd/LnLpixjV+1Xr8jXwpvG4SdoVi6YIQ0LjvQ9i8QKa3Xu5IQ/oNBWWI AC9/YbAHYc/RoCONnRY01vFdPEV3uzULiiCcLNQlTyoyTUWR9iB4oxmDoJlZcHI1dpTp havF8qiXJlOY19hH4eBndmwE9tIsagSZnV9IOWAzOlcic9QopW7ACRXFO7gkpx5BIvxg eHbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:date:in-reply-to :subject:to:from:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=XUFhXheDIdetPOrZmvvNj32BCBH2ReY/GBLjtEmCQs8=; b=nW3AonrsoU12UQHpIer+99iDJjGOaPOkWYxssips4oC5yfxMfwp3YaJ//P2e7f+Voh 5w+G7/UKq6yrVZHwdDLOy33RQ9dyD4H0EqCMd5jIhS2kX6yxIWy7X2AERCD3fIleMpho dZv080fPup3AdlnCnCZLpe1YMiAXB5TFgPuvgX8wGJ5zlHJJae7uxHn9Sam8N1f+7RfG TAk5acDg2TMjJdjT7owEhVduL3nwIix9kWTC2+w4zsL2ckU4BEBiX9uWqZZom0y8TwYw dpT8JfkeZvdTboOGybTqf4iQhRRkBVpc/fyn2nuayiArDEWlukFIldVkPx5rTpBcBtjF MhLw== X-Gm-Message-State: AO0yUKXXHb0drnX6VRnr6SXBIzUARADc5+Au+jGmWrloRHEdgmligxek OLogaLROaIK2JwNQbxBwggu7pFZxgSc= X-Google-Smtp-Source: AK7set9s6Ud7ts3Q/fPBBG6Gn1exLSjgaNQkuMJi23KtIU0c7Xt5PsWsiNd3vl2saj7uMsKlqMUZRQ== X-Received: by 2002:a17:902:dac9:b0:194:645a:fa9a with SMTP id q9-20020a170902dac900b00194645afa9amr7757948plx.8.1674753567114; Thu, 26 Jan 2023 09:19:27 -0800 (PST) Received: from Ginko ([66.170.190.211]) by smtp.gmail.com with ESMTPSA id e6-20020a170902744600b0018c7a5e052asm1211256plt.225.2023.01.26.09.19.26 for <60976@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 09:19:26 -0800 (PST) Message-ID: <63d2b61e.170a0220.d16b8.225e@mx.google.com> X-Google-Original-Message-ID: <4dded0fd7cc5556c2468bba775ecfe1a290ff5e2.1674752933.git.frank.pursel@gmail.com> From 4dded0fd7cc5556c2468bba775ecfe1a290ff5e2 Mon Sep 17 00:00:00 2001 From: Frank Pursel In-Reply-To: <1351eea169a28d30040826b14079fb49de3c98b8.1674752933.git.frank.pursel@gmail.com> Date: Thu, 26 Jan 2023 08:53:09 -0800 References: <1351eea169a28d30040826b14079fb49de3c98b8.1674752933.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