From: Frank Pursel <frank.pursel@gmail.com>
To: 60976@debbugs.gnu.org
Subject: [bug#60976] [PATCH v3 4/4] java-jericho-html: Using bzr-fetch and complete testing.
Date: Thu, 23 Feb 2023 13:00:27 -0800 [thread overview]
Message-ID: <c145fc109ab02bef8f3309f8ea4806fb4196c47e.1677369969.git.frank.pursel@gmail.com> (raw)
In-Reply-To: <1351eea169a28d30040826b14079fb49de3c98b8.1677369969.git.frank.pursel@gmail.com>
---
gnu/packages/java-xml.scm | 118 +++++++++++++++-----------------------
1 file changed, 46 insertions(+), 72 deletions(-)
diff --git a/gnu/packages/java-xml.scm b/gnu/packages/java-xml.scm
index 9cf256549b..739b525fa0 100644
--- a/gnu/packages/java-xml.scm
+++ b/gnu/packages/java-xml.scm
@@ -30,6 +30,7 @@ (define-module (gnu packages java-xml)
#:use-module (gnu packages compression)
#:use-module (gnu packages gtk)
#:use-module (gnu packages java)
+ #:use-module (guix bzr-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix packages)
@@ -39,82 +40,55 @@ (define-module (gnu packages java-xml)
#: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
+ (package
+ (name "java-jericho-html")
+ (version "3.4")
+ (source (origin
+ (method bzr-fetch)
+ (uri
+ (bzr-reference
+ (url
+ "http://jerichohtml.bzr.sourceforge.net/bzr/jerichohtml")
+ (revision (string-append "tag:" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1zsf4i33jn05pma4y1658d6avhw7x4c12ggs96szhc06b7bxs8j0"))
+ (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")
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'add-ant-env-options
+ (lambda* _
+ (setenv "ANT_OPTS" "-Dfile.encoding=iso-8859-1")
+ (let ((match-str
+ (string-append "jerichohtml-" ,version)))
+ (substitute* "build.xml"
+ ((match-str)
+ "")))
+ #t))
+ (add-after 'build 'check-prep
+ (lambda* (#:key source #:allow-other-keys)
+ (mkdir-p "src/test/java")
+ #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)))))
+ (synopsis "Java HTML Parser library")
+ (license (list license:lgpl2.1+ license:asl2.0 license:epl1.0))))
(define-public java-simple-xml
(package
--
2.39.1
prev parent reply other threads:[~2023-02-26 0:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1351eea169a28d30040826b14079fb49de3c98b8.1677369969.git.frank.pursel@gmail.com>
2023-01-26 16:53 ` [bug#60976] [PATCH v3 2/4] gnu: Add java-libbatik Frank Pursel
2023-02-26 7:59 ` Julien Lepiller
2023-01-26 17:01 ` [bug#60976] [PATCH v3 3/4] gnu: Add ditaa Frank Pursel
2023-02-26 8:19 ` Julien Lepiller
2023-02-23 21:00 ` Frank Pursel [this message]
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=c145fc109ab02bef8f3309f8ea4806fb4196c47e.1677369969.git.frank.pursel@gmail.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).