From d7ee90fe906aacb7f0bb1513195a1457970fd19d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 16 Jun 2018 12:20:32 +0200 Subject: build-system/ant: Unconditionally return #t in build phases. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/build/ant-build-system.scm (unpack, build, strip-jar-timestamps, check, install): Use invoke. Signed-off-by: Gábor Boskovits --- guix/build/ant-build-system.scm | 76 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'guix') diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm index d081a2b313..3ed12b9f4e 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Ricardo Wurmus +;;; Copyright © 2016, 2018 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -150,7 +150,8 @@ to the default GNU unpack strategy." (begin (mkdir "src") (with-directory-excursion "src" - (zero? (system* "jar" "-xf" source)))) + (invoke "jar" "-xf" source)) + #t) ;; Use GNU unpack strategy for things that aren't jar archives. ((assq-ref gnu:%standard-phases 'unpack) #:source source))) @@ -171,7 +172,7 @@ to the default GNU unpack strategy." (define* (build #:key (make-flags '()) (build-target "jar") #:allow-other-keys) - (zero? (apply system* `("ant" ,build-target ,@make-flags)))) + (apply invoke `("ant" ,build-target ,@make-flags))) (define* (generate-jar-indices #:key outputs #:allow-other-keys) "Generate file \"META-INF/INDEX.LIST\". This file does not use word wraps @@ -194,50 +195,49 @@ repack them. This is necessary to ensure that archives are reproducible." (format #t "repacking ~a\n" jar) (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) (manifest (string-append dir "/META-INF/MANIFEST.MF"))) - (and (with-directory-excursion dir - (zero? (system* "jar" "xf" jar))) - (delete-file jar) - ;; XXX: copied from (gnu build install) - (for-each (lambda (file) - (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files dir #:directories? #t)) + (with-directory-excursion dir + (invoke "jar" "xf" jar)) + (delete-file jar) + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files dir #:directories? #t)) - ;; The jar tool will always set the timestamp on the manifest file - ;; and the containing directory to the current time, even when we - ;; reuse an existing manifest file. To avoid this we use "zip" - ;; instead of "jar". It is important that the manifest appears - ;; first. - (with-directory-excursion dir - (let* ((files (find-files "." ".*" #:directories? #t)) - ;; To ensure that the reference scanner can detect all - ;; store references in the jars we disable compression - ;; with the "-0" option. - (command (if (file-exists? manifest) - `("zip" "-0" "-X" ,jar ,manifest ,@files) - `("zip" "-0" "-X" ,jar ,@files)))) - (unless (zero? (apply system* command)) - (error "'zip' failed")))) - (utime jar 0 0) - #t))) + ;; The jar tool will always set the timestamp on the manifest file + ;; and the containing directory to the current time, even when we + ;; reuse an existing manifest file. To avoid this we use "zip" + ;; instead of "jar". It is important that the manifest appears + ;; first. + (with-directory-excursion dir + (let* ((files (find-files "." ".*" #:directories? #t)) + ;; To ensure that the reference scanner can detect all + ;; store references in the jars we disable compression + ;; with the "-0" option. + (command (if (file-exists? manifest) + `("zip" "-0" "-X" ,jar ,manifest ,@files) + `("zip" "-0" "-X" ,jar ,@files)))) + (apply invoke command))) + (utime jar 0 0) + #t)) - (every (match-lambda - ((output . directory) - (every repack-archive (find-files directory "\\.jar$")))) - outputs)) + (for-each (match-lambda + ((output . directory) + (for-each repack-archive (find-files directory "\\.jar$")))) + outputs) + #t) (define* (check #:key target (make-flags '()) (tests? (not target)) (test-target "check") #:allow-other-keys) (if tests? - (zero? (apply system* `("ant" ,test-target ,@make-flags))) - (begin - (format #t "test suite not run~%") - #t))) + (apply invoke `("ant" ,test-target ,@make-flags)) + (format #t "test suite not run~%")) + #t) (define* (install #:key (make-flags '()) #:allow-other-keys) - (zero? (apply system* `("ant" "install" ,@make-flags)))) + (apply invoke `("ant" "install" ,@make-flags))) (define %standard-phases (modify-phases gnu:%standard-phases -- cgit v1.2.3 From 90ea1006a86518e523c510eee1214fd81e71da74 Mon Sep 17 00:00:00 2001 From: Gábor Boskovits Date: Tue, 12 Jun 2018 13:52:40 +0200 Subject: guix: ant-build-system: Use manifest task to create manifest. * guix/build/ant-build-system.scm (default-build.xml): Use manifest task to create manifest file instead of a custom echo task. --- guix/build/ant-build-system.scm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'guix') diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm index 3ed12b9f4e..87c782d853 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -68,14 +68,11 @@ (target (@ (name "manifest")) (mkdir (@ (dir "${manifest.dir}"))) - (echo (@ (file "${manifest.file}") - (message ,(string-append - (if main-class - (string-append - "Main-Class: " main-class - "${line.separator}") - "") - ""))))) + (manifest (@ (file "${manifest.file}")) + ,(if main-class + `(attribute (@ (name "Main-Class") + (value ,main-class))) + ""))) (target (@ (name "compile")) (mkdir (@ (dir "${classes.dir}"))) -- cgit v1.2.3 From 0e6cce2e01c1ff89e373cc77578853de11a7e8eb Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 25 Jun 2018 18:53:49 -0400 Subject: meson-build-system: Return #t from all phases. * guix/build/meson-build-system.scm (configure, build, check, install): (fix-runpath): Use 'invoke' and return #t from all phases. --- guix/build/meson-build-system.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'guix') diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-system.scm index e7690a4c37..e4aae8212f 100644 --- a/guix/build/meson-build-system.scm +++ b/guix/build/meson-build-system.scm @@ -58,15 +58,14 @@ (mkdir build-dir) (chdir build-dir) - (zero? (apply system* "meson" args)))) + (apply invoke "meson" args))) (define* (build #:key parallel-build? #:allow-other-keys) "Build a given meson package." - (zero? (apply system* "ninja" - (if parallel-build? - `("-j" ,(number->string (parallel-job-count))) - '("-j" "1"))))) + (invoke "ninja" "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1"))) (define* (check #:key test-target parallel-tests? tests? #:allow-other-keys) @@ -75,13 +74,13 @@ (number->string (parallel-job-count)) "1")) (if tests? - (zero? (system* "ninja" test-target)) + (invoke "ninja" test-target) (begin (format #t "test suite not run~%") #t))) (define* (install #:rest args) - (zero? (system* "ninja" "install"))) + (invoke "ninja" "install")) (define* (fix-runpath #:key (elf-directories '("lib" "lib64" "libexec" "bin" "sbin")) @@ -135,7 +134,7 @@ for example libraries only needed for the tests." (find-files dir elf-pred)) existing-elf-dirs)))) (for-each (lambda (elf-file) - (system* "patchelf" "--shrink-rpath" elf-file) + (invoke "patchelf" "--shrink-rpath" elf-file) (handle-file elf-file elf-list)) elf-list))))) (for-each handle-output outputs) -- cgit v1.2.3 From 2c8ac3641a673328d19677f8c8f2ebf690ad3c0e Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 28 Jun 2018 03:52:08 -0400 Subject: gnu: java: Return #t from all phases and snippets. * guix/build/java-utils.scm (ant-build-javadoc): Use invoke; return #t. * guix/build/ant-build-system.scm (generate-jar-indices): Return #t and remove vestigal plumbing. * gnu/packages/java.scm (classpath-bootstrap, ant-bootstrap, classpath-devel) (icedtea-6, icedtea-7, java-plexus-sec-dispatcher, ant/java8, clojure) (java-classpathx-servletapi, java-swt, java-qdox-1.12, java-hamcrest-core) (java-plexus-archiver, java-plexus-sec-dispatcher, java-modello-plugins-xml) (java-asm, java-commons-collections, java-commons-bsf, java-slf4j-api) (java-slf4j-api, java-slf4j-simple, java-stringtemplate-3) (java-stringtemplate, antlr3, antlr3-3.3, antlr3-3.1, java-ops4j-base-lang) (java-ops4j-pax-tinybundles, java-ops4j-pax-exam-core-spi) (java-fasterxml-jackson-core, java-fasterxml-jackson-databind) (java-fasterxml-jackson-modules-base-jaxb, java-ecj-3, java-ecj-3.5) (java-fasterxml-jackson-dataformat-yaml, java-woodstox-core) (java-fasterxml-jackson-dataformat-xml, java-testng, java-jnacl) (java-bouncycastle, java-powermock-core, java-powermock-modules-junit4) (java-jansi-native, java-jansi, java-commons-httpclient, java-commons-vfs) (java-apache-ivy, java-janino, java-logback-core): Return #t from all phases and snippets, use invoke where appropriate, and remove vestigial plumbing. --- gnu/packages/java.scm | 359 ++++++++++++++++++++++------------------ guix/build/ant-build-system.scm | 9 +- guix/build/java-utils.scm | 2 +- 3 files changed, 202 insertions(+), 168 deletions(-) (limited to 'guix') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e28ddc4bce..043696ca98 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -718,34 +718,32 @@ machine."))) (modify-phases %standard-phases (replace 'unpack (lambda* (#:key source inputs #:allow-other-keys) - (and (zero? (system* "tar" "xvf" source)) - (begin - (chdir (string-append "icedtea6-" ,version)) - (mkdir "openjdk") - (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") - ;; The convenient OpenJDK source bundle is no longer - ;; available for download, so we have to take the sources - ;; from the Mercurial repositories and change the Makefile - ;; to avoid tests for the OpenJDK zip archive. - (with-directory-excursion "openjdk" - (for-each (lambda (part) - (mkdir part) - (copy-recursively - (assoc-ref inputs - (string-append part "-src")) - part)) - '("jdk" "hotspot" "corba" - "langtools" "jaxp" "jaxws"))) - (substitute* "Makefile.in" - (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") - "echo \"trust me\";") - ;; The contents of the bootstrap directory must be - ;; writeable but when copying from the store they are - ;; not. - (("mkdir -p lib/rt" line) - (string-append line "; chmod -R u+w $(BOOT_DIR)"))) - (zero? (system* "chmod" "-R" "u+w" "openjdk")) - #t)))) + (invoke "tar" "xvf" source) + (chdir (string-append "icedtea6-" ,version)) + (mkdir "openjdk") + (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk") + ;; The convenient OpenJDK source bundle is no longer + ;; available for download, so we have to take the sources + ;; from the Mercurial repositories and change the Makefile + ;; to avoid tests for the OpenJDK zip archive. + (with-directory-excursion "openjdk" + (for-each (lambda (part) + (mkdir part) + (copy-recursively + (assoc-ref inputs + (string-append part "-src")) + part)) + '("jdk" "hotspot" "corba" + "langtools" "jaxp" "jaxws"))) + (substitute* "Makefile.in" + (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;") + "echo \"trust me\";") + ;; The contents of the bootstrap directory must be + ;; writeable but when copying from the store they are + ;; not. + (("mkdir -p lib/rt" line) + (string-append line "; chmod -R u+w $(BOOT_DIR)"))) + (invoke "chmod" "-R" "u+w" "openjdk"))) (add-after 'unpack 'use-classpath (lambda* (#:key inputs #:allow-other-keys) (let ((jvmlib (assoc-ref inputs "classpath")) @@ -1081,23 +1079,22 @@ bootstrapping purposes.") (let ((dir (or dir (string-drop-right name 5)))) (mkdir dir) - (zero? (system* "tar" "xvf" - (assoc-ref inputs name) - "-C" dir - "--strip-components=1")))))) + (invoke "tar" "xvf" + (assoc-ref inputs name) + "-C" dir + "--strip-components=1"))))) (mkdir target) - (and - (zero? (system* "tar" "xvf" source - "-C" target "--strip-components=1")) - (chdir target) - (unpack "openjdk-src" "openjdk.src") - (with-directory-excursion "openjdk.src" - (for-each unpack - (filter (cut string-suffix? "-drop" <>) - (map (match-lambda - ((name . _) name)) - inputs)))) - #t)))) + (invoke "tar" "xvf" source + "-C" target "--strip-components=1") + (chdir target) + (unpack "openjdk-src" "openjdk.src") + (with-directory-excursion "openjdk.src" + (for-each unpack + (filter (cut string-suffix? "-drop" <>) + (map (match-lambda + ((name . _) name)) + inputs)))) + #t))) (add-after 'unpack 'fix-x11-extension-include-path (lambda* (#:key inputs #:allow-other-keys) (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk" @@ -1322,17 +1319,18 @@ bootstrapping purposes.") (let ((line (read-line port))) (cond ((eof-object? line) #t) - ((regexp-exec error-pattern line) #f) + ((regexp-exec error-pattern line) + (error "test failed")) (else (loop))))))) (run-test (lambda (test) - (system* "make" test) + (invoke "make" test) (call-with-input-file (string-append "test/" test ".log") checker)))) - (or #t ; skip tests - (and (run-test "check-hotspot") - (run-test "check-langtools") - (run-test "check-jdk")))))) + (when #f ; skip tests + (run-test "check-hotspot") + (run-test "check-langtools") + (run-test "check-jdk"))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((doc (string-append (assoc-ref outputs "doc") @@ -1695,9 +1693,9 @@ new Date();")) ;; result in the tests to be run. (substitute* "build.xml" (("depends=\"jars,test-jar\"") "depends=\"jars\"")) - (zero? (system* "bash" "bootstrap.sh" - (string-append "-Ddist.dir=" - (assoc-ref outputs "out")))))))))) + (invoke "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" + (assoc-ref outputs "out"))))))))) (native-inputs `(("jdk" ,icedtea-8 "jdk") ("zip" ,zip) @@ -1827,14 +1825,13 @@ new Date();")) (lambda (name) (mkdir-p name) (with-directory-excursion name - (or (zero? (system* "tar" - ;; Use xz for repacked tarball. - "--xz" - "--extract" - "--verbose" - "--file" (assoc-ref inputs name) - "--strip-components=1")) - (error "failed to unpack tarball" name))) + (invoke "tar" + ;; Use xz for repacked tarball. + "--xz" + "--extract" + "--verbose" + "--file" (assoc-ref inputs name) + "--strip-components=1")) (copy-recursively (string-append name "/src/main/clojure/") "src/clj/")) '("core-specs-alpha-src" @@ -1847,7 +1844,7 @@ new Date();")) ;; The javadoc target is not built by default. (add-after 'build 'build-doc (lambda _ - (zero? (system* "ant" "javadoc")))) + (invoke "ant" "javadoc"))) ;; Needed since no install target is provided. (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -2009,7 +2006,8 @@ debugging, etc.") (lambda (in out) (display "Manifest-Version: 1.0 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" - out))))) + out))) + #t)) (replace 'install (install-jars "."))))) (home-page "https://eclipse.org") (synopsis "Eclipse Java development tools core batch compiler") @@ -2042,7 +2040,8 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" (lambda (in out) (dump-port in out) (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" - out))))) + out))) + #t)) (replace 'install (install-jars "."))))) (native-inputs `(("unzip" ,unzip))))) @@ -2509,7 +2508,7 @@ HDF5 files, building on the libraries provided by the HDF Group.") (modify-phases %standard-phases (replace 'install (lambda* (#:key make-flags #:allow-other-keys) - (zero? (apply system* `("ant" "dist" ,@make-flags)))))))) + (apply invoke `("ant" "dist" ,@make-flags))))))) (home-page "https://www.gnu.org/software/classpathx/") (synopsis "Java servlet API implementation") (description "This is the GNU servlet API distribution, part of the @@ -2551,11 +2550,11 @@ API and version 2.1 of the Java ServerPages API.") (modify-phases %standard-phases (replace 'unpack (lambda* (#:key source #:allow-other-keys) - (and (mkdir "swt") - (zero? (system* "unzip" source "-d" "swt")) - (chdir "swt") - (mkdir "src") - (zero? (system* "unzip" "src.zip" "-d" "src"))))) + (mkdir "swt") + (invoke "unzip" source "-d" "swt") + (chdir "swt") + (mkdir "src") + (invoke "unzip" "src.zip" "-d" "src"))) ;; The classpath contains invalid icecat jars. Since we don't need ;; anything other than the JDK on the classpath, we can simply unset ;; it. @@ -2570,7 +2569,7 @@ API and version 2.1 of the Java ServerPages API.") (mkdir-p lib) (setenv "OUTPUT_DIR" lib) (with-directory-excursion "src" - (zero? (system* "bash" "build.sh")))))) + (invoke "bash" "build.sh"))))) (add-after 'install 'install-native (lambda* (#:key outputs #:allow-other-keys) (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) @@ -2656,7 +2655,7 @@ decompression and random access decompression have been fully implemented.") (lambda* (#:key source #:allow-other-keys) (mkdir "src") (with-directory-excursion "src" - (zero? (system* "jar" "-xf" source))))) + (invoke "jar" "-xf" source)))) ;; At this point we don't have junit, so we must remove the API ;; tests. (add-after 'unpack 'delete-tests @@ -2767,7 +2766,8 @@ private Method[] getSortedMethods() { return _allMethods; } -private Method[] allMethods = getSortedMethods();"))))) +private Method[] allMethods = getSortedMethods();"))) + #t)) (add-before 'build 'do-not-use-bundled-qdox (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" @@ -3058,7 +3058,8 @@ reusing it in maven.") (lambda _ ;; Requires an older version of plexus container (delete-file - "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java"))) + "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java") + #t)) (add-before 'build 'copy-resources (lambda _ (mkdir-p "build/classes/META-INF/plexus") @@ -3251,15 +3252,15 @@ Compiler component."))) (add-before 'build 'generate-models (lambda* (#:key inputs #:allow-other-keys) (define (modello-single-mode file version mode) - (zero? (system* "java" - "org.codehaus.modello.ModelloCli" - file mode "src/main/java" version - "false" "true"))) + (invoke "java" + "org.codehaus.modello.ModelloCli" + file mode "src/main/java" version + "false" "true")) (let ((file "src/main/mdo/settings-security.mdo")) - (and (modello-single-mode file "1.0.0" "java") (modello-single-mode file "1.0.0" "xpp3-reader") - (modello-single-mode file "1.0.0" "xpp3-writer"))))) + (modello-single-mode file "1.0.0" "xpp3-writer")) + #t)) (add-before 'build 'generate-components.xml (lambda _ (mkdir-p "build/classes/META-INF/plexus") @@ -3288,10 +3289,12 @@ Compiler component."))) \n \n \n -\n"))))) +\n"))) + #t)) (add-before 'check 'fix-paths (lambda _ - (copy-recursively "src/test/resources" "target")))))) + (copy-recursively "src/test/resources" "target") + #t))))) (inputs `(("java-plexus-cipher" ,java-plexus-cipher))) (native-inputs @@ -3514,7 +3517,8 @@ XSD and documentation.") (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test" (substitute* "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java" - (("src/test") "modello-plugins/modello-plugin-xml/src/test")))))))) + (("src/test") "modello-plugins/modello-plugin-xml/src/test"))) + #t))))) (inputs `(("java-modello-core" ,java-modello-core) ("java-modello-plugins-java" ,java-modello-plugins-java) @@ -3609,9 +3613,9 @@ on the XPP3 API (XML Pull Parser)."))) ;; We cannot use the "jar" target because it depends on a couple ;; of unpackaged, complicated tools. (mkdir "dist") - (zero? (system* "jar" - "-cf" (string-append "dist/asm-" ,version ".jar") - "-C" "output/build/tmp" ".")))) + (invoke "jar" + "-cf" (string-append "dist/asm-" ,version ".jar") + "-C" "output/build/tmp" "."))) (replace 'install (install-jars "dist"))))) (native-inputs @@ -4099,7 +4103,8 @@ are many features, including: (mkdir-p "build/conf") (call-with-output-file "build/conf/MANIFEST.MF" (lambda (file) - (format file "Manifest-Version: 1.0\n"))))) + (format file "Manifest-Version: 1.0\n"))) + #t)) (replace 'install (install-jars "build")))))))) @@ -4345,7 +4350,8 @@ in the @code{java.lang} package. The following classes are included: (property (@ (name "tests.dir") (value "src/org/apache/bsf/test"))) (property (@ (name "build.tests") (value "build/test-classes"))) (property (@ (name "build.dest") (value "build/classes")))) - port))))) + port))) + #t)) (replace 'install (install-jars "build"))))) (native-inputs `(("java-junit" ,java-junit))) @@ -5792,8 +5798,8 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the ;; pom.xml ignores these files in the jar creation process. If we don't, ;; we get the error "This code should have never made it into slf4j-api.jar" (delete-file-recursively "build/classes/org/slf4j/impl") - (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C" - "build/classes" ".")))) + (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C" + "build/classes" "."))) (add-before 'check 'dont-test-abstract-classes (lambda _ ;; abstract classes are not meant to be run with junit @@ -5801,7 +5807,8 @@ more efficient storage-wise than an uncompressed bitmap (as implemented in the (("") (string-append "" "")))))))) + ".java\" />"))) + #t))))) (inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core))) @@ -5842,10 +5849,9 @@ time.") (setenv "CLASSPATH" (string-append (getcwd) ":" (getenv "CLASSPATH"))) ;; ... and build test helper classes here: - (zero? - (apply system* - `("javac" "-d" "." - ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))) + (apply invoke + `("javac" "-d" "." + ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))) (inputs `(("java-junit" ,java-junit) ("java-hamcrest-core" ,java-hamcrest-core) @@ -5944,11 +5950,12 @@ tree walking, and translation.") (add-before 'build 'generate-grammar (lambda _ (with-directory-excursion "src/org/antlr/stringtemplate/language/" - (every (lambda (file) - (format #t "~a\n" file) - (zero? (system* "antlr" file))) - '("template.g" "angle.bracket.template.g" "action.g" - "eval.g" "group.g" "interface.g")))))))) + (for-each (lambda (file) + (format #t "~a\n" file) + (invoke "antlr" file)) + '("template.g" "angle.bracket.template.g" "action.g" + "eval.g" "group.g" "interface.g"))) + #t))))) (native-inputs `(("antlr" ,antlr2) ("java-junit" ,java-junit))) @@ -6006,10 +6013,11 @@ StringTemplate also powers ANTLR.") (add-before 'build 'generate-grammar (lambda _ (with-directory-excursion "src/org/stringtemplate/v4/compiler/" - (every (lambda (file) - (format #t "~a\n" file) - (zero? (system* "antlr3" file))) - '("STParser.g" "Group.g" "CodeGenerator.g")))))))) + (for-each (lambda (file) + (format #t "~a\n" file) + (invoke "antlr3" file)) + '("STParser.g" "Group.g" "CodeGenerator.g"))) + #t))))) (inputs `(("antlr3" ,antlr3-bootstrap) ("antlr2" ,antlr2) @@ -6076,14 +6084,15 @@ StringTemplate also powers ANTLR.") "/lib") ".*\\.jar")) " org.antlr.Tool $*")))) - (chmod (string-append bin "/antlr3") #o755)))) + (chmod (string-append bin "/antlr3") #o755)) + #t)) (add-before 'build 'generate-grammar (lambda _ (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/") (for-each (lambda (file) (display file) (newline) - (system* "antlr3" file)) + (invoke "antlr3" file)) '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g" "AssignTokenTypesWalker.g" "ActionTranslator.g" "TreeToNFAConverter.g" @@ -6094,14 +6103,15 @@ StringTemplate also powers ANTLR.") (substitute* "ANTLRv3Parser.java" (("public Object getTree") "public CommonTree getTree")) (chdir "../../../../../java") - (system* "antlr" "-o" "org/antlr/tool" - "org/antlr/tool/serialize.g") + (invoke "antlr" "-o" "org/antlr/tool" + "org/antlr/tool/serialize.g") (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java" (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*; import org.antlr.grammar.v3.ANTLRTreePrinter;")) (substitute* "org/antlr/tool/ErrorManager.java" (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") "")) - (chdir "../../../.."))) + (chdir "../../../..") + #t)) (add-before 'build 'fix-build-xml (lambda _ (substitute* "build.xml" @@ -6112,7 +6122,8 @@ import org.antlr.grammar.v3.ANTLRTreePrinter;")) - -") "")) - (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") - ":build/classes" - ":build/test-classes") - "-Dtest.resources.dir=src/test/resources" - "org.testng.TestNG" "src/test/resources/testng.xml"))))))) + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") + ":build/classes" + ":build/test-classes") + "-Dtest.resources.dir=src/test/resources" + "org.testng.TestNG" "src/test/resources/testng.xml")))))) (propagated-inputs `(("junit" ,java-junit) ("java-jsr305" ,java-jsr305) @@ -8177,8 +8206,7 @@ to use.") ":build/classes" ":build/test-classes") "org.testng.TestNG" "-testclass" - "build/test-classes/com/neilalexander/jnacl/NaClTest.class") - #t))))) + "build/test-classes/com/neilalexander/jnacl/NaClTest.class")))))) (native-inputs `(("java-testng" ,java-testng) ("java-fest-util" ,java-fest-util) @@ -8361,8 +8389,7 @@ algorithms and xxHash hashing algorithm.") (replace 'build (lambda _ (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider") - (invoke "ant" "-f" "ant/jdk15+.xml" "build") - #t)) + (invoke "ant" "-f" "ant/jdk15+.xml" "build"))) ;; FIXME: the tests freeze. ;; (replace 'check ;; (lambda _ @@ -8540,7 +8567,8 @@ done to the IDE or continuous integration servers which simplifies adoption.") (add-before 'build 'copy-resources (lambda _ (copy-recursively "powermock-core/src/main/resources" - "build/classes")))))) + "build/classes") + #t))))) (inputs `(("reflect" ,java-powermock-reflect) ("javassist" ,java-jboss-javassist))) @@ -8597,7 +8625,8 @@ done to the IDE or continuous integration servers which simplifies adoption.") ;; Our junit version is 4.12-SNAPSHOT (substitute* (find-files "powermock-modules/powermock-module-junit4" "PowerMockJUnit4MethodValidator.java") - (("4.12") "4.12-SNAPSHOT"))))))) + (("4.12") "4.12-SNAPSHOT")) + #t))))) (inputs `(("core" ,java-powermock-core) ("reflect" ,java-powermock-reflect) @@ -9062,8 +9091,7 @@ that is part of the SWT Tools project.") (string-append "-I" (assoc-ref inputs "jdk") "/include/linux") "-fPIC" "-O2") - (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o") - #t))) + (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))) (add-before 'build 'install-native (lambda _ (let ((dir (string-append "build/classes/META-INF/native/" @@ -9108,7 +9136,7 @@ console output.") (modify-phases %standard-phases (add-after 'check 'clear-term (lambda _ - (zero? (system* "echo" "-e" "\\e[0m"))))))) + (invoke "echo" "-e" "\\e[0m")))))) (inputs `(("java-jansi-native" ,java-jansi-native))) (native-inputs @@ -9572,7 +9600,8 @@ graphs, and pie charts.") '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java" "src/examples/TrivialApp.java" "src/examples/ClientApp.java" "src/test/org/apache/commons/httpclient/TestHttps.java" - "src/test/org/apache/commons/httpclient/TestURIUtil2.java")))) + "src/test/org/apache/commons/httpclient/TestURIUtil2.java")) + #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (invoke "ant" "dist" @@ -9622,7 +9651,8 @@ authentication, HTTP state management, and HTTP connection management.") (lambda _ (for-each delete-file-recursively '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav" - "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))))))) + "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")) + #t))))) (inputs `(("java-commons-collections4" ,java-commons-collections4) ("java-commons-compress" ,java-commons-compress) @@ -9933,7 +9963,8 @@ jsch-agent-proxy with JSch."))) (find-files "." ".*.properties") (find-files "." ".*.xsd") (find-files "." ".*.xsl") - (find-files "." ".*.xml")))))) + (find-files "." ".*.xml")))) + #t)) (add-before 'build 'fix-vfs (lambda _ (substitute* @@ -9948,8 +9979,7 @@ jsch-agent-proxy with JSch."))) (add-before 'install 'repack (lambda _ (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar" - "-C" "build/classes" ".") - #t)) + "-C" "build/classes" "."))) (add-after 'install 'install-bin (lambda* (#:key outputs #:allow-other-keys) (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) @@ -10162,7 +10192,8 @@ and @code{ISimpleCompiler} interfaces.") (modify-phases %standard-phases (add-before 'configure 'chdir (lambda _ - (chdir "janino")))))) + (chdir "janino") + #t))))) (inputs `(("java-commons-compiler" ,java-commons-compiler))) (native-inputs @@ -10187,7 +10218,9 @@ static code analysis or code manipulation."))) "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) (modules '((guix build utils))) (snippet - '(delete-file-recursively "logback-access/lib")))) + '(begin + (delete-file-recursively "logback-access/lib") + #t)))) (build-system ant-build-system) (arguments `(#:jar-name "logback.jar" diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm index 87c782d853..d79b4d503b 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -179,10 +179,11 @@ grafting works - and so that the garbage collector doesn't collect dependencies of this jar file." (define (generate-index jar) (invoke "jar" "-i" jar)) - (every (match-lambda - ((output . directory) - (every generate-index (find-files directory "\\.jar$")))) - outputs)) + (for-each (match-lambda + ((output . directory) + (for-each generate-index (find-files directory "\\.jar$")))) + outputs) + #t) (define* (strip-jar-timestamps #:key outputs #:allow-other-keys) diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm index 402d377bf8..128be1edeb 100644 --- a/guix/build/java-utils.scm +++ b/guix/build/java-utils.scm @@ -31,7 +31,7 @@ (define* (ant-build-javadoc #:key (target "javadoc") (make-flags '()) #:allow-other-keys) - (zero? (apply system* `("ant" ,target ,@make-flags)))) + (apply invoke `("ant" ,target ,@make-flags))) (define* (install-jars jar-directory) "Install jar files from JAR-DIRECTORY to the default target directory. This -- cgit v1.2.3 From cb4b508cd68df89bfbd5255a0c5569f8318ad50f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 2 Jul 2018 12:07:58 +0200 Subject: build-system/meson: Really skip the 'fix-runpath' phase on armhf. This follows up commit d5b5a15a4046362377f1a45d466b43bb6e93d4f which doesn't work because %current-system etc expands before the actual build. Fixes . * guix/build-system/meson.scm (meson-build)[builder]: Compare against the already existing "system" variable rather than (%current-system). --- guix/build-system/meson.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 529a2b8b0f..e894e1472d 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -148,8 +148,7 @@ has a 'meson.build' file." #:search-paths ',(map search-path-specification->sexp search-paths) #:phases - (if (string-prefix? "arm" ,(or (%current-target-system) - (%current-system))) + (if (string-prefix? "arm" ,system) (modify-phases build-phases (delete 'fix-runpath)) build-phases) #:configure-flags ,configure-flags -- cgit v1.2.3