[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/32: gnu: Add java-hawtjni.
From: |
julien lepiller |
Subject: |
06/32: gnu: Add java-hawtjni. |
Date: |
Sat, 10 Feb 2018 13:05:08 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 335aa20b96fb18689f3dc10406b9b7c8926e2e03
Author: Julien Lepiller <address@hidden>
Date: Sat Nov 18 17:09:49 2017 +0100
gnu: Add java-hawtjni.
* gnu/packages/java.scm (java-hawtjni): New variable.
---
gnu/packages/java.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0a5604b..ca8be38 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -7858,3 +7858,55 @@ Objects into their JSON representation. It can also be
used to convert a JSON
string to an equivalent Java object. Gson can work with arbitrary Java objects
including pre-existing objects that you do not have source-code of.")
(license license:asl2.0)))
+
+(define-public java-hawtjni
+ (package
+ (name "java-hawtjni")
+ (version "1.15")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
"https://github.com/fusesource/hawtjni/archive/"
+ "hawtjni-project-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "hawtjni.jar"
+ #:source-dir
"hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
+ #:tests? #f; no tests
+ #:phases
+ (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")))))
+ (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"))))
+ #t)))))
+ (inputs
+ `(("java-commons-cli" ,java-commons-cli)
+ ("java-asm" ,java-asm)
+ ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
+ (home-page "https://fusesource.github.io/hawtjni/")
+ (synopsis "JNI code generator")
+ (description "HawtJNI is a code generator that produces the JNI code needed
+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)))
- branch master updated (04162e8 -> 73a1f10), julien lepiller, 2018/02/10
- 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 <=
- 14/32: licenses: Add W3C license., julien lepiller, 2018/02/10
- 07/32: gnu: Add java-jansi-native., julien lepiller, 2018/02/10
- 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