From f390c10a0ea9963084c37f60279dc8d60ac50fa1 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 2 Dec 2014 00:08:45 +0100 Subject: [PATCH] Also build esmumps --- scotch.spec | 42 +++++++++++++++++++++++++++++++++--------- scotch_esmumps.patch | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 scotch_esmumps.patch diff --git a/scotch.spec b/scotch.spec index 6c2b3a8..19c195d 100644 --- a/scotch.spec +++ b/scotch.spec @@ -10,18 +10,24 @@ Name: scotch Summary: Graph, mesh and hypergraph partitioning library Version: 6.0.3 -Release: 1%{?dist} +Release: 2%{?dist} License: CeCILL-C URL: https://gforge.inria.fr/projects/scotch/ Source0: https://gforge.inria.fr/frs/download.php/file/34078/%{name}_%{version}.tar.gz Source1: scotch-Makefile.shared.inc.in +# Makefile fixes for building esmumps +Patch0: scotch_esmumps.patch + BuildRequires: flex BuildRequires: bison BuildRequires: zlib-devel BuildRequires: bzip2-devel -BuildRequires: lzma-devel +%if 0%{?fedora} +BuildRequires: lzma-devel +%endif + %description Scotch is a software package for graph and mesh/hypergraph partitioning and @@ -92,6 +98,7 @@ This package contains development libraries for PT-Scotch, compiled against open %prep %setup -q -n scotch_%{version} +%patch0 -p1 cp -a %{SOURCE1} src/Makefile.inc @@ -100,24 +107,29 @@ for file in doc/CeCILL-C_V1-en.txt doc/CeCILL-C_V1-fr.txt; do iconv -f iso8859-1 -t utf-8 $file > $file.conv && mv -f $file.conv $file done +# No lzma-devel in el +%if 0%{?rhel} +sed -i -e s/-llzmadec// -e s/-DCOMMON_FILE_COMPRESS_LZMA// src/Makefile.inc +%endif + cp -a . %{openmpidir} cp -a . %{mpichdir} %build pushd src/ -make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" +make %{?_smp_mflags} scotch esmumps CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" popd %{_mpich_load} pushd %{mpichdir}/src/ -make %{?_smp_mflags} ptscotch CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" +make %{?_smp_mflags} ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" popd %{_mpich_unload} %{_openmpi_load} pushd %{openmpidir}/src/ -make %{?_smp_mflags} ptscotch CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" +make %{?_smp_mflags} ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" SOMAJ="%{so_maj}" popd %{_openmpi_unload} @@ -203,31 +215,40 @@ popd %doc doc/CeCILL-C_V1-en.txt %{_bindir}/* %{_libdir}/libscotch*.so.* +%{_libdir}/libesmumps*.so.* %{_mandir}/man1/* %files devel %{_libdir}/libscotch*.so +%{_libdir}/libesmumps*.so %{_includedir}/*scotch*.h +%{_includedir}/*esmumps*.h %files -n ptscotch-mpich %doc doc/CeCILL-C_V1-en.txt -%{_libdir}/mpich/lib/lib*.so.* +%{_libdir}/mpich/lib/lib*scotch*.so.* +%{_libdir}/mpich/lib/lib*esmumps*.so.* %{_libdir}/mpich/bin/* %{_mandir}/mpich/* %files -n ptscotch-mpich-devel %{_includedir}/mpich*/*scotch*.h -%{_libdir}/mpich/lib/lib*.so +%{_includedir}/mpich*/*esmumps*.h +%{_libdir}/mpich/lib/lib*scotch*.so +%{_libdir}/mpich/lib/lib*esmumps*.so %files -n ptscotch-openmpi %doc doc/CeCILL-C_V1-en.txt -%{_libdir}/openmpi/lib/lib*.so.* +%{_libdir}/openmpi/lib/lib*scotch*.so.* +%{_libdir}/openmpi/lib/lib*esmumps*.so.* %{_libdir}/openmpi/bin/* %{_mandir}/openmpi*/* %files -n ptscotch-openmpi-devel %{_includedir}/openmpi*/*scotch*.h -%{_libdir}/openmpi/lib/lib*.so +%{_includedir}/openmpi*/*esmumps*.h +%{_libdir}/openmpi/lib/lib*scotch*.so +%{_libdir}/openmpi/lib/lib*esmumps*.so %files doc %doc doc/CeCILL-C_V1-en.txt @@ -235,6 +256,9 @@ popd %doc doc/scotch_example.f %changelog +* Mon Dec 01 2014 Sandro Mani - 6.0.3-2 +- Build esmumps + * Wed Nov 05 2014 Sandro Mani - 6.0.3-1 - Update to 6.0.3 diff --git a/scotch_esmumps.patch b/scotch_esmumps.patch new file mode 100644 index 0000000..c6fc1b6 --- /dev/null +++ b/scotch_esmumps.patch @@ -0,0 +1,33 @@ +diff -rupN scotch_6.0.3/src/esmumps/Makefile scotch_6.0.3-new/src/esmumps/Makefile +--- scotch_6.0.3/src/esmumps/Makefile 2012-12-01 15:29:29.000000000 +0100 ++++ scotch_6.0.3-new/src/esmumps/Makefile 2014-12-01 23:29:01.951933733 +0100 +@@ -59,7 +59,7 @@ scotch : clean + + ptscotch : clean + $(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC=$(CCP) SCOTCHLIB=ptscotch ESMUMPSLIB=ptesmumps \ +- libesmumps$(LIB) \ ++ libptesmumps$(LIB) \ + main_esmumps$(EXE) + + install : +@@ -142,7 +142,7 @@ esmumps_strats$(OBJ) : esmumps_strats.c + common.h \ + esmumps.h + +-libesmumps$(LIB) : graph_graph$(OBJ) \ ++lib$(ESMUMPSLIB)$(LIB) : graph_graph$(OBJ) \ + order$(OBJ) \ + order_scotch_graph$(OBJ) \ + dof$(OBJ) \ +diff -rupN scotch_6.0.3/src/Makefile scotch_6.0.3-new/src/Makefile +--- scotch_6.0.3/src/Makefile 2014-09-28 20:48:05.000000000 +0200 ++++ scotch_6.0.3-new/src/Makefile 2014-12-01 23:33:32.833263586 +0100 +@@ -116,6 +116,8 @@ install : required $(bindir) $(includ + -$(CP) -f ../bin/d[agm]*$(EXE) $(bindir) + -$(CP) -f ../include/*scotch*.h $(includedir) + -$(CP) -f ../lib/*scotch*$(LIB) $(libdir) ++ -$(CP) -f ../include/*esmumps*.h $(includedir) ++ -$(CP) -f ../lib/*esmumps*$(LIB) $(libdir) + -$(CP) -Rf ../man/* $(mandir) + + clean : required