Ticket #57763: Portfile

File Portfile, 4.2 KB (added by mbrethen, 5 years ago)
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
5PortGroup           cxx11     1.1
6
7name                CalculiX
8version             2.14.1
9set distversion     2.14
10categories          cad
11platforms           darwin
12license             GPL-2+
13maintainers         {gmail.com:mark.brethen @mbrethen} openmaintainer
14
15description         A three-dimensional finite element solver
16
17long_description    CalculiX is an open source explicit and implicit finite element analysis \
18                    suite with its own pre/post processor.
19
20homepage            http://www.calculix.de/
21master_sites        http://www.dhondt.de/
22dist_subdir         CalculiX
23distname            cgx_${distversion}
24
25use_bzip2           yes
26
27distfiles           ${distname}.all${extract.suffix} \
28                    ${distname}.htm${extract.suffix} \
29                    ${distname}.pdf                  \
30                    ${distname}.exa${extract.suffix}
31
32checksums           ${distname}.all${extract.suffix}                                         \
33                    rmd160  a426dca56cef6ff92ea9c154b2e02eb8a163d203                         \
34                    sha256  07658fcf2c00489cad16b58c6065ca8402c974f2c7e9d3e9dbca87cfd7275d12 \
35                    size    5451218                                                          \
36                    ${distname}.htm${extract.suffix}                                         \
37                    rmd160  902222670c382ad7a393d911cc7b47f4ca5211d1                         \
38                    sha256  280b5f76d3a6c61772fa50eeabca043b53d4083fcf186d1c80bfe5669398e6ea \
39                    size    338235                                                           \
40                    ${distname}.pdf                                                          \
41                    rmd160  1b054ebc09ee8688c5cd00ae8c937a6cc88bfd9e                         \
42                    sha256  b933bddbd21184931f2253d77eca63b9cf92a52d808660f27a636b742b328060 \
43                    size    1308087                                                          \
44                    ${distname}.exa${extract.suffix}                                         \
45                    rmd160  c8e85bed26c8d59233aa05e119df2b5ca6aa7cd3                         \
46                    sha256  78dbd438b64e68af48cec0c34fd76ab79d11aa0c7fcceb7357cf107fb203c2da \
47                    size    3928431
48
49extract.only        ${distname}.all${extract.suffix} \
50                    ${distname}.htm${extract.suffix} \
51                    ${distname}.exa${extract.suffix}
52
53patchfiles          patch-cgx-build.diff \
54                    patch-libSNL-build.diff
55
56post-patch {
57    reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/cgx_${version}/src/cgx.h
58}
59
60compilers.choose    cc cxx
61compilers.setup
62
63use_configure       no
64
65worksrcdir          CalculiX
66build.dir           ${worksrcpath}/cgx_${version}/src
67build.target           
68
69pre-build {
70    build.args-append \
71                    CC=${configure.cc}   \
72                    CXX=${configure.cxx} \
73                    CPP=${configure.cpp}
74}
75
76depends_run-append  port:CalculiX-ccx \
77                    port:gnuplot      \
78                    port:ImageMagick  \
79                    port:openbrowser  \
80                    port:psutils
81
82destroot {
83    set docsdir     ${prefix}/share/doc/CalculiX/cgx_${version}
84    set examplesdir ${prefix}/share/examples/cgx_${version}
85    xinstall -d ${destroot}${docsdir}
86    xinstall -d ${destroot}${examplesdir}
87
88    xinstall -m 755 ${build.dir}/cgx ${destroot}${prefix}/bin/.
89    copy ${worksrcpath}/cgx_${version}/doc/cgx ${destroot}${docsdir}
90    copy ${distpath}/${distname}.pdf ${destroot}${docsdir}
91
92    # Some garbage crept in the examples
93    delete {*}[glob ${worksrcpath}/cgx_${version}/examples/OpenFOAM/couette/constant/polyMesh/*.*~]
94    delete {*}[glob ${worksrcpath}/cgx_${version}/examples/OpenFOAM/couette/constant/*~]
95    delete {*}[glob ${worksrcpath}/cgx_${version}/examples/OpenFOAM/couette/system/*~]
96    copy {*}[glob ${worksrcpath}/cgx_${version}/examples/*] ${destroot}${examplesdir}
97}
98
99livecheck.type      regex
100livecheck.url       http://www.dhondt.de/
101livecheck.regex     {cgx_${distversion}.all}