gnu: java-jansi-native: Simplify.

* gnu/packages/java.scm (java-jansi-native)[arguments]: Use "invoke"; remove
useless "mkdir-p".
This commit is contained in:
Ricardo Wurmus 2018-02-27 20:53:15 +01:00
parent 3d6925ef51
commit e85c1bf6cd
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 8 additions and 9 deletions

View File

@ -8437,14 +8437,14 @@ that is part of the SWT Tools project.")
(with-directory-excursion "src/main/native-package/src" (with-directory-excursion "src/main/native-package/src"
(substitute* "jansi_ttyname.c" (substitute* "jansi_ttyname.c"
(("#include \"jansi_.*") "")) (("#include \"jansi_.*") ""))
(and (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
(system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" (string-append "-I" (assoc-ref inputs "java-hawtjni")
(string-append "-I" (assoc-ref inputs "java-hawtjni") "/include")
"/include") (string-append "-I" (assoc-ref inputs "jdk")
(string-append "-I" (assoc-ref inputs "jdk") "/include/linux")
"/include/linux") "-fPIC" "-O2")
"-fPIC" "-O2") (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
(system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))) #t)))
(add-before 'build 'install-native (add-before 'build 'install-native
(lambda _ (lambda _
(let ((dir (string-append "build/classes/META-INF/native/" (let ((dir (string-append "build/classes/META-INF/native/"
@ -8457,7 +8457,6 @@ that is part of the SWT Tools project.")
#t)) #t))
(add-after 'install 'install-native (add-after 'install 'install-native
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(mkdir-p (string-append (assoc-ref outputs "out") "/include"))
(install-file "src/main/native-package/src/jansi.h" (install-file "src/main/native-package/src/jansi.h"
(string-append (assoc-ref outputs "out") "/include")) (string-append (assoc-ref outputs "out") "/include"))
#t))))) #t)))))