Ticket #57669: Portfile.5

File Portfile.5, 2.9 KB (added by mbrethen, 5 years ago)

Use vecLibFort for BLAS and LAPACK

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
3PortSystem          1.0
4PortGroup           compilers 1.0
5
6name                taucs
7version             2.2
8categories          maths
9platforms           darwin
10license             LGPL
11maintainers         {gmail.com:mark.brethen @mbrethen} openmaintainer
12
13description         C library of sparse linear solvers
14
15long_description    TAUCS is a ${description}.
16
17homepage            https://www.tau.ac.il/~stoledo/taucs/
18master_sites        ${homepage}${version}
19dist_subdir         ${name}/${version}
20distname            ${name}
21extract.suffix      .tgz
22extract.mkdir       yes
23
24checksums           rmd160  e7621bc65af42432e708318e93bce8958bf3a482 \
25                    sha256  fc13dae767db5e9035b1ce63036a16d3a260aad784f461e073f1150a078a77e4 \
26                    size    1573863
27
28depends_lib-append  port:metis \
29                    port:vecLibFort
30
31compilers.choose    cc f77
32compilers.setup     require_fortran
33
34post-extract {
35    fs-traverse item ${worksrcpath} {
36        if [file isdirectory ${item}] {
37            file attributes ${item} -permissions a+rx
38        } else {
39            file attributes ${item} -permissions a+r
40        }
41    }
42}
43
44patchfiles          patch-taucs-build.diff \
45                    LDFLAGS.patch \
46                    dylib.patch
47
48universal_variant   no
49
50pre-configure {
51    configure.env   OSTYPE=${ostype}
52}
53
54configure.pre_args
55configure.universal_args
56
57post-configure {
58    global ostype
59    reinplace "s|@@CC@@|${configure.cc}|g" \
60        ${worksrcpath}/config/${ostype}.mk
61    reinplace "s|@@CFLAGS@@|${configure.cflags}|g" \
62        ${worksrcpath}/config/${ostype}.mk
63    reinplace "s|@@FC@@|${configure.f77}|g" \
64        ${worksrcpath}/config/${ostype}.mk
65    reinplace "s|@@FFLAGS@@|${configure.fflags}|g" \
66        ${worksrcpath}/config/${ostype}.mk
67    reinplace "s|@@LDFLAGS@@|${configure.ldflags}|g" \
68        ${worksrcpath}/config/${ostype}.mk
69}
70
71depends_build-append  port:libf2c
72
73build.args          PREFIX=${prefix}
74
75destroot {
76    foreach dir {bin lib} {
77        delete ${worksrcpath}/${dir}/${ostype}/exists.log
78        delete ${destroot}${prefix}/${dir}
79        copy ${worksrcpath}/${dir}/${ostype} ${destroot}${prefix}/${dir}
80    }
81    ln -s libtaucs.1.dylib ${destroot}${prefix}/lib/libtaucs.dylib
82    copy {*}[glob ${worksrcpath}/build/${ostype}/*.h] ${destroot}${prefix}/include/.
83    copy {*}[glob ${worksrcpath}/src/*.h] ${destroot}${prefix}/include/.
84}
85
86post-destroot {
87    xinstall -d ${destroot}${prefix}/share/doc/${name}
88    copy {*}[glob ${worksrcpath}/doc/*.pdf] ${destroot}${prefix}/share/doc/${name}/.
89}
90
91platform darwin {
92    set ostype      darwin
93}
94
95platform powerpc {
96    configure.cflags-append -faltivec
97}
98
99livecheck.type      regex
100livecheck.url       ${homepage}
101livecheck.regex     "(\[0-9.\]+)/${distfiles}"