# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
set v_regexp {(\d+\.\d+\.\d+)([a-zA-Z]?)}
regexp $v_regexp ${version} -> v_version_wo_char v_char
# this is specific to this port and *version* for downloading it:
maintainers {pixilla @pixilla} openmaintainer
description Scotch is a software package for graph and mesh/hypergraph \
partitioning and sparse matrix ordering.
long_description ${description}
homepage http://gforge.inria.fr/projects/scotch
master_sites https://gforge.inria.fr/frs/download.php/${release}
distname scotch_${version}_esmumps
livecheck.url https://gforge.inria.fr/frs/?group_id=248
livecheck.regex "scotch_($v_regexp)_esmumps${extract.suffix}"
worksrcdir ${name}_${v_version_wo_char}_esmumps/src
checksums rmd160 71c0c7d189a35e261a09f239696369e5f41b2508 \
sha256 8206127d038bda868dda5c5a7f60ef8224f2e368298fbb01bf13fa250e378dd4
patchfiles patch-libscotch-shared.diff \
patch-libscotchmetis-shared.diff
copy ${worksrcpath}/Make.inc/Makefile.inc.i686_mac_darwin8 ${worksrcpath}/Makefile.inc
reinplace "s|-O3|-O3 -fPIC|" ${worksrcpath}/Makefile.inc
reinplace "s|gcc|\$(CC)|" ${worksrcpath}/Makefile.inc
reinplace "s|mpicc|${mpi.cc}|" ${worksrcpath}/Makefile.inc
# starting with version 6.0, scotch uses a newer version of pthreads which
# Apple hasn't provided, so we disable pthreads for now
reinplace "s|-DCOMMON_PTHREAD||" ${worksrcpath}/Makefile.inc
reinplace "s|-DSCOTCH_PTHREAD||" ${worksrcpath}/Makefile.inc
build.env-append CC=${configure.cc} \