summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Eleftheriou <george.eleftheriou@esi-group.com>2015-07-06 00:26:10 +0200
committerGeorge Eleftheriou <george.eleftheriou@esi-group.com>2015-07-06 00:26:10 +0200
commit74e367ece06b06c383caabb90003c46f1d8b1d17 (patch)
tree661aa27654ff3cbc66faf9dac0a716cc6e596b8f
Initial import
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD70
2 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..63e280e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = scotch
+ pkgdesc = Software package and libraries for graph, mesh and hypergraph partitioning, static mapping, and sparse matrix block ordering. This is the all-inclusive version (MPI/serial/esmumps).
+ pkgver = 6.0.4
+ pkgrel = 1
+ url = http://www.labri.fr/perso/pelegrin/scotch/
+ arch = i686
+ arch = x86_64
+ license = custom:CeCILL-C
+ depends = zlib
+ depends = openmpi
+ depends = bzip2
+ provides = ptscotch
+ provides = ptscotch-openmpi
+ provides = scotch_esmumps
+ provides = scotch_ptesmumps
+ conflicts = ptscotch-openmpi
+ conflicts = scotch_esmumps
+ conflicts = scotch_esmumps5
+ source = http://gforge.inria.fr/frs/download.php/file/34618/scotch_6.0.4.tar.gz
+ sha256sums = f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7
+
+pkgname = scotch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..d0a85fe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: George Eleftheriou <eleftg>
+# Contributor: eolianoe <eolianoe>
+
+pkgname=scotch
+pkgver=6.0.4
+_downloadnum=34618 # gforge is insane
+pkgrel=1
+pkgdesc="Software package and libraries for graph, mesh and hypergraph partitioning, static mapping, and sparse matrix block ordering. This is the all-inclusive version (MPI/serial/esmumps)."
+url="http://www.labri.fr/perso/pelegrin/scotch/"
+license=("custom:CeCILL-C")
+depends=('zlib' 'openmpi' 'bzip2')
+provides=('ptscotch' 'ptscotch-openmpi' 'scotch_esmumps' 'scotch_ptesmumps')
+conflicts=('ptscotch-openmpi' 'scotch_esmumps' 'scotch_esmumps5')
+arch=('i686' 'x86_64')
+source=("http://gforge.inria.fr/frs/download.php/file/${_downloadnum}/${pkgname}_${pkgver}.tar.gz")
+sha256sums=('f53f4d71a8345ba15e2dd4e102a35fd83915abf50ea73e1bf6efe1bc2b4220c7')
+
+prepare() {
+ cd "${srcdir}/${pkgname}_${pkgver}/src"
+
+ [ -e Makefile.inc ] && rm Makefile.inc
+ cp "Make.inc/Makefile.inc.${CARCH/_/-}_pc_linux2.shlib" Makefile.inc
+
+ # Use the CFLAGS defined /etc/makepkg.conf
+ sed -i "s/-O3/${CFLAGS} -fPIC/g" Makefile.inc
+
+ # Fix C compiler
+ sed -i "s/CCD\t.*=.*gcc/CCD = mpicc/" Makefile.inc
+
+ # Also enable bzip2 compression
+ sed -i "s/-DCOMMON_FILE_COMPRESS_GZ/-DCOMMON_FILE_COMPRESS_GZ -DCOMMON_FILE_COMPRESS_BZ2/" Makefile.inc
+ sed -i "s/-lz/-lz -lbz2/" Makefile.inc
+
+ # Fix the creation of directories
+ sed -i "s/mkdir/mkdir\ -p/" Makefile.inc
+
+ # To install headers and libs also for esmumps
+ sed -i 's/scotch\*/{scotch,esmumps}\*/g' Makefile
+}
+
+build() {
+ cd "${srcdir}/${pkgname}_${pkgver}/src"
+
+ make scotch
+ make -j1 esmumps
+
+ # MPI implementation is not thread-safe: compile the parallel versions without SCOTCH_PTHREAD
+ sed -i "s/-DSCOTCH_PTHREAD//" Makefile.inc
+
+ make ptscotch
+ make -j1 ptesmumps
+}
+
+check() {
+ cd "${srcdir}/${pkgname}_${pkgver}/src"
+
+ make check LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../../lib"
+ make ptcheck LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../../lib"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}_${pkgver}/src"
+
+ make install prefix="${pkgdir}/usr" includedir="${pkgdir}/usr/include/scotch"
+
+ # To avoid conflict with extra/gpart, maybe move the package to /opt/scotch ?
+ mv "${pkgdir}/usr/bin/gpart" "${pkgdir}/usr/bin/gpart-scotch"
+
+ install -m 644 -D "${srcdir}/scotch_${pkgver}/doc/CeCILL-C_V1-en.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}