From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBRcc-0001hc-QL for guix-patches@gnu.org; Thu, 18 May 2017 16:02:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBRcY-0001VX-U6 for guix-patches@gnu.org; Thu, 18 May 2017 16:02:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51184) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBRcY-0001VK-RA for guix-patches@gnu.org; Thu, 18 May 2017 16:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dBRcY-0005Tg-Jy for guix-patches@gnu.org; Thu, 18 May 2017 16:02:02 -0400 Subject: bug#26966: [PATCH 21/22] gnu: ant: Update to 1.10.1. Resent-Message-ID: References: <20170517171905.7840-1-rekado@elephly.net> <20170517171905.7840-21-rekado@elephly.net> From: Ricardo Wurmus In-reply-to: Date: Thu, 18 May 2017 22:00:58 +0200 Message-ID: <87h90inddx.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Roel Janssen Cc: 26966@debbugs.gnu.org Roel Janssen writes: > Ricardo Wurmus writes: > >> * gnu/packages/java.scm (ant): Update to 1.10.1. >> [arguments]: Adjust to build with latest JDK. >> [native-inputs]: Remove gcj; add icedtea-8. >> --- >> gnu/packages/java.scm | 16 +++++++--------- >> 1 file changed, 7 insertions(+), 9 deletions(-) >> >> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm >> index f90c3f483..4a5ee62a2 100644 >> --- a/gnu/packages/java.scm >> +++ b/gnu/packages/java.scm >> @@ -702,16 +702,14 @@ the standard javac executable. The tool runs on JamVM instead of SableVM."))) >> (define-public ant >> (package (inherit ant-bootstrap) >> (name "ant") >> - ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x >> - ;; series requires Java 8. >> - (version "1.9.9") >> + (version "1.10.1") >> (source (origin >> (method url-fetch) >> (uri (string-append "mirror://apache/ant/source/apache-ant-" >> version "-src.tar.gz")) >> (sha256 >> (base32 >> - "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")) >> + "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8")) >> (modules '((guix build utils))) >> (snippet >> '(begin >> @@ -731,9 +729,9 @@ the standard javac executable. The tool runs on JamVM instead of SableVM."))) >> "(.*\\.(bat|cmd)|runant.*|antRun.*)")) >> #t)) >> (replace 'build >> - (lambda _ >> - (setenv "JAVA_HOME" (string-append (assoc-ref %build-inputs "gcj") >> - "/lib/jvm")) >> + (lambda* (#:key inputs outputs #:allow-other-keys) >> + (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) >> + >> ;; 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 >> @@ -742,9 +740,9 @@ the standard javac executable. The tool runs on JamVM instead of SableVM."))) >> (("depends=\"jars,test-jar\"") "depends=\"jars\"")) >> (zero? (system* "bash" "bootstrap.sh" >> (string-append "-Ddist.dir=" >> - (assoc-ref %outputs "out")))))))))) >> + (assoc-ref outputs "out")))))))))) >> (native-inputs >> - `(("gcj" ,gcj))))) >> + `(("jdk" ,icedtea-8 "jdk"))))) >> >> ;; The bootstrap JDK consisting of jamvm, classpath-devel, >> ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because > > Interesting. This new bootstrap mechanism better work ;) It does, but I found a problem with this patch. The ant-build-system uses “ant”, obviously. But since ant 1.10.1 requires Java 8 support, we have to tell the ant-build-system to use the latest JDK as well. This means making “icedtea” a pointer to “icedtea-8” instead of “icedtea-7”. I don’t see a good reason not to do this anyway, as individual packages can always overwrite the packages with #:ant and #:jdk. I’ll also add a variant “ant/java7”, which will be ant 1.9.9, the last to build with icedtea-7, for those packages that cannot be built with the new default JDK. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net