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 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cmake 1.0 |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | github.setup tpaviot oce 0.17 OCE- |
---|
9 | categories graphics |
---|
10 | platforms darwin |
---|
11 | maintainers gmail.com:mark.brethen openmaintainer |
---|
12 | license LGPL-2.1 |
---|
13 | |
---|
14 | description Open CASCADE Community Edition |
---|
15 | |
---|
16 | long_description ${description} |
---|
17 | |
---|
18 | checksums rmd160 6f9b957423bd7de7f16e2fa19fce2934be829289 \ |
---|
19 | sha256 0bcc76d067cd5cbbdfe4ad477093fbdf9d08a01cfe5b4afe0e296632afaeffde |
---|
20 | |
---|
21 | depends_lib-append port:freetype |
---|
22 | |
---|
23 | # tell CMake to build in a build directory |
---|
24 | configure.dir ${workpath}/build |
---|
25 | build.dir ${configure.dir} |
---|
26 | post-extract { |
---|
27 | file mkdir ${configure.dir} |
---|
28 | } |
---|
29 | configure.post_args ${worksrcpath} |
---|
30 | |
---|
31 | configure.args-append -DOCE_INSTALL_PREFIX:PATH=${prefix} |
---|
32 | |
---|
33 | variant test description {Build and run unit testing framework} { |
---|
34 | configure.args-append -DOCE_TESTING:BOOL=ON |
---|
35 | test.run yes |
---|
36 | } |
---|
37 | |
---|
38 | variant draw description {Build DRAW test harness} { |
---|
39 | depends_lib-append port:tcl port:tk |
---|
40 | configure.args-append -DTCL_INCLUDE_PATH=${prefix}/include |
---|
41 | configure.args-append -DOCE_DRAW:BOOL=ON |
---|
42 | configure.args-append -DOCE_INSTALL_PACKAGE_LIB_DIR=lib |
---|
43 | } |
---|
44 | |
---|
45 | variant tbb description {Use TBB for memory allocation} { |
---|
46 | depends_lib-append port:tbb |
---|
47 | configure.args-append -DOCE_MULTITHREAD_LIBRARY:STRING=TBB |
---|
48 | } |
---|
49 | |
---|
50 | variant freeimage description {Build with FreeImage support} { |
---|
51 | depends_lib-append port:freeimage |
---|
52 | configure.args-append -DOCE_WITH_FREEIMAGE:BOOL=ON |
---|
53 | } |
---|
54 | |
---|
55 | variant gl2ps description {Build with gl2ps support} { |
---|
56 | depends_lib-append port:gl2ps |
---|
57 | configure.args-append -DOCE_WITH_GL2PS:BOOL=ON |
---|
58 | } |
---|
59 | |
---|
60 | post-destroot { |
---|
61 | # modify installation paths relative to ${prefix}/Library/Frameworks |
---|
62 | reinplace "s|\\\${SELF_DIR}/../../../../include/oce|${prefix}/include/oce|g" \ |
---|
63 | ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCEConfig.cmake |
---|
64 | |
---|
65 | reinplace "s|^get.*_IMPORT_PREFIX.*CMAKE.*|set(_IMPORT_PREFIX \\\"${prefix}\\\")|" \ |
---|
66 | ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCE-libraries.cmake |
---|
67 | |
---|
68 | reinplace {/^get.*_IMPORT_PREFIX.*/d} \ |
---|
69 | ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCE-libraries.cmake |
---|
70 | |
---|
71 | # installing OCE.framework in ${prefix} violates the layout of the ports-filesystems! |
---|
72 | # move it to ${prefix}/Library/Frameworks |
---|
73 | move ${destroot}${prefix}/OCE.framework \ |
---|
74 | ${destroot}${frameworks_dir}/OCE.framework |
---|
75 | } |
---|