[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#29359] [PATCH 07/31] gnu: Add java-jansi-native.
From: |
Julien Lepiller |
Subject: |
[bug#29359] [PATCH 07/31] gnu: Add java-jansi-native. |
Date: |
Sun, 19 Nov 2017 18:57:41 +0100 |
* gnu/packages/java.scm (java-jansi-native): New variable.
---
gnu/packages/java.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d517e4928..3811dcdc8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -7663,3 +7663,54 @@ best of DOM, CSS, and jquery-like methods.")
to implement java native methods. It is based on the jnigen code generator
that is part of the SWT Tools project.")
(license license:asl2.0)))
+
+(define-public java-jansi-native
+ (package
+ (name "java-jansi-native")
+ (version "1.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/fusesource/jansi-native/"
+ "archive/jansi-native-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "jansi-native.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'build-native
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/main/native-package/src/jansi_ttyname.c"
+ (("#include \"jansi_.*") ""))
+ ;; there are more required files for windows in windows/
+ (with-directory-excursion "src/main/native-package/src"
+ (system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
+ (string-append "-I" (assoc-ref inputs "java-hawtjni")
+ "/include")
+ (string-append "-I" (assoc-ref inputs "jdk")
+ "/include/linux")
+ "-fPIC" "-O2")
+ (system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))
+ ;; FIXME: detect one of linux{32,64}, freebsd{32,64}, osx,
windows{32,64}
+ ;; This package will only work on x86_64
+ (mkdir-p "build/classes/META-INF/native/linux64")
+ (copy-file "src/main/native-package/src/libjansi.so"
+ "build/classes/META-INF/native/linux64/libjansi.so")
+ #t))
+ (add-after 'install 'install-native
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "out") "/include"))
+ (copy-file "src/main/native-package/src/jansi.h"
+ (string-append (assoc-ref outputs "out")
+ "/include/jansi.h"))
+ #t)))))
+ (inputs
+ `(("java-hawtjni" ,java-hawtjni)))
+ (home-page "https://fusesource.github.io/jansi/")
+ (synopsis "Native library for jansi")
+ (description "Java-jansi-native contains the native library for jansi.")
+ (license license:asl2.0)))
--
2.15.0
- [bug#29359] [PATCH 01/31] gnu: Add java-gson., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 04/31] gnu: Add java-geronimo-xbean-asm-util., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 02/31] gnu: Add java-jsoup., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 08/31] gnu: Add java-jansi., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 05/31] gnu: Add java-geronimo-xbean-finder., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 12/31] gnu: Add java-joda-convert., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 15/31] gnu: Add java-apache-xml-commons-resolver., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 07/31] gnu: Add java-jansi-native.,
Julien Lepiller <=
- [bug#29359] [PATCH 03/31] gnu: Add java-geronimo-xbean-bundleutils., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 06/31] gnu: Add java-hawtjni., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 11/31] gnu: Add java-cdi-api., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 17/31] gnu: Add java-xom., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 23/31] gnu: Add java-jaxen., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 22/31] gnu: Add java-dom4j., Julien Lepiller, 2017/11/19
- [bug#29359] [PATCH 09/31] gnu: Add java-jboss-el-api-spec., Julien Lepiller, 2017/11/19