GNU bug report logs - #54145
[PATCH] Adding package for xalan

Previous Next

Package: guix-patches;

Reported by: Frank Pursel <frank.pursel <at> gmail.com>

Date: Thu, 24 Feb 2022 18:27:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 54145 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#54145; Package guix-patches. (Thu, 24 Feb 2022 18:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Frank Pursel <frank.pursel <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 24 Feb 2022 18:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Frank Pursel <frank.pursel <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] Adding package for xalan
Date: Thu, 24 Feb 2022 10:26:26 -0800
Hi,

Xalan is another venerable package that I've seen we need to get other
things to work.  This is clean and works well with others.

Regards,
Frank

From 866c9adc6c7d47ef7e4bab4b37abddcec79c1844 Mon Sep 17 00:00:00 2001
Message-Id: <866c9adc6c7d47ef7e4bab4b37abddcec79c1844.1645726878.git.frank.pursel <at> gmail.com>
From: Frank Pursel <frank.pursel <at> gmail.com>
Date: Wed, 23 Feb 2022 13:59:26 -0800
Subject: [PATCH 1/3] xalan builds but may depend on bundled jars.

---
 gnu/packages/xml.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 6a897648eb..ef3f322516 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -2595,3 +2595,39 @@ (define-public python-xmltodict
     (description "This package provides a Python library to convert XML to
 @code{OrderedDict}.")
     (license license:expat)))
+
+(define-public xalan
+  (package
+    (name "xalan")
+    (version "j_2_7_2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://dlcdn.apache.org/xalan/xalan-j/source/xalan-"
+                           version "-src.tar.gz"))
+       (sha256
+        (base32 "166vg9i11qzi0vbv09abfb50q8caq8wr6zrwg0cwqws9k394l62w"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:phases (modify-phases
+                %standard-phases
+                (add-after 'unpack 'prepare-for-build
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (setenv "ANT_OPTS" "-Dxsltc.java_cup.not_needed=true")))
+                (replace 'install
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (jar (string-append out "/share/java/")))
+                      (install-file "build/xalan.jar" jar)
+                      (install-file "build/serializer.jar" jar))))
+                (delete 'generate-jar-indices)
+                ;; (add-after 'install 'fail
+                ;;   (lambda _
+                ;;     (fail)))
+                )))
+    (native-inputs (list java-junit java-hamcrest-core))
+    (home-page "https://xalan.apache.org/xalan-j/index.html")
+    (synopsis "Java XSLT processor")
+    (description "XSLT processor in java implementing XSLT Version 1.0, XPath
+Version 1.0, and JAXP 1.3.  It builds on SAX2 and DOM level 3.")
+    (license license:asl2.0)))
-- 
2.34.0


From 9c63946b3c65a65551daaa12ade79dbf3d99a9ae Mon Sep 17 00:00:00 2001
Message-Id: <9c63946b3c65a65551daaa12ade79dbf3d99a9ae.1645726878.git.frank.pursel <at> gmail.com>
In-Reply-To: <866c9adc6c7d47ef7e4bab4b37abddcec79c1844.1645726878.git.frank.pursel <at> gmail.com>
References: <866c9adc6c7d47ef7e4bab4b37abddcec79c1844.1645726878.git.frank.pursel <at> gmail.com>
From: Frank Pursel <frank.pursel <at> gmail.com>
Date: Thu, 24 Feb 2022 10:03:07 -0800
Subject: [PATCH] Adding a package for xalan

  * gnu/packages/xml.scm (xalan): Added package.

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 6a897648eb..d56228093c 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -33,6 +33,7 @@
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 David Larsson <david.larsson <at> selfhosted.xyz>
 ;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
+;;; Copyright © 2022 Frank Pursel <frank.pursel <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2595,3 +2596,62 @@ (define-public python-xmltodict
     (description "This package provides a Python library to convert XML to
 @code{OrderedDict}.")
     (license license:expat)))
+
+(define-public xalan
+  (package
+    (name "xalan")
+    (version "j_2_7_2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://dlcdn.apache.org/xalan/xalan-j/source/xalan-"
+                           version "-src.tar.gz"))
+       (sha256
+        (base32 "166vg9i11qzi0vbv09abfb50q8caq8wr6zrwg0cwqws9k394l62w"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Removing bundled jars
+                   (format #t "~%~a~%" "Removing Bundled Jars")
+                   (for-each
+                    (lambda (f)
+                      (format #t "~/Deleting: ~a~%" f)
+                      (delete-file f))
+                    (find-files "." "\\.jar$"))))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:phases (modify-phases
+                %standard-phases
+                (add-after 'unpack 'prepare-for-build
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (setenv "ANT_OPTS" "-Dxsltc.java_cup.not_needed=true")
+                    (substitute* "build.xml"
+                      ;; Only the interpretive compiler.  xsltc contains a
+                      ;; circular reference java_cup.
+                      (("(<target name=\"jar\" depends=\"xalan-interpretive.compile),.*"
+                        all pre)
+                       (string-append pre "\""))
+                      (("xml-apis") "jaxp"))
+                    (substitute* (list "src/MANIFEST.MF"
+                                       "src/manifest.xalan-interpretive"
+                                       "src/MANIFEST.SERIALIZER"
+                                       "src/manifest.xsltc")
+                      (("xml-apis.jar") "jaxp.jar"))))
+                (replace 'install
+                  (install-jars "build"))
+                (add-after 'install 'provide-jars-for-indexing
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (with-directory-excursion
+                        (string-append (assoc-ref outputs "out") "/share/java")
+                      (symlink
+                       (search-input-file inputs "share/java/jaxp.jar")
+                       "jaxp.jar")
+                      (symlink
+                       (search-input-file inputs "share/java/xercesImpl.jar")
+                       "xercesImpl.jar")))))))
+    (native-inputs (list java-junit java-hamcrest-core))
+    (propagated-inputs (list java-jaxp java-xerces))
+    (home-page "https://xalan.apache.org/xalan-j/index.html")
+    (synopsis "Java XSLT processor")
+    (description "XSLT processor in java implementing XSLT Version 1.0, XPath
+Version 1.0, and JAXP 1.3.  It builds on SAX2 and DOM level 3.")
+    (license license:asl2.0)))




Information forwarded to guix-patches <at> gnu.org:
bug#54145; Package guix-patches. (Thu, 24 Feb 2022 18:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 54145 <at> debbugs.gnu.org (full text, mbox):

From: Frank Pursel <frank.pursel <at> gmail.com>
To: 54145 <at> debbugs.gnu.org
Subject: [PATCH] Large typographical error 
Date: Thu, 24 Feb 2022 10:34:45 -0800
Hi,

Mistakes were made.  :(  Only the second part of my initial submission
with the [PATCH] (no parts) subject line was what I intended to send.
Hopefully no one tries to use that first bit.  

Regards,
Frank




This bug report was last modified 2 years and 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.