guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add java-openmpi.


From: guix-commits
Subject: 01/01: gnu: Add java-openmpi.
Date: Mon, 18 Mar 2019 13:24:53 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit fa5a25386620cec4b2543aae24fc9a0776aa3dca
Author: Ricardo Wurmus <address@hidden>
Date:   Thu Mar 7 11:46:16 2019 +0100

    gnu: Add java-openmpi.
    
    * gnu/packages/mpi.scm (java-openmpi): New variable.
---
 gnu/packages/mpi.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 10de6de..952edca 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -35,6 +35,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages fabric-management)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages java)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pciutils)
@@ -265,6 +266,51 @@ software vendors, application developers and computer 
science researchers.")
     ;; See file://LICENSE
     (license bsd-2)))
 
+;; TODO: javadoc files contain timestamps.
+(define-public java-openmpi
+  (package (inherit openmpi)
+    (name "java-openmpi")
+    (inputs
+     `(("openmpi" ,openmpi)
+       ,@(package-inputs openmpi)))
+    (native-inputs
+     `(("jdk" ,openjdk11 "jdk")
+       ("zip" ,(@ (gnu packages compression) zip))
+       ,@(package-native-inputs openmpi)))
+    (outputs '("out"))
+    (arguments
+     `(#:modules ((guix build gnu-build-system)
+                  ((guix build ant-build-system) #:prefix ant:)
+                  (guix build utils))
+       #:imported-modules ((guix build ant-build-system)
+                           (guix build syscalls)
+                           ,@%gnu-build-system-modules)
+       ,@(substitute-keyword-arguments (package-arguments openmpi)
+           ((#:configure-flags flags)
+            `(cons "--enable-mpi-java" ,flags))
+           ((#:make-flags flags ''())
+            `(append '("-C" "ompi/mpi/java")
+                     ,flags))
+           ((#:phases phases)
+            `(modify-phases ,phases
+               ;; We could provide the location of the JDK in the configure
+               ;; flags, but since the configure flags are embedded in the
+               ;; info binaries that would leave a reference to the JDK in
+               ;; the "out" output.  To avoid this we set JAVA_HOME.
+               (add-after 'unpack 'set-JAVA_HOME
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
+                   #t))
+               (add-after 'unpack 'link-with-existing-mpi-libraries
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "ompi/mpi/java/c/Makefile.in"
+                     (("\\$\\(top_builddir\\)/ompi/address@hidden@.la")
+                      (string-append (assoc-ref inputs "openmpi") 
"/lib/libmpi.la")))
+                   #t))
+               (add-after 'install 'strip-jar-timestamps
+                 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
+    (synopsis "Java bindings for MPI")))
+
 (define-public openmpi-thread-multiple
   (package
     (inherit openmpi)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]