Ticket #39333: Portfile

File Portfile, 3.1 KB (added by wimmer@…, 11 years ago)

Portfile with explicit path to openmpicc

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$
3
4PortSystem          1.0
5
6name                scotch
7version             5.1.11
8revision            5
9
10# this is specific to this port and *version* for downloading it:
11set release         28043
12
13categories          science
14maintainers         mk pixilla
15platforms           darwin
16license             CeCILL-C
17
18description         Scotch is a software package for graph and mesh/hypergraph partitioning and sparse matrix ordering.
19long_description    ${description}
20
21homepage            http://gforge.inria.fr/projects/scotch
22master_sites        https://gforge.inria.fr/frs/download.php/${release}
23distname            scotch_${version}
24
25livecheck.type      regex
26livecheck.url       https://gforge.inria.fr/frs/?group_id=248
27livecheck.regex     "scotch_(5\\.\\d+\\.\\d+)\\.tar\\.gz"
28
29use_bzip2           no
30
31worksrcdir          ${name}_${version}/src
32
33checksums           md5     36d638a227f38a219b51fe8ddc2093ac \
34                    sha1    7cee69345bd101b0dbd8aff9b410dea6834c32d6 \
35                    rmd160  2b72f555af192a17eecec65d50bd241ad87adec2
36
37use_configure       no
38
39variant gcc44 conflicts gcc45 gcc46 gcc47 description {Build with gcc 4.4} {}
40variant gcc45 conflicts gcc44 gcc46 gcc47 description {Build with gcc 4.5} {}
41variant gcc46 conflicts gcc44 gcc45 gcc47 description {Build with gcc 4.6} {}
42variant gcc47 conflicts gcc44 gcc45 gcc46 description {Build with gcc 4.7} {}
43
44if {[variant_isset gcc44]} {
45    depends_lib-append  port:gcc44
46    configure.compiler  macports-gcc-4.4
47} elseif {[variant_isset gcc45]} {
48    depends_lib-append  port:gcc45
49    configure.compiler  macports-gcc-4.5
50} elseif {[variant_isset gcc46]} {
51    depends_lib-append  port:gcc46
52    configure.compiler  macports-gcc-4.6
53} else {
54    default_variants    +gcc47
55    depends_lib-append  port:gcc47
56    configure.compiler  macports-gcc-4.7
57}
58
59variant universal {
60}
61
62set archflags       [get_canonical_archflags]
63
64depends_lib-append  port:openmpi
65
66build.env-append    CC=${configure.cc} \
67                    CXX=${configure.cxx} \
68                    CFLAGS="${configure.cflags} ${archflags}" \
69                    CXXFLAGS="${configure.cxxflags} ${archflags}" \
70                    LDFLAGS="[join ${configure.ldflags}] ${archflags}"
71
72pre-build {
73    copy ${worksrcpath}/Make.inc/Makefile.inc.i686_mac_darwin8 ${worksrcpath}/Makefile.inc
74    reinplace "s|gcc|\$(CC)|" ${worksrcpath}/Makefile.inc
75    reinplace "s|mpicc|${prefix}/bin/openmpicc|" ${worksrcpath}/Makefile.inc
76}
77
78build.target scotch ptscotch
79
80# scotch and ptscotch MUST be built sequentially according to scotch's INSTALL.txt
81use_parallel_build no
82
83destroot {
84    eval xinstall -m 755 [glob ${worksrcpath}/../bin/*] ${destroot}${prefix}/bin
85    eval xinstall -m 755 [glob ${worksrcpath}/../include/*] ${destroot}${prefix}/include
86    eval xinstall -m 755 [glob ${worksrcpath}/../lib/*] ${destroot}${prefix}/lib
87    xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
88    eval xinstall -m 755 [glob ${worksrcpath}/../man/man1/*] ${destroot}${prefix}/share/man/man1
89}
90