39 | | --disable-shared |
| 40 | --enable-nglib |
| 41 | |
| 42 | variant occ description {EnableOpenCascade support} { |
| 43 | depends_lib-append port:oce |
| 44 | patchfiles-append patch-libsrc-occ-Partition_Loop2d.cxx.diff |
| 45 | |
| 46 | configure.args-append --enable-occ --with-occ=${prefix}/include/oce |
| 47 | |
| 48 | # Netgen 5.3.1 appends problematic hard-coded directories |
| 49 | # on to the include and lib paths. |
| 50 | configure.args-append CPPFLAGS=-I${prefix}/include/oce LDFLAGS=-L${prefix}/lib/ |
| 51 | } |
| 52 | |
| 53 | post-destroot { |
| 54 | # Usage of nglib requires some headers that aren't installed by default. |
| 55 | # Unfortunately, the best solution seems to be copying headers from the |
| 56 | # entire libsrc directory in to ${prefix}/share... |
| 57 | proc ng_libsrc_copy {src dest subdir} { |
| 58 | xinstall -m 755 -d $dest/$subdir |
| 59 | xinstall -m 644 {*}[glob -directory $src/libsrc/$subdir/ *\.h *.hpp] $dest/$subdir |
| 60 | } |
| 61 | |
| 62 | set netgen_libsrc_dir ${destroot}${prefix}/include/netgen |
| 63 | |
| 64 | xinstall -m 755 -d ${netgen_libsrc_dir} |
| 65 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} csg |
| 66 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} general |
| 67 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} geom2d |
| 68 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} gprim |
| 69 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} include |
| 70 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} interface |
| 71 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} linalg |
| 72 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} meshing |
| 73 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} occ |
| 74 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} stlgeom |
| 75 | ng_libsrc_copy ${worksrcpath} ${netgen_libsrc_dir} visualization |
| 76 | } |