[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/32: gnu: Add java-jansi-native.
From: |
julien lepiller |
Subject: |
07/32: gnu: Add java-jansi-native. |
Date: |
Sat, 10 Feb 2018 13:05:11 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit d0c62afa8cad5e4e63b9746b4bea18922f1595bd
Author: Julien Lepiller <address@hidden>
Date: Sat Nov 18 17:35:36 2017 +0100
gnu: Add java-jansi-native.
* gnu/packages/java.scm (java-jansi-native): New variable.
---
gnu/packages/java.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ca8be38..1d4e18b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -7910,3 +7910,59 @@ including pre-existing objects that you do not have
source-code of.")
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)
+ ;; there are more required files for windows in windows/
+ (with-directory-excursion "src/main/native-package/src"
+ (substitute* "jansi_ttyname.c"
+ (("#include \"jansi_.*") ""))
+ (and
+ (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")))))
+ (add-before 'build 'install-native
+ (lambda _
+ (let ((dir (string-append "build/classes/META-INF/native/"
+ ,(match (%current-system)
+ ((or "i686-linux" "armhf-linux")
+ "linux32")
+ ((or "x86_64-linux" "aarch64-linux")
+ "linux64")))))
+ (install-file "src/main/native-package/src/libjansi.so" dir))
+ #t))
+ (add-after 'install 'install-native
+ (lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p (string-append (assoc-ref outputs "out") "/include"))
+ (install-file "src/main/native-package/src/jansi.h"
+ (string-append (assoc-ref outputs "out")
"/include"))
+ #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 the jansi
+frobnication library/framework.")
+ (license license:asl2.0)))
- 01/32: gnu: Add java-gson., (continued)
- 01/32: gnu: Add java-gson., julien lepiller, 2018/02/10
- 02/32: gnu: Add java-jsoup., julien lepiller, 2018/02/10
- 05/32: gnu: Add java-geronimo-xbean-finder., julien lepiller, 2018/02/10
- 09/32: gnu: Add java-jboss-el-api-spec., julien lepiller, 2018/02/10
- 04/32: gnu: Add java-geronimo-xbean-asm-util., julien lepiller, 2018/02/10
- 03/32: gnu: Add java-geronimo-xbean-bundleutils., julien lepiller, 2018/02/10
- 08/32: gnu: Add java-jansi., julien lepiller, 2018/02/10
- 16/32: gnu: Add java-apache-xml-commons-resolver., julien lepiller, 2018/02/10
- 06/32: gnu: Add java-hawtjni., julien lepiller, 2018/02/10
- 14/32: licenses: Add W3C license., julien lepiller, 2018/02/10
- 07/32: gnu: Add java-jansi-native.,
julien lepiller <=
- 30/32: gnu: Add java-jline., julien lepiller, 2018/02/10
- 18/32: gnu: Add java-jaxen-bootstrap., julien lepiller, 2018/02/10
- 28/32: gnu: Add java-jdom2., julien lepiller, 2018/02/10
- 27/32: gnu: Add java-jettison., julien lepiller, 2018/02/10
- 11/32: gnu: Add java-cdi-api., julien lepiller, 2018/02/10
- 15/32: gnu: Add java-jaxp., julien lepiller, 2018/02/10
- 12/32: gnu: Add java-joda-convert., julien lepiller, 2018/02/10
- 10/32: gnu: Add java-jboss-interceptors-api-spec., julien lepiller, 2018/02/10
- 13/32: gnu: Add java-joda-time., julien lepiller, 2018/02/10
- 22/32: gnu: Add java-xmlpull2., julien lepiller, 2018/02/10