From 4490dff98c6979a77f3982716239b526e0ef1337 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Tue, 23 Mar 2021 23:13:23 +0100 Subject: gnu: Add java-xmlpull-api-v1. * gnu/packages/xml.scm (java-xmlpull-api-v1): New variable. --- gnu/packages/xml.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 2a72fc6ad2..b0b159c5aa 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2020 Pierre Langlois ;;; Copyright © 2021 Michael Rohleder ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; @@ -2008,6 +2009,60 @@ efficiently all input elements (for example in SOAP processors). This package is in maintenance mode.") (license (license:non-copyleft "file:///LICENSE.txt")))) +(define-public java-xmlpull-api-v1 + (package + (name "java-xmlpull-api-v1") + (version "1.1.3.4b") + (source (origin + ;; The package is originally from Extreme! Lab, but the website + ;; is now gone. This repositories contains the sources of the + ;; latest version. + (method git-fetch) + (uri (git-reference + (url "https://github.com/aslom/xmlpull-api-v1") + ;; No releases, this is the latest commit + (commit "abeaa4aa87b2625af70c32f658f44e11355fe568"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih")) + (modules '((guix build utils))) + (snippet + `(begin + (delete-file-recursively "lib") + (mkdir-p "lib") + ;; prevents a failure in "dist_lite" + (substitute* "build.xml" + (("README.html") "README.md")))))) + (build-system ant-build-system) + (arguments + `(#:test-target "junit" + #:build-target "dist" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" ,name "-" ,version)) + (java (string-append out "/share/java")) + (project (string-append + "xmlpull_" + ,(string-join (string-split version #\.) "_")))) + (mkdir-p doc) + (copy-recursively (string-append "build/dist/" project "/doc/") + doc) + (mkdir-p java) + (copy-file (string-append "build/dist/" project "/" project ".jar") + (string-append java "/" project ".jar"))) + ))))) + (home-page "https://github.com/aslom/xmlpull-api-v1") + (synopsis "XML pull parsing API") + (description "XmlPull v1 API is a simple to use XML pull parsing API. XML +pull parsing allows incremental (sometimes called streaming) parsing of XML +where application is in control - the parsing can be interrupted at any given +moment and resumed when application is ready to consume more input.") + (license license:public-domain))) + (define-public java-dom4j (package (name "java-dom4j") -- cgit 1.4.1