# -*- 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 # $Id$ PortSystem 1.0 name scotch version 5.1.12b set v_version_wo_char {} set v_char {} set v_regexp {(5\.\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: set release 28978 categories science maintainers mk pixilla platforms darwin license CeCILL-C 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.type regex livecheck.url https://gforge.inria.fr/frs/?group_id=248 livecheck.regex "scotch_(5\\.\\d+\\.\\d+\[a-zA-Z\]+)_esmumps\\.tar\\.gz" use_bzip2 no worksrcdir ${name}_${v_version_wo_char}_esmumps/src checksums md5 e13b49be804755470b159d7052764dc0 \ sha1 3866deea3199bc364d31ec46c63adcb799a8cf48 \ rmd160 38ed5135e401767d0df8ecea6bcf8f7e4a60a464 # openmpi is not universal universal_variant no use_configure no set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} set default_fortran_variant +gcc48 foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"} foreach over ${gcc_versions} { if {${ver} == ${over}} { continue } set over_no_dot [join [split ${over} "."] ""] append variant_line " conflicts gcc${over_no_dot}" } append variant_line { {}} eval $variant_line if {[variant_isset gcc${ver_no_dot}]} { if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { set default_fortran_variant "" } } } if {${default_fortran_variant} != ""} { default_variants-append "${default_fortran_variant}" } foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] if {[variant_isset gcc${ver_no_dot}]} { depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc depends_build-append port:gcc${ver_no_dot} configure.fc ${prefix}/bin/gfortran-mp-${ver} configure.f77 ${prefix}/bin/gfortran-mp-${ver} configure.f90 ${prefix}/bin/gfortran-mp-${ver} } } set archflags [get_canonical_archflags] depends_lib-append port:openmpi build.env-append CC=${configure.cc} \ CXX=${configure.cxx} \ CFLAGS="${configure.cflags} ${archflags}" \ CXXFLAGS="${configure.cxxflags} ${archflags}" \ LDFLAGS="[join ${configure.ldflags}] ${archflags}" pre-build { 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|${prefix}/bin/openmpicc|" ${worksrcpath}/Makefile.inc } build.target scotch ptscotch # scotch and ptscotch MUST be built sequentially according to scotch's INSTALL.txt use_parallel_build no destroot { eval xinstall -m 755 [glob ${worksrcpath}/../bin/*] ${destroot}${prefix}/bin eval xinstall -m 755 [glob ${worksrcpath}/../include/*] ${destroot}${prefix}/include eval xinstall -m 755 [glob ${worksrcpath}/../lib/*] ${destroot}${prefix}/lib xinstall -m 755 -d ${destroot}${prefix}/share/man/man1 eval xinstall -m 755 [glob ${worksrcpath}/../man/man1/*] ${destroot}${prefix}/share/man/man1 }