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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup compilers 1.0 |
---|
5 | |
---|
6 | name CalculiX |
---|
7 | version 2.18 |
---|
8 | categories cad |
---|
9 | platforms darwin |
---|
10 | license GPL-2+ |
---|
11 | maintainers {gmail.com:mark.brethen @mbrethen} openmaintainer |
---|
12 | description CalculiX GraphiX pre- and post-processor cgx |
---|
13 | long_description {*}${description} is an interactive 3D-tool using \ |
---|
14 | the openGL API. \ |
---|
15 | \n \ |
---|
16 | \nSupported solvers \ |
---|
17 | \n* CalculiX ccx, Abaqus FEM (pre, post) \ |
---|
18 | \n* Nastran FEM (pre) \ |
---|
19 | \n* Ansys FEM (pre) \ |
---|
20 | \n* DUNS-CFD (pre, post) \ |
---|
21 | \n* ISAAC-CFD (pre, post) \ |
---|
22 | \n* OpenFOAM (pre, post) |
---|
23 | homepage http://www.calculix.de/ |
---|
24 | master_sites http://www.dhondt.de/ |
---|
25 | use_bzip2 yes |
---|
26 | |
---|
27 | distname cgx_${version} |
---|
28 | distfiles ${distname}.all${extract.suffix} \ |
---|
29 | ${distname}.exa${extract.suffix} \ |
---|
30 | ${distname}.htm${extract.suffix} |
---|
31 | dist_subdir CalculiX |
---|
32 | |
---|
33 | checksums \ |
---|
34 | ${distname}.all${extract.suffix} \ |
---|
35 | sha256 dea36f02f36f35a420241b8ed9836f0121b75b5af1abb8e13ca48e31dc4f8734 \ |
---|
36 | size 5749856 \ |
---|
37 | ${distname}.exa${extract.suffix} \ |
---|
38 | sha256 498d239ae77be8f3f5d1f48acc431724dd297a246755bfb651dcbc03ba233873 \ |
---|
39 | size 3921273 \ |
---|
40 | ${distname}.htm${extract.suffix} \ |
---|
41 | sha256 486ce50880cb0c298f6ccdde353bc8982bfb095294a7404eb966b3345d790312 \ |
---|
42 | size 377755 |
---|
43 | |
---|
44 | extract.only ${distname}.all${extract.suffix} \ |
---|
45 | ${distname}.exa${extract.suffix} \ |
---|
46 | ${distname}.htm${extract.suffix} |
---|
47 | |
---|
48 | # gcc is not really supported for c++ builds |
---|
49 | compilers.choose cxx cc |
---|
50 | compilers.setup -gcc |
---|
51 | |
---|
52 | depends_build-append port:xorg-xorgproto \ |
---|
53 | port:xorg-libice \ |
---|
54 | port:xorg-libsm \ |
---|
55 | port:xorg-libX11 \ |
---|
56 | port:xorg-libXext \ |
---|
57 | port:xorg-libXi \ |
---|
58 | port:xorg-libXmu \ |
---|
59 | port:xorg-libXt |
---|
60 | |
---|
61 | depends_run-append port:CalculiX-ccx \ |
---|
62 | port:gnuplot \ |
---|
63 | port:ImageMagick \ |
---|
64 | port:openbrowser \ |
---|
65 | port:psutils \ |
---|
66 | port:tetgen |
---|
67 | |
---|
68 | depends_lib-append port:libGLU \ |
---|
69 | port:freeglut |
---|
70 | |
---|
71 | patchfiles patch-cgx-build.diff \ |
---|
72 | patch-libSNL-build.diff |
---|
73 | |
---|
74 | use_configure no |
---|
75 | |
---|
76 | worksrcdir CalculiX |
---|
77 | build.dir ${worksrcpath}/cgx_${version}/src |
---|
78 | build.target |
---|
79 | |
---|
80 | variant docs description {Install html documentation} {} |
---|
81 | |
---|
82 | variant examples description {Install test examples} {} |
---|
83 | |
---|
84 | universal_variant no |
---|
85 | |
---|
86 | default_variants +docs +examples |
---|
87 | |
---|
88 | pre-build { |
---|
89 | # Patch calculix library |
---|
90 | reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cgx_${version}/src/cgx.h |
---|
91 | reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/cgx_${version}/src/Makefile |
---|
92 | |
---|
93 | # Set environment variables for build |
---|
94 | set args [list \ |
---|
95 | "CC=${configure.cc}" \ |
---|
96 | "CXX=${configure.cxx}" \ |
---|
97 | "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \ |
---|
98 | "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \ |
---|
99 | "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" |
---|
100 | ] |
---|
101 | |
---|
102 | build.env-append {*}${args} |
---|
103 | } |
---|
104 | |
---|
105 | destroot { |
---|
106 | xinstall -m a+rx ${build.dir}/cgx ${destroot}${prefix}/bin/. |
---|
107 | |
---|
108 | if {[variant_isset docs]} { |
---|
109 | set docsdir ${prefix}/share/doc/CalculiX/cgx |
---|
110 | xinstall -d ${destroot}${docsdir} |
---|
111 | copy {*}[glob ${worksrcpath}/cgx_${version}/doc/cgx/*] ${destroot}${docsdir} |
---|
112 | } |
---|
113 | |
---|
114 | if {[variant_isset examples]} { |
---|
115 | set examplesdir ${prefix}/share/examples/cgx |
---|
116 | xinstall -d ${destroot}${examplesdir} |
---|
117 | copy {*}[glob ${worksrcpath}/cgx_${version}/examples/*] ${destroot}${examplesdir} |
---|
118 | } |
---|
119 | } |
---|
120 | |
---|
121 | livecheck.type regex |
---|
122 | livecheck.url http://www.dhondt.de/ |
---|
123 | livecheck.regex {cgx_${version}.all} |
---|