From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SJn-0005u7-Ls for guix-patches@gnu.org; Fri, 05 Oct 2018 11:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SJi-0004Uv-O2 for guix-patches@gnu.org; Fri, 05 Oct 2018 11:47:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8SJi-0004Up-Jx for guix-patches@gnu.org; Fri, 05 Oct 2018 11:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8SJi-0001Rt-GL for guix-patches@gnu.org; Fri, 05 Oct 2018 11:47:02 -0400 Subject: [bug#32947] [PATCH 3/3] gnu: Add java-xalan. Resent-Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 05 Oct 2018 17:46:47 +0200 From: Julien Lepiller In-Reply-To: <20181005152044.9682-3-dannym@scratchpost.org> References: <20181005151859.9616-1-dannym@scratchpost.org> <20181005152044.9682-1-dannym@scratchpost.org> <20181005152044.9682-3-dannym@scratchpost.org> Message-ID: <632a8e0a9673625822fe221e7c4c5812@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32947@debbugs.gnu.org Le 2018-10-05 17:20, Danny Milosavljevic a écrit : > * gnu/packages/java.scm (java-xalan): New variable. > --- > gnu/packages/java.scm | 54 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index 863a4b79c..02a8f65e8 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -9709,6 +9709,60 @@ the DOM level 3 load/save API's are in use.") > for Java.") > (license license:asl2.0))) > > +(define-public java-xalan > + (package > + (name "java-xalan") > + (version "2.7.2") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > "https://archive.apache.org/dist/xalan/xalan-j/source/" > + "xalan-j_" (string-join (string-split > version #\.) "_") > + "-src.tar.gz")) Could you use mirror://apache/xalan/xalan-j/source/...? > + (sha256 > + (base32 > + "166vg9i11qzi0vbv09abfb50q8caq8wr6zrwg0cwqws9k394l62w")))) > + (build-system ant-build-system) > + (arguments > + `(#:build-target "jar" > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-classpath > + (lambda _ > + (substitute* "src/MANIFEST.MF" > + (("^Class-Path: .*$") "\n")) > + #t)) > + (add-after 'unpack 'replace-prebuilt-jars > + (lambda* (#:key inputs #:allow-other-keys) > + (for-each delete-file > + (find-files "." "\\.jar$")) I think it's better to remove these files in a snippet. Also, there are .tar.gz files in the source archive that we could remove. > + (symlink (string-append (assoc-ref inputs > "java-commons-bcel") > + "/share/java/bcel.jar") > + "lib/BCEL.jar") > + (symlink (string-append (assoc-ref inputs "java-cup") > + > "/share/java/java-cup-11b-runtime.jar") > + "lib/runtime.jar") > + (symlink (string-append (assoc-ref inputs > "java-jakarta-regexp") > + > "/share/java/jakarta-regexp-1.5.jar") > + "lib/regexp.jar") maybe something like (let ((regexp (assoc-ref inputs "java-jakarta-regexp"))) (symlink (string-append regexp "/share/java/javakarta-regexp-" (package-version regexp) ".jar") "lib/regexp.jar")) would be more future-proof in case we update regexp? Same with the other dependencies. > + #t)) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (out-share (string-append out "/share/java"))) > + (mkdir-p out-share) > + (install-file "build/xalan.jar" out-share) > + #t)))))) > + (propagated-inputs > + `(("java-commons-bcel" ,java-commons-bcel) > + ("java-cup" ,java-cup) > + ("java-jakarta-regexp" ,java-jakarta-regexp) > + ("java-xerces" ,java-xerces))) > + (home-page "https://xml.apache.org/xalan-j/") > + (synopsis "XSLT processor for Java") > + (description "@code{xalan} is an XSLT processor for Java.") > + (license license:asl2.0))) > + > (define-public java-jline > (package > (name "java-jline")