[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/18: gnu: java-hawtjni: Simplify build phases.
From: |
Ricardo Wurmus |
Subject: |
09/18: gnu: java-hawtjni: Simplify build phases. |
Date: |
Wed, 28 Feb 2018 17:05:22 -0500 (EST) |
rekado pushed a commit to branch master
in repository guix.
commit 6338ea9a88cb651a9796bdb2a62786d61acd5ad1
Author: Ricardo Wurmus <address@hidden>
Date: Tue Feb 27 20:48:49 2018 +0100
gnu: java-hawtjni: Simplify build phases.
* gnu/packages/java.scm (java-hawtjni)[arguments]: Use "invoke" instead of
"system*"; use "install-file" instead of "mkdir-p" and "copy-file".
---
gnu/packages/java.scm | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 830ecaf..579ab9b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8384,26 +8384,23 @@ including pre-existing objects that you do not have
source-code of.")
(modify-phases %standard-phases
(add-before 'build 'build-native
(lambda* (#:key inputs #:allow-other-keys)
- (with-directory-excursion "hawtjni-generator/src/main/resources/"
- (and
- (system* "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
- "-fPIC" "-O2"
- (string-append "-I" (assoc-ref inputs "jdk")
"/include/linux"))
- (system* "gcc" "-c" "hawtjni-callback.c" "-o"
"hawtjni-callback.o"
- "-fPIC" "-O2"
- (string-append "-I" (assoc-ref inputs "jdk")
"/include/linux"))
- (system* "gcc" "-o" "libhawtjni.so" "-shared"
- "hawtjni.o" "hawtjni-callback.o")))))
+ (let ((include (string-append "-I" (assoc-ref inputs "jdk")
"/include/linux")))
+ (with-directory-excursion
"hawtjni-generator/src/main/resources/"
+ (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
+ "-fPIC" "-O2" include)
+ (invoke "gcc" "-c" "hawtjni-callback.c" "-o"
"hawtjni-callback.o"
+ "-fPIC" "-O2" include)
+ (invoke "gcc" "-o" "libhawtjni.so" "-shared"
+ "hawtjni.o" "hawtjni-callback.o")))
+ #t))
(add-after 'install 'install-native
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(inc (string-append out "/include")))
- (mkdir-p lib)
- (mkdir-p inc)
(with-directory-excursion
"hawtjni-generator/src/main/resources/"
- (copy-file "libhawtjni.so" (string-append lib
"/libhawtjni.so"))
- (copy-file "hawtjni.h" (string-append inc "/hawtjni.h"))))
+ (install-file "libhawtjni.so" lib)
+ (install-file "hawtjni.h" inc)))
#t)))))
(inputs
`(("java-commons-cli" ,java-commons-cli)
- branch master updated (9d43579 -> 2adfe81), Ricardo Wurmus, 2018/02/28
- 01/18: gnu: Add java-ecj-3., Ricardo Wurmus, 2018/02/28
- 04/18: gnu: java-jnacl: Correct license., Ricardo Wurmus, 2018/02/28
- 02/18: gnu: Add java-ecj-3.5., Ricardo Wurmus, 2018/02/28
- 03/18: gnu: java-jnacl: Use invoke., Ricardo Wurmus, 2018/02/28
- 05/18: gnu: java-jnacl: Simplify build phase., Ricardo Wurmus, 2018/02/28
- 07/18: gnu: java-jnacl: Do not prefix jar with "java-"., Ricardo Wurmus, 2018/02/28
- 06/18: gnu: java-jnacl: Update to 0.1.0-2.094e819., Ricardo Wurmus, 2018/02/28
- 15/18: gnu: java-bouncycastle-bcprov: Use invoke., Ricardo Wurmus, 2018/02/28
- 08/18: gnu: java-commons-jexl-2: Use invoke., Ricardo Wurmus, 2018/02/28
- 09/18: gnu: java-hawtjni: Simplify build phases.,
Ricardo Wurmus <=
- 10/18: gnu: java-jansi-native: Fix description., Ricardo Wurmus, 2018/02/28
- 11/18: gnu: java-jansi-native: Simplify., Ricardo Wurmus, 2018/02/28
- 12/18: gnu: antlr3-3.1: Use invoke., Ricardo Wurmus, 2018/02/28
- 13/18: gnu: antlr3-3.1: Remove version from package name., Ricardo Wurmus, 2018/02/28
- 14/18: gnu: java-lz4: Use invoke., Ricardo Wurmus, 2018/02/28
- 17/18: gnu: Remove emacs-nov., Ricardo Wurmus, 2018/02/28
- 18/18: gnu: Remove duplicate definition of emacs-esxml., Ricardo Wurmus, 2018/02/28
- 16/18: gnu: java-bouncycastle-bcpkix: Use invoke., Ricardo Wurmus, 2018/02/28