source: trunk/dports/science/scotch/Portfile

Last change on this file was 130952, checked in by sean@…, 3 years ago

mpi-1.0: set default variant in the portgroup

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- 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
2# $Id: Portfile 130952 2015-01-04 06:01:01Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           mpi 1.0
6
7name                scotch
8version             6.0.0
9
10set v_version_wo_char {}
11set v_char            {}
12set v_regexp          {(\d+\.\d+\.\d+)([a-zA-Z]?)}
13regexp $v_regexp ${version} -> v_version_wo_char v_char
14
15# this is specific to this port and *version* for downloading it:
16set release         31832
17
18categories          science
19maintainers         pixilla openmaintainer
20platforms           darwin
21license             CeCILL-C
22
23description         Scotch is a software package for graph and mesh/hypergraph \
24                    partitioning and sparse matrix ordering.
25long_description    ${description}
26
27homepage            http://gforge.inria.fr/projects/scotch
28master_sites        https://gforge.inria.fr/frs/download.php/${release}
29distname            scotch_${version}_esmumps
30
31livecheck.type      regex
32livecheck.url       https://gforge.inria.fr/frs/?group_id=248
33livecheck.regex     "scotch_($v_regexp)_esmumps${extract.suffix}"
34
35use_bzip2           no
36
37worksrcdir          ${name}_${v_version_wo_char}_esmumps/src
38
39checksums           rmd160  71c0c7d189a35e261a09f239696369e5f41b2508 \
40                    sha256  8206127d038bda868dda5c5a7f60ef8224f2e368298fbb01bf13fa250e378dd4
41
42compilers.choose    cc cxx
43mpi.setup           require
44
45patchfiles          patch-libscotch-shared.diff \
46                    patch-libscotchmetis-shared.diff
47
48use_configure       no
49
50post-extract {
51    copy ${worksrcpath}/Make.inc/Makefile.inc.i686_mac_darwin8 ${worksrcpath}/Makefile.inc
52    reinplace "s|-O3|-O3 -fPIC|" ${worksrcpath}/Makefile.inc
53    reinplace "s|gcc|\$(CC)|" ${worksrcpath}/Makefile.inc
54    reinplace "s|mpicc|${mpi.cc}|" ${worksrcpath}/Makefile.inc
55
56    # starting with version 6.0, scotch uses a newer version of pthreads which
57    # Apple hasn't provided, so we disable pthreads for now
58    reinplace "s|-DCOMMON_PTHREAD||" ${worksrcpath}/Makefile.inc
59    reinplace "s|-DSCOTCH_PTHREAD||" ${worksrcpath}/Makefile.inc
60}
61
62pre-build {
63    build.env-append    CC=${configure.cc} \
64                        CXX=${configure.cxx} \
65                        CFLAGS="${configure.cflags}" \
66                        CXXFLAGS="${configure.cxxflags}" \
67                        LDFLAGS="[join ${configure.ldflags}]" \
68                        prefix=${prefix}
69}
70
71build.target scotch ptscotch
72
73# scotch and ptscotch MUST be built sequentially according to scotch's INSTALL.txt
74use_parallel_build no
75
76pre-destroot {
77    destroot.env-append prefix=${destroot}${prefix}
78}
79
80post-destroot {
81    eval xinstall -m 755 [glob ${worksrcpath}/../lib/*.dylib] ${destroot}${prefix}/lib
82}
Note: See TracBrowser for help on using the repository browser.