From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBIpn-0003pC-NG for guix-patches@gnu.org; Thu, 18 May 2017 06:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBIpi-00065O-RT for guix-patches@gnu.org; Thu, 18 May 2017 06:39:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49311) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBIpi-00065K-Ng for guix-patches@gnu.org; Thu, 18 May 2017 06:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dBIpi-0006ri-HK for guix-patches@gnu.org; Thu, 18 May 2017 06:39:02 -0400 Subject: bug#26966: [PATCH 04/22] gnu: Add ant-bootstrap. Resent-Message-ID: References: <20170517171905.7840-1-rekado@elephly.net> <20170517171905.7840-4-rekado@elephly.net> From: Roel Janssen In-reply-to: <20170517171905.7840-4-rekado@elephly.net> Date: Thu, 18 May 2017 12:38:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain 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: Ricardo Wurmus Cc: 26966@debbugs.gnu.org Ricardo Wurmus writes: > * gnu/packages/java.scm (ant-bootstrap): New variable. > --- > gnu/packages/java.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 68 insertions(+) > > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index d1efc3c4c..b12d641ff 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -186,6 +186,74 @@ etc.). SableVM is no longer maintained. > This package provides the virtual machine.") > (license license:lgpl2.1+))) > > +(define ant-bootstrap > + (package > + (name "ant-bootstrap") > + ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which > + ;; are not supported. The 1.8.x series is the last to use only features > + ;; supported by Jikes, but it cannot seem to be built with sablevm. > + (version "1.7.1") > + (source (origin > + (method url-fetch) > + (uri (string-append "http://archive.apache.org/dist/" > + "ant/source/apache-ant-" > + version "-src.tar.bz2")) > + (sha256 > + (base32 > + "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d")))) > + (build-system gnu-build-system) > + (arguments > + `(#:tests? #f ; no "check" target > + #:phases > + (modify-phases %standard-phases > + (add-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.*)")) > + #t)) > + (delete 'configure) > + (replace 'build > + (lambda* (#:key inputs #:allow-other-keys) > + (setenv "JAVA_HOME" > + (string-append (assoc-ref inputs "sablevm") > + "/lib/sablevm")) > + (setenv "JAVACMD" > + (string-append (assoc-ref inputs "sablevm") > + "/bin/java-sablevm")) > + (setenv "JAVAC" > + (string-append (assoc-ref inputs "sablevm") > + "/bin/javac-sablevm")) > + > + ;; Use jikes instead of javac for tags in build.xml > + (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") > + > + ;; jikes produces lots of warnings, but they are not very > + ;; interesting, so we silence them. > + (setenv "$BOOTJAVAC_OPTS" "-nowarn") Jikes! Hehe, sorry. :) > + > + ;; Disable tests because we are bootstrapping and thus don't have > + ;; any of the dependencies required to build and run the tests. > + (substitute* "build.xml" > + (("depends=\"jars,test-jar\"") "depends=\"jars\"")) > + (zero? (system* "bash" "bootstrap.sh" > + (string-append "-Ddist.dir=" > + (assoc-ref %outputs "out")))))) > + (delete 'install)))) > + (native-inputs > + `(("jikes" ,jikes) > + ("sablevm" ,sablevm))) > + (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 java-swt > (package > (name "java-swt") LGTM! Kind regards, Roel Janssen