guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26966: [PATCH 21/22] gnu: ant: Update to 1.10.1.


From: Ricardo Wurmus
Subject: bug#26966: [PATCH 21/22] gnu: ant: Update to 1.10.1.
Date: Thu, 18 May 2017 22:00:58 +0200
User-agent: mu4e 0.9.18; emacs 25.2.1

Roel Janssen <address@hidden> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]