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 | PortGroup github 1.0 |
---|
6 | PortGroup cmake 1.1 |
---|
7 | PortGroup cxx11 1.1 |
---|
8 | PortGroup active_variants 1.1 |
---|
9 | |
---|
10 | github.setup NGSolve netgen 6.2.1808 v |
---|
11 | platforms darwin |
---|
12 | categories math |
---|
13 | license LGPL-2 |
---|
14 | maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer |
---|
15 | description NETGEN is an automatic 3d tetrahedral mesh generator |
---|
16 | long_description ${description}. It accepts input from constructive \ |
---|
17 | solid geometry (CSG) or boundary representation (BRep) \ |
---|
18 | from STL file format. The connection to a geometry kernel \ |
---|
19 | allows the handling of IGES and STEP files. NETGEN contains \ |
---|
20 | modules for mesh optimization and hierarchical mesh \ |
---|
21 | refinement. |
---|
22 | homepage https://ngsolve.org/ |
---|
23 | |
---|
24 | checksums rmd160 ec1aabc5732a558bcf3744ea883b0b09c036ee0d \ |
---|
25 | sha256 619548a62b16c635f81cfbc8611e1e65053cc41766cdd247d32bd1a4073ff1bf \ |
---|
26 | size 3002932 |
---|
27 | |
---|
28 | compilers.choose cc cxx |
---|
29 | compilers.setup |
---|
30 | |
---|
31 | # do not attempt to download & install tkdnd or Tcl/Tk |
---|
32 | patchfiles-append patch-no-external.diff |
---|
33 | # do not install another version of pybind11 |
---|
34 | patchfiles-append patch-no-pybind.diff |
---|
35 | # link Tcl/Tk libraries like other systems (unnecessary?) |
---|
36 | patchfiles-append patch-link-ng.diff |
---|
37 | # behave like other systems except use of RPATH |
---|
38 | patchfiles-append patch-CMakeLists.txt.diff |
---|
39 | # prevent console window from appearing |
---|
40 | # see http://wiki.tcl.tk/26777 |
---|
41 | patchfiles-append patch-no-console.diff |
---|
42 | |
---|
43 | set python_branch 3.7 |
---|
44 | set python_version [string map {. ""} ${python_branch}] |
---|
45 | |
---|
46 | depends_lib-append \ |
---|
47 | port:zlib \ |
---|
48 | port:tcl \ |
---|
49 | port:tk \ |
---|
50 | port:tkdnd \ |
---|
51 | port:Togl \ |
---|
52 | port:python${python_version} \ |
---|
53 | path:lib/libavcodec.dylib:ffmpeg \ |
---|
54 | port:jpeg |
---|
55 | |
---|
56 | depends_build-append \ |
---|
57 | port:pybind11 |
---|
58 | |
---|
59 | depends_run-append \ |
---|
60 | port:py${python_version}-tkinter |
---|
61 | |
---|
62 | configure.args-append \ |
---|
63 | -DUSE_NATIVE_ARCH=OFF \ |
---|
64 | -DPYBIND_INCLUDE_DIR=${prefix}/include \ |
---|
65 | -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin/python${python_branch} \ |
---|
66 | -DTCL_INCLUDE_PATH:PATH=${prefix}/include \ |
---|
67 | -DTK_INCLUDE_PATH:PATH=${prefix}/include \ |
---|
68 | -DOPENGL_glu_LIBRARY="" \ |
---|
69 | -DUSE_JPEG=ON \ |
---|
70 | -DUSE_MPEG=ON |
---|
71 | |
---|
72 | variant quartz conflicts x11 { |
---|
73 | require_active_variants tk quartz |
---|
74 | require_active_variants tkdnd quartz |
---|
75 | require_active_variants Togl quartz |
---|
76 | post-patch { |
---|
77 | reinplace \ |
---|
78 | "s|MACPORTS_NO_X11|TRUE|g" \ |
---|
79 | ${worksrcpath}/CMakeLists.txt |
---|
80 | } |
---|
81 | } |
---|
82 | |
---|
83 | variant x11 conflicts quartz { |
---|
84 | require_active_variants tk x11 |
---|
85 | require_active_variants tkdnd x11 |
---|
86 | require_active_variants Togl x11 |
---|
87 | depends_lib-append \ |
---|
88 | port:xorg-libX11 \ |
---|
89 | port:xorg-libXmu \ |
---|
90 | port:mesa |
---|
91 | depends_build-append \ |
---|
92 | port:libGLU |
---|
93 | configure.args-append \ |
---|
94 | -DOPENGL_gl_LIBRARY=${prefix}/lib/libGL.dylib |
---|
95 | } |
---|
96 | |
---|
97 | if {![variant_isset quartz]} { |
---|
98 | default_variants +x11 |
---|
99 | } |
---|
100 | |
---|
101 | variant oce conflicts opencascade description {(not supported) compile with Open CASCADE Community Edition geometry kernel} { |
---|
102 | depends_lib-append port:oce |
---|
103 | configure.args-append -DUSE_OCC=ON \ |
---|
104 | -DOCC_INCLUDE_DIR=${prefix}/include/oce \ |
---|
105 | -DOCC_LIBRARY=${prefix}/lib |
---|
106 | } |
---|
107 | |
---|
108 | variant opencascade conflicts oce description {(not supported) compile with Open CASCADE geometry kernel} { |
---|
109 | depends_lib-append port:opencascade |
---|
110 | configure.args-append -DUSE_OCC=ON \ |
---|
111 | -DOCC_INCLUDE_DIR=${prefix}/include/opencascade \ |
---|
112 | -DOCC_LIBRARY=${prefix}/lib |
---|
113 | } |
---|
114 | |
---|
115 | pre-configure { |
---|
116 | if {![variant_isset quartz] && ![variant_isset x11]} { |
---|
117 | error "Either +x11 or +quartz is required" |
---|
118 | } |
---|
119 | } |
---|
120 | |
---|
121 | post-destroot { |
---|
122 | delete ${destroot}${prefix}/bin/Netgen1 |
---|
123 | delete ${destroot}${prefix}/bin/startup.sh |
---|
124 | |
---|
125 | xinstall -d -m 0755 ${destroot}${applications_dir}/Netgen.app/Contents/Resources |
---|
126 | xinstall -d -m 0755 ${destroot}${applications_dir}/Netgen.app/Contents/MacOS |
---|
127 | |
---|
128 | ln -s \ |
---|
129 | ${prefix}/bin/netgen \ |
---|
130 | ${destroot}${applications_dir}/Netgen.app/Contents/MacOS/Netgen |
---|
131 | |
---|
132 | move \ |
---|
133 | ${destroot}${prefix}/Info.plist \ |
---|
134 | ${destroot}${applications_dir}/Netgen.app/Contents |
---|
135 | |
---|
136 | move \ |
---|
137 | ${destroot}${prefix}/Netgen.icns \ |
---|
138 | ${destroot}${applications_dir}/Netgen.app/Contents/Resources |
---|
139 | |
---|
140 | xinstall -d -m 0755 \ |
---|
141 | ${destroot}${frameworks_dir}/Python.framework/Versions/${python_branch}/lib/python${python_branch}/site-packages |
---|
142 | ln -s \ |
---|
143 | ${prefix}/lib/python${python_branch}/site-packages/netgen \ |
---|
144 | ${destroot}${frameworks_dir}/Python.framework/Versions/${python_branch}/lib/python${python_branch}/site-packages/ |
---|
145 | } |
---|