From e9a758f759162da90b44619bcd88575a583dfc05 Mon Sep 17 00:00:00 2001 From: "Oleg A. Khlybov" Date: Fri, 28 Aug 2020 04:22:26 -0700 Subject: [PATCH 1/2] Introduced the (pt)scotch packages. --- mingw-w64-scotch/0001-makefile.inc.patch | 25 ++++ mingw-w64-scotch/0002-pipe-fix.patch | 28 ++++ mingw-w64-scotch/0003-thread-fix.patch | 12 ++ mingw-w64-scotch/0004-no-metis.patch | 37 ++++++ mingw-w64-scotch/0005-dummysizes-regex.patch | 20 +++ mingw-w64-scotch/PKGBUILD | 133 +++++++++++++++++++ 6 files changed, 255 insertions(+) create mode 100644 mingw-w64-scotch/0001-makefile.inc.patch create mode 100644 mingw-w64-scotch/0002-pipe-fix.patch create mode 100644 mingw-w64-scotch/0003-thread-fix.patch create mode 100644 mingw-w64-scotch/0004-no-metis.patch create mode 100644 mingw-w64-scotch/0005-dummysizes-regex.patch create mode 100644 mingw-w64-scotch/PKGBUILD diff --git a/mingw-w64-scotch/0001-makefile.inc.patch b/mingw-w64-scotch/0001-makefile.inc.patch new file mode 100644 index 0000000000..2dd8fd3ab0 --- /dev/null +++ b/mingw-w64-scotch/0001-makefile.inc.patch @@ -0,0 +1,25 @@ +diff -urN scotch_6.0.8.orig/src/Makefile.inc scotch_6.0.8/src/Makefile.inc +--- scotch_6.0.8.orig/src/Makefile.inc 1969-12-31 16:00:00.000000000 -0800 ++++ scotch_6.0.8/src/Makefile.inc 2019-10-08 04:41:02.691991300 -0700 +@@ -0,0 +1,21 @@ ++EXE = ++LIB = .a ++OBJ = .o ++ ++MAKE = make ++AR = ar ++ARFLAGS = -ruv ++CAT = cat ++CCS = gcc ++CCP = mpicc ++CCD = gcc ++CFLAGS += -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Drestrict=__restrict -DCOMMON_PTHREAD -DSCOTCH_PTHREAD -DCOMMON_FILE_COMPRESS_GZ ++CLIBFLAGS = ++LDFLAGS = -lm -lz -pthread ++CP = cp ++LEX = flex -Pscotchyy -olex.yy.c ++LN = ln ++MKDIR = mkdir ++MV = mv ++RANLIB = ranlib ++YACC = bison -pscotchyy -y -b y diff --git a/mingw-w64-scotch/0002-pipe-fix.patch b/mingw-w64-scotch/0002-pipe-fix.patch new file mode 100644 index 0000000000..1106acb3a2 --- /dev/null +++ b/mingw-w64-scotch/0002-pipe-fix.patch @@ -0,0 +1,28 @@ +diff -urN scotch_6.0.8.orig/src/libscotch/common_file_compress.c scotch_6.0.8/src/libscotch/common_file_compress.c +--- scotch_6.0.8.orig/src/libscotch/common_file_compress.c 2019-05-18 16:40:45.000000000 -0700 ++++ scotch_6.0.8/src/libscotch/common_file_compress.c 2019-10-08 04:32:19.642967800 -0700 +@@ -209,8 +209,8 @@ + if (typeval <= FILECOMPRESSTYPENONE) /* If nothing to do */ + return (0); + +- if (pipe (filetab) != 0) { +- errorPrint ("fileCompress: cannot create pipe"); ++ if (1/*pipe (filetab) != 0*/) { ++ errorPrint ("fileCompress: cannot create pipe: unsupported call"); + return (1); + } + +diff -urN scotch_6.0.8.orig/src/libscotch/common_file_decompress.c scotch_6.0.8/src/libscotch/common_file_decompress.c +--- scotch_6.0.8.orig/src/libscotch/common_file_decompress.c 2019-05-10 08:34:57.000000000 -0700 ++++ scotch_6.0.8/src/libscotch/common_file_decompress.c 2019-10-08 04:32:48.017415600 -0700 +@@ -186,8 +186,8 @@ + if (typeval <= FILECOMPRESSTYPENONE) /* If nothing to do */ + return (0); + +- if (pipe (filetab) != 0) { +- errorPrint ("fileDecompress: cannot create pipe"); ++ if (1/*pipe (filetab) != 0*/) { ++ errorPrint ("fileDecompress: cannot create pipe: unsupported call"); + return (1); + } + diff --git a/mingw-w64-scotch/0003-thread-fix.patch b/mingw-w64-scotch/0003-thread-fix.patch new file mode 100644 index 0000000000..1512ac19af --- /dev/null +++ b/mingw-w64-scotch/0003-thread-fix.patch @@ -0,0 +1,12 @@ +diff -urN scotch_6.0.8.orig/src/libscotch/graph_coarsen.c scotch_6.0.8/src/libscotch/graph_coarsen.c +--- scotch_6.0.8.orig/src/libscotch/graph_coarsen.c 2019-05-18 16:53:25.000000000 -0700 ++++ scotch_6.0.8/src/libscotch/graph_coarsen.c 2019-10-08 04:36:55.269120100 -0700 +@@ -354,7 +354,7 @@ + + #ifdef GRAPHCOARSENTHREAD + thrdnbr = +- coarptr->thrddat.thrdnbr = SCOTCH_PTHREAD_NUMBER; /* Required by graphMatchInit */ ++ coarptr->thrddat.thrdnbr = 1/*SCOTCH_PTHREAD_NUMBER*/; /* Required by graphMatchInit */ + #else /* GRAPHCOARSENTHREAD */ + #ifdef COMMON_PTHREAD + coarptr->thrddat.thrdnbr = 1; diff --git a/mingw-w64-scotch/0004-no-metis.patch b/mingw-w64-scotch/0004-no-metis.patch new file mode 100644 index 0000000000..963c74f505 --- /dev/null +++ b/mingw-w64-scotch/0004-no-metis.patch @@ -0,0 +1,37 @@ +diff -urN scotch_6.0.8.orig/src/Makefile scotch_6.0.8/src/Makefile +--- scotch_6.0.8.orig/src/Makefile 2019-05-18 16:53:25.000000000 -0700 ++++ scotch_6.0.8/src/Makefile 2019-10-08 04:43:46.271261600 -0700 +@@ -94,14 +94,14 @@ + + scotch : libscotch + (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install) +- (cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install) ++# (cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install) + + libptscotch : libscotch + (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) + + ptscotch : libptscotch + (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) +- (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) ++# (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) + + check : scotch + (cd check ; $(MAKE) check) +@@ -127,14 +127,14 @@ + clean : required + (cd libscotch ; $(MAKE) clean) + (cd scotch ; $(MAKE) clean) +- (cd libscotchmetis ; $(MAKE) clean) ++# (cd libscotchmetis ; $(MAKE) clean) + (cd check ; $(MAKE) clean) + (cd esmumps ; $(MAKE) clean) + + realclean : required + (cd libscotch ; $(MAKE) realclean) + (cd scotch ; $(MAKE) realclean) +- (cd libscotchmetis ; $(MAKE) realclean) ++# (cd libscotchmetis ; $(MAKE) realclean) + (cd check ; $(MAKE) realclean) + (cd esmumps ; $(MAKE) realclean) + -$(RM) ../bin/* ../include/* ../lib/* diff --git a/mingw-w64-scotch/0005-dummysizes-regex.patch b/mingw-w64-scotch/0005-dummysizes-regex.patch new file mode 100644 index 0000000000..0682f0716b --- /dev/null +++ b/mingw-w64-scotch/0005-dummysizes-regex.patch @@ -0,0 +1,20 @@ +diff -urN scotch_6.0.8.orig/src/libscotch/Makefile scotch_6.0.8/src/libscotch/Makefile +--- scotch_6.0.8.orig/src/libscotch/Makefile 2019-05-18 16:53:25.000000000 -0700 ++++ scotch_6.0.8/src/libscotch/Makefile 2019-10-09 04:21:01.832072100 -0700 +@@ -3062,14 +3062,14 @@ + mapping.h \ + order.h \ + parser.h +- $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) ++ $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) -lgnurx + + ptdummysizes$(EXE) : dummysizes.c \ + module.h \ + common.h \ + dgraph.h \ + dorder.h +- $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) ++ $(CCD) $(CCDFLAGS) -DSCOTCH_VERSION_NUM=$(VERSION) -DSCOTCH_RELEASE_NUM=$(RELEASE) -DSCOTCH_PATCHLEVEL_NUM=$(PATCHLEVEL) $(<) -o $(@) $(LDFLAGS) -lgnurx + + scotch.h : dummysizes$(EXE) \ + library.h diff --git a/mingw-w64-scotch/PKGBUILD b/mingw-w64-scotch/PKGBUILD new file mode 100644 index 0000000000..9e03abdd33 --- /dev/null +++ b/mingw-w64-scotch/PKGBUILD @@ -0,0 +1,133 @@ +# Contributor: Oleg A. Khlybov + +_realname=scotch + +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-pt${_realname}") +pkgver=6.0.9 +pkgrel=1 +arch=('any') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-msmpi" "${MINGW_PACKAGE_PREFIX}-libgnurx") +options=('strip' 'staticlibs') +license=('CeCILL-C') +url="http://www.labri.fr/perso/pelegrin/scotch/" +source=("https://gforge.inria.fr/frs/download.php/file/38187/${_realname}_${pkgver}.tar.gz" + "0001-makefile.inc.patch" + "0002-pipe-fix.patch" + "0003-thread-fix.patch" + "0004-no-metis.patch" + "0005-dummysizes-regex.patch" +) +sha256sums=('622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93' + '2c55b1e99a8d40c976e7147aa9102db2d1c489da1b760e526b424bf5ffd12716' + '49d87533321504a9594d7bb4659fbced5afadd2fc0d73f0577b0b3ad47cc7d0f' + '8a02cea7cdc3c685776012b2bb42cec8c5e98c435bdf1ffd62abf5ab6def9fbb' + '04e04fd3df94d2c40c26b47619263d6db6a50f7f0a6ef7870f484939e39e1558' + '92908a6598d333a35a3b76650c111a082304e9dfff7c9bc0667d6af62de47c14') + +prepare() { + cd "${srcdir}/${_realname}_${pkgver}" + for p in ${source[*]:1}; do + patch -p1 -i "$srcdir/$p" + done +} + +build() { + cd "${srcdir}/${_realname}_${pkgver}/src" + make -j1 scotch ptscotch esmumps ptesmumps + cd ../lib + gcc -shared -o lib${_realname}.dll -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--output-def,lib${_realname}.def -Wl,--out-implib,lib${_realname}.dll.a -Wl,--whole-archive lib${_realname}.a lib${_realname}err.a -Wl,--no-whole-archive + mpicc -shared -o libpt${_realname}.dll -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--output-def,libpt${_realname}.def -Wl,--out-implib,libpt${_realname}.dll.a -Wl,--whole-archive libpt${_realname}.a libpt${_realname}err.a -Wl,--no-whole-archive -L. -l${_realname} +} + +eval "package_${MINGW_PACKAGE_PREFIX}-${_realname}() { _scotch; }" + +_scotch() { + pkgdesc="Sequential graph partitioning and sparse matrix ordering package (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") + cd "${srcdir}/${_realname}_${pkgver}" + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} + mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig" + echo " + prefix=${MINGW_PREFIX} + libdir=\${prefix}/lib + includedir=\${prefix}/include + Name: scotch + URL: ${url} + Version: ${pkgver} + Description: ${pkgdesc} + Cflags: -I\${includedir} + Libs.private: -lscotcherr + Libs: -L\${libdir} -lscotch + " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/scotch.pc" + echo " + prefix=${MINGW_PREFIX} + libdir=\${prefix}/lib + includedir=\${prefix}/include + Name: esmumps + URL: ${url} + Version: ${pkgver} + Description: Scotch intergation layer for MUMPS (mingw-w64) + Requires: scotch + Cflags: -I\${includedir} + Libs: -L\${libdir} -lesmumps + " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/esmumps.pc" + ( + cd include + install -m644 esmumps.h scotch*.h "${pkgdir}${MINGW_PREFIX}/include" + ) + ( + cd lib + install -m644 libes*.a libscotch*.a "${pkgdir}${MINGW_PREFIX}/lib" + install -m644 libscotch*.dll "${pkgdir}${MINGW_PREFIX}/bin" + cd "${pkgdir}${MINGW_PREFIX}/lib" + rm -rf *metis*a + ) +} + +eval "package_${MINGW_PACKAGE_PREFIX}-pt${_realname}() { _ptscotch; }" + +_ptscotch() { + pkgdesc="Parallel graph partitioning and sparse matrix ordering package (mingw-w64)" + depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-scotch") + cd "${srcdir}/${_realname}_${pkgver}" + mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} + mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig" + echo " + prefix=${MINGW_PREFIX} + libdir=\${prefix}/lib + includedir=\${prefix}/include + Name: ptscotch + URL: ${url} + Version: ${pkgver} + Description: ${pkgdesc} + Requires: scotch + Requires.private: msmpi + Cflags: -I\${includedir} + Libs.private: -lptscotcherr + Libs: -L\${libdir} -lptscotch + " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ptscotch.pc" + echo " + prefix=${MINGW_PREFIX} + libdir=\${prefix}/lib + includedir=\${prefix}/include + Name: ptesmumps + URL: ${url} + Version: ${pkgver} + Description: PT-Scotch intergation layer for MUMPS (mingw-w64) + Cflags: -I\${includedir} + Requires: ptscotch + Libs: -L\${libdir} -lptesmumps + " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ptesmumps.pc" + ( + cd include + install -m644 ptscotch*.h "${pkgdir}${MINGW_PREFIX}/include" # esmumps.h + ) + ( + cd lib + install -m644 libptes*.a libptscotch*.a "${pkgdir}${MINGW_PREFIX}/lib" + install -m644 libptscotch*.dll "${pkgdir}${MINGW_PREFIX}/bin" + cd "${pkgdir}${MINGW_PREFIX}/lib" + rm -rf *metis*a + ) +} From f95ce211f2ca15b588ee63adec608e982418b2f8 Mon Sep 17 00:00:00 2001 From: "Oleg A. Khlybov" Date: Mon, 31 Aug 2020 03:39:47 -0700 Subject: [PATCH 2/2] Switched to joint scotch package providing both scotch and ptscotch libraries. --- ...egex.patch => 0004-dummysizes-regex.patch} | 0 mingw-w64-scotch/0004-no-metis.patch | 37 ---------- mingw-w64-scotch/PKGBUILD | 74 ++++--------------- 3 files changed, 13 insertions(+), 98 deletions(-) rename mingw-w64-scotch/{0005-dummysizes-regex.patch => 0004-dummysizes-regex.patch} (100%) delete mode 100644 mingw-w64-scotch/0004-no-metis.patch diff --git a/mingw-w64-scotch/0005-dummysizes-regex.patch b/mingw-w64-scotch/0004-dummysizes-regex.patch similarity index 100% rename from mingw-w64-scotch/0005-dummysizes-regex.patch rename to mingw-w64-scotch/0004-dummysizes-regex.patch diff --git a/mingw-w64-scotch/0004-no-metis.patch b/mingw-w64-scotch/0004-no-metis.patch deleted file mode 100644 index 963c74f505..0000000000 --- a/mingw-w64-scotch/0004-no-metis.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -urN scotch_6.0.8.orig/src/Makefile scotch_6.0.8/src/Makefile ---- scotch_6.0.8.orig/src/Makefile 2019-05-18 16:53:25.000000000 -0700 -+++ scotch_6.0.8/src/Makefile 2019-10-08 04:43:46.271261600 -0700 -@@ -94,14 +94,14 @@ - - scotch : libscotch - (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) scotch && $(MAKE) install) -- (cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install) -+# (cd libscotchmetis ; $(MAKE) scotch && $(MAKE) install) - - libptscotch : libscotch - (cd libscotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) - - ptscotch : libptscotch - (cd scotch ; $(MAKE) VERSION=$(VERSION) RELEASE=$(RELEASE) PATCHLEVEL=$(PATCHLEVEL) ptscotch && $(MAKE) ptinstall) -- (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) -+# (cd libscotchmetis ; $(MAKE) ptscotch && $(MAKE) ptinstall) - - check : scotch - (cd check ; $(MAKE) check) -@@ -127,14 +127,14 @@ - clean : required - (cd libscotch ; $(MAKE) clean) - (cd scotch ; $(MAKE) clean) -- (cd libscotchmetis ; $(MAKE) clean) -+# (cd libscotchmetis ; $(MAKE) clean) - (cd check ; $(MAKE) clean) - (cd esmumps ; $(MAKE) clean) - - realclean : required - (cd libscotch ; $(MAKE) realclean) - (cd scotch ; $(MAKE) realclean) -- (cd libscotchmetis ; $(MAKE) realclean) -+# (cd libscotchmetis ; $(MAKE) realclean) - (cd check ; $(MAKE) realclean) - (cd esmumps ; $(MAKE) realclean) - -$(RM) ../bin/* ../include/* ../lib/* diff --git a/mingw-w64-scotch/PKGBUILD b/mingw-w64-scotch/PKGBUILD index 9e03abdd33..5b71cdfd2d 100644 --- a/mingw-w64-scotch/PKGBUILD +++ b/mingw-w64-scotch/PKGBUILD @@ -3,10 +3,12 @@ _realname=scotch pkgbase=mingw-w64-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-pt${_realname}") +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgdesc='Graph partitioning and sparse matrix ordering package (mingw-w64)' pkgver=6.0.9 pkgrel=1 arch=('any') +depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-msmpi" "${MINGW_PACKAGE_PREFIX}-libgnurx") options=('strip' 'staticlibs') license=('CeCILL-C') @@ -15,14 +17,12 @@ source=("https://gforge.inria.fr/frs/download.php/file/38187/${_realname}_${pkgv "0001-makefile.inc.patch" "0002-pipe-fix.patch" "0003-thread-fix.patch" - "0004-no-metis.patch" - "0005-dummysizes-regex.patch" + "0004-dummysizes-regex.patch" ) sha256sums=('622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93' '2c55b1e99a8d40c976e7147aa9102db2d1c489da1b760e526b424bf5ffd12716' '49d87533321504a9594d7bb4659fbced5afadd2fc0d73f0577b0b3ad47cc7d0f' '8a02cea7cdc3c685776012b2bb42cec8c5e98c435bdf1ffd62abf5ab6def9fbb' - '04e04fd3df94d2c40c26b47619263d6db6a50f7f0a6ef7870f484939e39e1558' '92908a6598d333a35a3b76650c111a082304e9dfff7c9bc0667d6af62de47c14') prepare() { @@ -40,11 +40,7 @@ build() { mpicc -shared -o libpt${_realname}.dll -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--output-def,libpt${_realname}.def -Wl,--out-implib,libpt${_realname}.dll.a -Wl,--whole-archive libpt${_realname}.a libpt${_realname}err.a -Wl,--no-whole-archive -L. -l${_realname} } -eval "package_${MINGW_PACKAGE_PREFIX}-${_realname}() { _scotch; }" - -_scotch() { - pkgdesc="Sequential graph partitioning and sparse matrix ordering package (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") +package() { cd "${srcdir}/${_realname}_${pkgver}" mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig" @@ -55,44 +51,11 @@ _scotch() { Name: scotch URL: ${url} Version: ${pkgver} - Description: ${pkgdesc} + Description: Serial graph partitioning and sparse matrix ordering package Cflags: -I\${includedir} Libs.private: -lscotcherr Libs: -L\${libdir} -lscotch " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/scotch.pc" - echo " - prefix=${MINGW_PREFIX} - libdir=\${prefix}/lib - includedir=\${prefix}/include - Name: esmumps - URL: ${url} - Version: ${pkgver} - Description: Scotch intergation layer for MUMPS (mingw-w64) - Requires: scotch - Cflags: -I\${includedir} - Libs: -L\${libdir} -lesmumps - " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/esmumps.pc" - ( - cd include - install -m644 esmumps.h scotch*.h "${pkgdir}${MINGW_PREFIX}/include" - ) - ( - cd lib - install -m644 libes*.a libscotch*.a "${pkgdir}${MINGW_PREFIX}/lib" - install -m644 libscotch*.dll "${pkgdir}${MINGW_PREFIX}/bin" - cd "${pkgdir}${MINGW_PREFIX}/lib" - rm -rf *metis*a - ) -} - -eval "package_${MINGW_PACKAGE_PREFIX}-pt${_realname}() { _ptscotch; }" - -_ptscotch() { - pkgdesc="Parallel graph partitioning and sparse matrix ordering package (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-scotch") - cd "${srcdir}/${_realname}_${pkgver}" - mkdir -p ${pkgdir}${MINGW_PREFIX}/{bin,lib,include} - mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig" echo " prefix=${MINGW_PREFIX} libdir=\${prefix}/lib @@ -100,34 +63,23 @@ _ptscotch() { Name: ptscotch URL: ${url} Version: ${pkgver} - Description: ${pkgdesc} + Description: Parallel graph partitioning and sparse matrix ordering package Requires: scotch Requires.private: msmpi Cflags: -I\${includedir} Libs.private: -lptscotcherr Libs: -L\${libdir} -lptscotch " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ptscotch.pc" - echo " - prefix=${MINGW_PREFIX} - libdir=\${prefix}/lib - includedir=\${prefix}/include - Name: ptesmumps - URL: ${url} - Version: ${pkgver} - Description: PT-Scotch intergation layer for MUMPS (mingw-w64) - Cflags: -I\${includedir} - Requires: ptscotch - Libs: -L\${libdir} -lptesmumps - " | sed '/^\s*$/d;s/^\s*//' > "${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ptesmumps.pc" ( cd include - install -m644 ptscotch*.h "${pkgdir}${MINGW_PREFIX}/include" # esmumps.h + install -m644 *.h "${pkgdir}${MINGW_PREFIX}/include" + cd "${pkgdir}${MINGW_PREFIX}/include" + mv metis.h scotchmetis.h + mv parmetis.h ptscotchparmetis.h ) ( cd lib - install -m644 libptes*.a libptscotch*.a "${pkgdir}${MINGW_PREFIX}/lib" - install -m644 libptscotch*.dll "${pkgdir}${MINGW_PREFIX}/bin" - cd "${pkgdir}${MINGW_PREFIX}/lib" - rm -rf *metis*a + install -m644 lib*.a "${pkgdir}${MINGW_PREFIX}/lib" + install -m644 lib*.dll "${pkgdir}${MINGW_PREFIX}/bin" ) }