From 06e1239502e7cc91f62161f8bab35bbe0119f2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Br=C3=A9mond?= Date: Mon, 14 Oct 2019 17:44:54 +0200 Subject: gnu: mumps: Build and install shared libraries. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/mumps-shared-libseq.patch, gnu/packages/patches/mumps-shared-mumps.patch, gnu/packages/patches/mumps-shared-pord.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/maths.scm (mumps)[source](patches): Add them. [arguments]: In 'configure' phase, adjust "Makefile.inc" for shared library support. In 'install' phase, install libmpiseq.so when it exists. Co-authored-by: Ludovic Courtès --- gnu/packages/maths.scm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'gnu/packages/maths.scm') diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index ee633e32f8..06b34e2b89 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -2180,7 +2180,10 @@ bindings to almost all functions of SLEPc.") (sha256 (base32 "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r")) - (patches (search-patches "mumps-build-parallelism.patch")))) + (patches (search-patches "mumps-build-parallelism.patch" + "mumps-shared-libseq.patch" + "mumps-shared-mumps.patch" + "mumps-shared-pord.patch")))) (build-system gnu-build-system) (inputs `(("fortran" ,gfortran) @@ -2210,15 +2213,17 @@ CC = gcc FC = gfortran FL = gfortran INCSEQ = -I$(topdir)/libseq -LIBSEQ = -L$(topdir)/libseq -lmpiseq +LIBSEQ = $(topdir)/libseq/libmpiseq.a LIBSEQNEEDED = libseqneeded~; CC = mpicc FC = mpifort FL = mpifort~] AR = ar vr # rules require trailing space, ugh... RANLIB = ranlib -LIBBLAS = -L~a -lopenblas~@[ -SCALAP = -L~a -lscalapack~] +BLASDIR = ~a +LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[ +SCALAPDIR = ~a +SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~] LIBOTHERS = -pthread CDEFS = -DAdd_ PIC = -fPIC @@ -2229,18 +2234,18 @@ INCS = $(INCSEQ) LIBS = $(SCALAP) $(LIBSEQ) LPORDDIR = $(topdir)/PORD/lib IPORD = -I$(topdir)/PORD/include -LPORD = -L$(LPORDDIR) -lpord +LPORD = $(LPORDDIR)/libpord.a ORDERINGSF = -Dpord~@[ METISDIR = ~a IMETIS = -I$(METISDIR)/include -LMETIS = -L$(METISDIR)/lib -lmetis +LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis ORDERINGSF += -Dmetis~]~@[~:{ SCOTCHDIR = ~a ISCOTCH = -I$(SCOTCHDIR)/include -LSCOTCH = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr +LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr ORDERINGSF += ~a~}~] ORDERINGSC = $(ORDERINGSF) -LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) +LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ) IORDERINGSF = $(ISCOTCH) IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" (assoc-ref inputs "mpi") @@ -2294,6 +2299,8 @@ IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" (copy-recursively "include" (string-append out "/include")) (when (file-exists? "libseq/libmpiseq.a") (install-file "libseq/libmpiseq.a" libdir)) + (when (file-exists? "libseq/libmpiseq.so") + (install-file "libseq/libmpiseq.so" libdir)) #t)))))) (home-page "http://mumps.enseeiht.fr") (synopsis "Multifrontal sparse direct solver") -- cgit v1.2.3