gnu: ant: Inherit from ant-bootstrap.

* gnu/packages/java.scm (ant)[build-system]
[home-page][synopsis][description][license]: Remove fields.
[arguments]: Adapt arguments of ant-bootstrap package.
This commit is contained in:
Ricardo Wurmus 2017-05-13 07:34:17 +02:00
parent fc6e27271d
commit fded0c69dd
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -702,7 +702,7 @@ (define ecj-javac-on-jamvm-wrapper-final
("classpath" ,classpath-devel))))) ("classpath" ,classpath-devel)))))
(define-public ant (define-public ant
(package (package (inherit ant-bootstrap)
(name "ant") (name "ant")
;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x
;; series requires Java 8. ;; series requires Java 8.
@ -714,45 +714,33 @@ (define-public ant
(sha256 (sha256
(base32 (base32
"1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n")))) "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
(build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ; no "check" target (substitute-keyword-arguments (package-arguments ant-bootstrap)
#:phases ((#:phases phases)
(alist-cons-after `(modify-phases ,phases
'unpack 'remove-scripts (add-after 'unpack 'remove-scripts
;; Remove bat / cmd scripts for DOS as well as the antRun and runant ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
;; wrappers. ;; wrappers.
(lambda _ (lambda _
(for-each delete-file (for-each delete-file
(find-files "src/script" (find-files "src/script"
"(.*\\.(bat|cmd)|runant.*|antRun.*)"))) "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
(alist-replace #t))
'build (replace 'build
(lambda _ (lambda _
(setenv "JAVA_HOME" (string-append (assoc-ref %build-inputs "gcj") (setenv "JAVA_HOME" (string-append (assoc-ref %build-inputs "gcj")
"/lib/jvm")) "/lib/jvm"))
;; Disable tests to avoid dependency on hamcrest-core, which needs ;; Disable tests to avoid dependency on hamcrest-core, which needs
;; Ant to build. This is necessary in addition to disabling the ;; Ant to build. This is necessary in addition to disabling the
;; "check" phase, because the dependency on "test-jar" would always ;; "check" phase, because the dependency on "test-jar" would always
;; result in the tests to be run. ;; result in the tests to be run.
(substitute* "build.xml" (substitute* "build.xml"
(("depends=\"jars,test-jar\"") "depends=\"jars\"")) (("depends=\"jars,test-jar\"") "depends=\"jars\""))
(zero? (system* "bash" "bootstrap.sh" (zero? (system* "bash" "bootstrap.sh"
(string-append "-Ddist.dir=" (string-append "-Ddist.dir="
(assoc-ref %outputs "out"))))) (assoc-ref %outputs "out"))))))))))
(alist-delete
'configure
(alist-delete 'install %standard-phases))))))
(native-inputs (native-inputs
`(("gcj" ,gcj))) `(("gcj" ,gcj)))))
(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)))
;; The bootstrap JDK consisting of jamvm, classpath-devel, ;; The bootstrap JDK consisting of jamvm, classpath-devel,
;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because ;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because