Ticket #65631: Portfile

File Portfile, 3.5 KB (added by mbrethen, 21 months 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
5
6name                    cgxCADTools
7version                 1.2
8categories              cad
9platforms               darwin
10license                 GPL-2+
11maintainers             {gmail.com:mark.brethen @mbrethen} openmaintainer
12description             CAD file translation between Calculix STEP IGES
13long_description        CAD file translation of solid, surface, wireframe data between CalculiX STEP IGES
14homepage                http://www.calculix.de/
15master_sites            http://www.dhondt.de/
16use_bzip2               yes
17
18distname                cgxCadTools
19distfiles               ${distname}${extract.suffix}
20
21checksums               ${distname}${extract.suffix} \
22                        sha256  c9f18aa43a2a96443519c6a0982cef867f736eddcc685a5b0dc1e55f55e7dfc0 \
23                        size    523781
24
25# gcc is not really supported for c++ builds
26compilers.choose        cxx
27compilers.setup         -gcc
28
29depends_lib-append      port:opencascade
30
31use_parallel_build      no
32
33universal_variant       no
34
35pre-build {
36    build.env-append \
37        "CXX=${configure.cxx}" \
38        "CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
39        "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld] -stdlib=${configure.cxx_stdlib}"
40}
41
42# This is just a stub that installs cad2fbd and fbd2cad.
43if {${name} eq ${subport}} {
44    supported_archs         noarch
45
46    depends_run-append      port:CadReader port:FbdReader
47
48    use_configure           no
49
50    build {}
51
52    destroot {
53        xinstall -d ${destroot}/${prefix}/share/doc/${distname}
54        xinstall -m 0644 -W ${worksrcpath} \
55        LICENSE \
56        README \
57        ${destroot}/${prefix}/share/doc/${distname}
58    }
59
60    livecheck.type          none
61} else {
62    livecheck.type          none
63}
64
65subport CadReader {
66    description             Tool for converting STEP/IGES to CalculiX
67    long_description        cad2fbd allows converting STEP and IGES to the CalculiX \
68                            native format fbd.
69
70    patchfiles              patch-CadReader-build.diff
71
72    use_configure           no
73
74    build.dir               ${worksrcpath}/${subport}/src
75
76    post-patch {
77        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/${subport}/src/Makefile
78    }
79
80    destroot {
81        xinstall -m a+rx ${worksrcpath}/${subport}/src/tmain ${destroot}${prefix}/bin/cad2fbd
82    }
83
84    notes \
85"- To test for a successfull installation, execute the tool by typing \"cad2fbd\"
86   
87-> some usage information should be displayed
88   
89- The file result.fbd should be opened with the cgx parameter '-a' (auto)
90   
91  cgx -a result.fbd"
92}
93
94subport FbdReader {
95    description             Tool for converting Calculix to STEP/IGES
96    long_description        fbd2cad allows converting CalculiX (fbd) files to standard \
97                            CAD exchange formats STEP and IGES.
98   
99    patchfiles              patch-FbdReader-build.diff
100
101    use_configure           no
102
103    build.dir               ${worksrcpath}/${subport}/src
104
105    post-patch {
106        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/${subport}/src/Makefile
107    }
108
109    destroot {
110        xinstall -m a+rx ${worksrcpath}/${subport}/src/tmain ${destroot}${prefix}/bin/fbd2cad
111    }
112
113    notes \
114"- To test for a successfull installation, execute the tool by typing \"fbd2cad\"
115
116-> some usage information should be displayed"
117}