From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH]: Add Ant. Date: Fri, 30 Jan 2015 17:04:10 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHE3U-0000pu-6C for guix-devel@gnu.org; Fri, 30 Jan 2015 11:04:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHE3P-0003JE-Qb for guix-devel@gnu.org; Fri, 30 Jan 2015 11:04:24 -0500 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:38660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHE3P-0003J7-Eo for guix-devel@gnu.org; Fri, 30 Jan 2015 11:04:19 -0500 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id D9036280584 for ; Fri, 30 Jan 2015 17:04:17 +0100 (CET) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YF6nI9tOIy25 for ; Fri, 30 Jan 2015 17:04:11 +0100 (CET) Received: from HTCATWO.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Fri, 30 Jan 2015 17:04:11 +0100 (CET) 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: guix-devel --=-=-= Content-Type: text/plain Hi Guix, this patch adds ant-minimal, a minimal configuration of Apache Ant. Ant can be configured with lots of optional libraries, but since most of these libraries are built with Ant, I think it makes sense to provide a minimal version. A wart is that Ant (even in the minimal configuration) depends on hamcrest-core, which can only be built with Ant. The good news is that it appears that hamcrest-core is only used for running the tests after Ant is built. I used the gnu-build-system instead of the trivial-build-system, because using the trivial-build-system required me to write a lot more code in order to unpack the tarball, patch shebangs, add tools to the PATH, etc. Using the gnu-build-system I only had to remove a few phases to make it work. Maybe we need a somewhat more powerful version of the trivial-build-system. ~~ Ricardo --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename="0001-gnu-Add-Ant.patch" >From a8cf4bbd4a8147215a84f27e4aa6247163b4fdf4 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-minimal): New variable. --- gnu/packages/java.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4a86f63..46ff798 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -48,6 +48,54 @@ #:use-module (gnu packages zip) #:use-module (gnu packages texinfo)) +(define-public ant-minimal + (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")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (alist-cons-after + 'unpack 'copy-hamcrest + (lambda _ + (copy-file (assoc-ref %build-inputs "hamcrest-core") + "lib/optional/hamcrest-core.jar")) + (alist-replace + 'build + (lambda _ + (setenv "JAVA_HOME" + (assoc-ref %build-inputs "icedtea6")) + (system* "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" + (assoc-ref %outputs "out")))) + (alist-delete + 'configure + (alist-delete + 'install + (alist-delete 'check (%standard-phases)))))))) + (inputs + `(("icedtea6" ,icedtea6) + ("hamcrest-core" + ,(origin + (method url-fetch) + (uri "https://hamcrest.googlecode.com/files/hamcrest-core-1.3.jar") + (sha256 + (base32 + "1sfqqi8p5957hs9yik44an3lwpv8ln2a6sh9gbgli4vkx68yzzb6")))))) + (home-page "http://ant.apache.org") + (synopsis "Build tool for Java") + (description + "Ant is a platform-independent build tool for Java.") + (license license:asl2.0))) + (define-public icedtea6 (package (name "icedtea6") -- 2.1.0 --=-=-=--