From: Frank Pursel <frank.pursel@gmail.com>
To: 60976@debbugs.gnu.org
Subject: [bug#60976] [PATCH v3 1/4] gnu: Add java-jericho-html
Date: Thu, 26 Jan 2023 08:46:25 -0800 [thread overview]
Message-ID: <63faa821.170a0220.bf499.2f6f@mx.google.com> (raw)
In-Reply-To: <63cb23b3.650a0220.26d15.f66d@mx.google.com>
---
The main point here is to give us ditaa but we also want the ziggaraut
to be fully guix maintainable. Hence here I submit another complete
patch set providing all that preceeded plus changes to java-jericho-html
that, in hindsight, I wish I had put in there in the first place.
Better late than never.
Regards,
Frank Pursel
gnu/packages/java-xml.scm | 79 +++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/gnu/packages/java-xml.scm b/gnu/packages/java-xml.scm
index 5b16806e27..9cf256549b 100644
--- a/gnu/packages/java-xml.scm
+++ b/gnu/packages/java-xml.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
;;; Copyright © 2022 Christopher Baines <mail@cbaines.net>
+;;; Copyright © 2023 Frank Pursel <frank.pursel@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,84 @@ (define-module (gnu packages java-xml)
#:use-module (guix build-system ant)
#:use-module (guix utils))
+(define-public java-jericho-html
+ (let ((ver "3.4")
+ (hash "1i7z3b8yamgkm7p3pv9qzv8l2kw15ccxy1aj9mpbf66kzkkds51i")
+ (internal-name "jericho-html"))
+ (package
+ (name "java-jericho-html")
+ (version ver)
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append
+ "https://sourceforge.net/projects/jerichohtml"
+ "/files/jericho-html/3.4/jericho-html-3.4.zip/download"))
+ (sha256
+ (base32
+ hash))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ (format #t "~%~a~%" "Removing sourced jar files.")
+ (for-each (lambda (jarf)
+ (delete-file jarf)
+ (format #t "Deleted: ~a~%" jarf))
+ (find-files "." "\\.jar$"))))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name (string-append ,name ".jar")
+ #:source-dir (string-append ,internal-name "-"
+ ,ver "/src/")
+ #:test-dir (string-append ,internal-name "-"
+ ,ver "/test/")
+ #:test-exclude (list "**/StAXTest.java"
+ "**/NodeIteratorTest.java"
+ "**/ScriptTest.java"
+ "**/SegmentGetStyleURISegmentsTest.java"
+ "**/SegmentTest.java"
+ "**/StreamedSourceTest.java"
+ "**/HTMLSanitiserTest.java")
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'add-ant-env-options
+ (lambda* _
+ (setenv "ANT_OPTS" "-Dfile.encoding=iso-8859-1") #t))
+ (add-after 'build 'check-prep
+ (lambda* (#:key source #:allow-other-keys)
+ (let* ((cwd (getcwd))
+ (jericho-test (string-append cwd "/" ,internal-name
+ "-" ,ver "/test"))
+ (test (string-append jericho-test "/test"))
+ (test-data (string-append jericho-test "/data"))
+ (test-src (string-append jericho-test "/src"))
+ (test-src-data (string-append test-src "/data")))
+ (format #t "~%Check Prep dir: ~s\n" cwd)
+ (substitute* "build.xml"
+ (("\\$\\{test\\.home\\}/java")
+ "${test.home}/src"))
+ (mkdir-p (string-append cwd "/build/test-classes"))
+ (copy-recursively (string-append cwd
+ "/"
+ ,internal-name
+ "-"
+ ,ver
+ "/samples/console/classes")
+ (string-append cwd
+ "/build/test-classes/"))
+ (mkdir-p test-src-data)
+ (copy-recursively test-data
+ test-src-data))
+ #t)))))
+ (native-inputs (list java-junit java-slf4j-api java-log4j-api
+ java-commons-logging-minimal))
+ (home-page "http://jericho.htmlparser.net/docs/index.html")
+ (description
+ "A java library allowing analysis and manipulation of
+parts of an HTML document, including server-side tags, while
+reproducing verbatim any unrecognised or invalid HTML. It also
+provides high-level HTML form manipulation functions.
+")
+ (synopsis "Java HTML Parser library")
+ (license (list license:lgpl2.1+ license:asl2.0 license:epl1.0)))))
+
(define-public java-simple-xml
(package
(name "java-simple-xml")
base-commit: 0e480ca7b60428a62fc4681d7aca6c7c067add42
--
2.39.1
next prev parent reply other threads:[~2023-02-26 0:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 18:46 [bug#60976] [PATCH] gnu: Add ditaa Frank Pursel
2023-01-24 10:44 ` Simon Tournier
2023-01-25 2:50 ` Frank Pursel
2023-01-25 10:10 ` zimoun
2023-01-25 17:42 ` Frank Pursel
2023-01-26 12:36 ` Simon Tournier
2023-01-26 16:46 ` [bug#60976] [PATCH 1/3] gnu: Add java-jericho-html Frank Pursel
2023-01-26 16:46 ` [bug#60976] [PATCH v4 " Frank Pursel
2023-01-26 16:53 ` [bug#60976] [PATCH v4 2/3] gnu: Add java-libbatik Frank Pursel
2023-01-26 17:01 ` [bug#60976] [PATCH v4 3/3] gnu: Add ditaa Frank Pursel
2023-08-28 22:50 ` bug#60976: " Vagrant Cascadian
2023-01-26 16:46 ` Frank Pursel [this message]
2023-02-26 7:47 ` [bug#60976] [PATCH v3 1/4] gnu: Add java-jericho-html Julien Lepiller
2023-01-27 13:41 ` [bug#60976] [PATCH 3/3] Add ditaa Frank Pursel
2023-01-28 4:49 ` [bug#60976] [PATCH] gnu: " Frank Pursel
2023-03-09 0:25 ` Frank Pursel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63faa821.170a0220.bf499.2f6f@mx.google.com \
--to=frank.pursel@gmail.com \
--cc=60976@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).