# -*- 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
# this is specific to this port and *version* for downloading it:
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}
livecheck.url https://gforge.inria.fr/frs/?group_id=248
livecheck.regex "scotch_(5\\.\\d+\\.\\d+)\\.tar\\.gz"
worksrcdir ${name}_${version}/src
checksums md5 36d638a227f38a219b51fe8ddc2093ac \
sha1 7cee69345bd101b0dbd8aff9b410dea6834c32d6 \
rmd160 2b72f555af192a17eecec65d50bd241ad87adec2
configure.compiler macports-gcc-4.4
set archflags [get_canonical_archflags]
depends_lib port:openmpi port:gcc44
build.env-append CC=${configure.cc} \
CFLAGS="${configure.cflags} ${archflags}" \
CXXFLAGS="${configure.cxxflags} ${archflags}" \
LDFLAGS="[join ${configure.ldflags}] ${archflags}"
copy ${worksrcpath}/Make.inc/Makefile.inc.i686_mac_darwin8 ${worksrcpath}/Makefile.inc
reinplace "s|gcc|\$(CC)|" ${worksrcpath}/Makefile.inc
build.target scotch ptscotch
# scotch and ptscotch MUST be built sequentially according to scotch's INSTALL.txt