From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB2cK-0001ow-Lw for guix-patches@gnu.org; Wed, 17 May 2017 13:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB2cJ-0007QX-4u for guix-patches@gnu.org; Wed, 17 May 2017 13:20:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:48523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dB2cJ-0007QN-1K for guix-patches@gnu.org; Wed, 17 May 2017 13:20:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dB2cI-0002Pi-SY for guix-patches@gnu.org; Wed, 17 May 2017 13:20:06 -0400 Subject: bug#26966: [PATCH 09/22] gnu: Add classpath-jamvm-wrappers. Resent-Message-ID: From: Ricardo Wurmus Date: Wed, 17 May 2017 19:18:52 +0200 Message-Id: <20170517171905.7840-9-rekado@elephly.net> In-Reply-To: <20170517171905.7840-1-rekado@elephly.net> References: <20170517171905.7840-1-rekado@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26966@debbugs.gnu.org Cc: Ricardo Wurmus * 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 f2df5b9f1..ae9a5b3d7 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -497,6 +497,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") -- 2.12.2