From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH]: Add Ant. Date: Mon, 16 Feb 2015 17:38:59 +0100 Message-ID: References: <87r3u44jwg.fsf@gnu.org> <87fvahz5ze.fsf@gnu.org> <20150215154005.GA18600@debian> <87fva7m9u7.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNOhU-0004WE-J8 for guix-devel@gnu.org; Mon, 16 Feb 2015 11:39:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNOhR-0001gT-1F for guix-devel@gnu.org; Mon, 16 Feb 2015 11:39:12 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:36637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNOhQ-0001gK-Kd for guix-devel@gnu.org; Mon, 16 Feb 2015 11:39:08 -0500 In-Reply-To: <87fva7m9u7.fsf@mango.localdomain> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel --=-=-= Content-Type: text/plain Andreas Enge writes: > Then, please push! This is indeed very useful for me. Attached is yet another version that I intend to push. I added some more comments as to why gnu-build-system is used and why tests are disabled in two places. Typos have been fixed as well. The package is now named "ant", because I don't provide another more fully featured variant of Ant. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-Add-Ant.patch" >From e0df59826ff9d33e114ac00132c63306b8f873c5 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 30 Jan 2015 16:57:13 +0100 Subject: [PATCH] gnu: Add Ant. * gnu/packages/java.scm (ant): New variable. --- gnu/packages/java.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4a86f63..ece6606 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -48,6 +48,62 @@ #:use-module (gnu packages zip) #:use-module (gnu packages texinfo)) +(define-public ant + (package + (name "ant") + (version "1.9.4") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.apache.org/dist/ant/source/apache-ant-" + version "-src.tar.gz")) + (sha256 + (base32 + "09kf5s1ir0rdrclsy174bsvbdcbajza9fja490w4mmvcpkw3zpak")))) + ;; The build procedure for Ant has little in common with the standard GNU + ;; build procedure, but using the trivial-build-system would require + ;; considerably more code to unpack the sources, patch shebangs, and so + ;; on. + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:phases + (alist-cons-after + 'unpack 'remove-scripts + ;; Remove bat / cmd scripts for DOS as well as the antRun and runant + ;; wrappers. + (lambda _ + (for-each delete-file + (find-files "src/script" + "(.*\\.(bat|cmd)|runant.*|antRun.*)"))) + (alist-replace + 'build + (lambda _ + (setenv "JAVA_HOME" + (assoc-ref %build-inputs "icedtea6")) + ;; Disable tests to avoid dependency on hamcrest-core, which needs + ;; Ant to build. This is necessary in addition to disabling the + ;; "check" phase, because the dependency on "test-jar" would always + ;; result in the tests to be run. + (substitute* "build.xml" + (("depends=\"jars,test-jar\"") "depends=\"jars\"")) + (zero? (system* "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" + (assoc-ref %outputs "out"))))) + (alist-delete + 'configure + (alist-delete 'install %standard-phases)))))) + (native-inputs + `(("icedtea6" ,icedtea6))) + (home-page "http://ant.apache.org") + (synopsis "Build tool for Java") + (description + "Ant is a platform-independent build tool for Java. It is similar to +make but is implemented using the Java language, requires the Java platform, +and is best suited to building Java projects. Ant uses XML to describe the +build process and its dependencies, whereas Make uses Makefile format.") + (license license:asl2.0))) + (define-public icedtea6 (package (name "icedtea6") -- 2.1.0 --=-=-=--