[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/26: gnu: Add classpath-jamvm-wrappers.
From: |
Ricardo Wurmus |
Subject: |
12/26: gnu: Add classpath-jamvm-wrappers. |
Date: |
Mon, 22 May 2017 13:03:16 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 04d7cae2c4bc425a8cafac6cae2456ca929cecab
Author: Ricardo Wurmus <address@hidden>
Date: Sun May 14 00:30:18 2017 +0200
gnu: Add classpath-jamvm-wrappers.
* gnu/packages/java.scm (classpath-jamvm-wrappers): New variable.
---
gnu/packages/java.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0faf2bd..7d1c027 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -491,6 +491,51 @@ other small VMs it supports the full spec, including
object finalisation and
JNI.")
(license license:gpl2+)))
+;; We need this because the tools provided by the latest release of GNU
+;; Classpath don't actually work with sablevm.
+(define classpath-jamvm-wrappers
+ (package (inherit classpath-on-sablevm)
+ (name "classpath-jamvm-wrappers")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((bash (assoc-ref %build-inputs "bash"))
+ (jamvm (assoc-ref %build-inputs "jamvm"))
+ (classpath (assoc-ref %build-inputs "classpath"))
+ (bin (string-append (assoc-ref %outputs "out")
+ "/bin/")))
+ (mkdir-p bin)
+ (for-each (lambda (tool)
+ (with-output-to-file (string-append bin tool)
+ (lambda _
+ (format #t "#!~a/bin/sh
+~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
+gnu.classpath.tools.~a.~a $@"
+ bash jamvm classpath tool
+ (if (string=? "native2ascii" tool)
+ "Native2ASCII" "Main"))))
+ (chmod (string-append bin tool) #o755))
+ (list "javah"
+ "rmic"
+ "rmid"
+ "orbd"
+ "rmiregistry"
+ "native2ascii"))
+ #t))))
+ (native-inputs
+ `(("bash" ,bash)
+ ("jamvm" ,jamvm-bootstrap)
+ ("classpath" ,classpath-on-sablevm)))
+ (inputs '())
+ (synopsis "Executables from GNU Classpath")
+ (description "This package provides wrappers around the tools provided by
+the GNU Classpath library. They are executed by the JamVM virtual
+machine.")))
+
(define-public java-swt
(package
(name "java-swt")
- branch master updated (fd3782d -> 9117448), Ricardo Wurmus, 2017/05/22
- 02/26: gnu: Add r-deseq., Ricardo Wurmus, 2017/05/22
- 07/26: gnu: Add ant-bootstrap., Ricardo Wurmus, 2017/05/22
- 12/26: gnu: Add classpath-jamvm-wrappers.,
Ricardo Wurmus <=
- 06/26: gnu: Add sablevm., Ricardo Wurmus, 2017/05/22
- 03/26: gnu: Add r-edaseq., Ricardo Wurmus, 2017/05/22
- 05/26: gnu: Add sablevm-classpath., Ricardo Wurmus, 2017/05/22
- 15/26: gnu: Add jamvm., Ricardo Wurmus, 2017/05/22
- 04/26: gnu: Add jikes., Ricardo Wurmus, 2017/05/22
- 11/26: gnu: Add jamvm-bootstrap., Ricardo Wurmus, 2017/05/22
- 16/26: gnu: Add ecj-javac-on-jamvm-wrapper-final., Ricardo Wurmus, 2017/05/22
- 24/26: gnu: Add ant/java8., Ricardo Wurmus, 2017/05/22
- 23/26: gnu: ant: Move after bootstrap packages., Ricardo Wurmus, 2017/05/22
- 22/26: gnu: ant: Delete bundled jars., Ricardo Wurmus, 2017/05/22