Ticket #57669: Portfile.3

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

Replaced f2c lib-dependency with libf2c build-dependency; removed doc variant

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   
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
30compilers.choose    cc f77
31compilers.setup     require_fortran
32
33post-extract {
34    fs-traverse item ${worksrcpath} {
35        if [file isdirectory ${item}] {
36            file attributes ${item} -permissions a+rx
37        } else {
38            file attributes ${item} -permissions a+r
39        }
40    }
41}
42
43patchfiles          patch-taucs-build.diff \
44                    LDFLAGS.patch \
45                    dylib.patch
46
47universal_variant   no
48
49pre-configure {
50    configure.env   OSTYPE=${ostype}
51}
52
53configure.pre_args
54configure.universal_args
55
56post-configure {
57    global ostype
58    reinplace "s|@@CC@@|${configure.cc}|g" \
59        ${worksrcpath}/config/${ostype}.mk
60    reinplace "s|@@CFLAGS@@|${configure.cflags}|g" \
61        ${worksrcpath}/config/${ostype}.mk
62    reinplace "s|@@FC@@|${configure.f77}|g" \
63        ${worksrcpath}/config/${ostype}.mk
64    reinplace "s|@@FFLAGS@@|${configure.fflags}|g" \
65        ${worksrcpath}/config/${ostype}.mk
66    reinplace "s|@@LDFLAGS@@|${configure.ldflags}|g" \
67        ${worksrcpath}/config/${ostype}.mk
68}
69
70depends_build-append  port:libf2c
71
72build.args          PREFIX=${prefix}
73
74destroot {
75    foreach dir {bin lib} {
76        delete ${worksrcpath}/${dir}/${ostype}/exists.log
77        delete ${destroot}${prefix}/${dir}
78        copy ${worksrcpath}/${dir}/${ostype} ${destroot}${prefix}/${dir}
79    }
80    ln -s libtaucs.1.dylib ${destroot}${prefix}/lib/libtaucs.dylib
81}
82
83post-destroot {
84    xinstall -d ${destroot}${prefix}/share/doc/${name}
85    copy {*}[glob ${worksrcpath}/doc/*.pdf] ${destroot}${prefix}/share/doc/${name}/.
86}
87
88platform darwin {
89    set ostype      darwin
90}
91
92platform powerpc {
93    configure.cflags-append -faltivec
94}
95
96livecheck.type      regex
97livecheck.url       ${homepage}
98livecheck.regex     "(\[0-9.\]+)/${distfiles}"