diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-03-21 23:18:54 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-03-21 23:18:54 +0100 |
commit | 081850816f98c7f5d815ac7251c69bf2ada50cc0 (patch) | |
tree | 609b7e9e9c267e8c382bdebf8295b9f45bab6cc4 /gnu/packages/mpi.scm | |
parent | 792d526a256773d1abe00b73c2a2131037148139 (diff) | |
parent | 93f178b5a84a8cc5a0c552290191efd2310588b5 (diff) | |
download | guix-patches-081850816f98c7f5d815ac7251c69bf2ada50cc0.tar guix-patches-081850816f98c7f5d815ac7251c69bf2ada50cc0.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/mpi.scm')
-rw-r--r-- | gnu/packages/mpi.scm | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 10de6dee5b..952edca66e 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/lib@OMPI_LIBMPI_NAME@.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) |