# -*- 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 # $Id$ PortSystem 1.0 PortGroup cmake 1.0 PortGroup github 1.0 github.setup tpaviot oce 0.17 OCE- categories graphics platforms darwin maintainers gmail.com:mark.brethen openmaintainer license LGPL-2.1 description Open CASCADE Community Edition long_description ${description} checksums rmd160 6f9b957423bd7de7f16e2fa19fce2934be829289 \ sha256 0bcc76d067cd5cbbdfe4ad477093fbdf9d08a01cfe5b4afe0e296632afaeffde depends_lib-append port:freetype # tell CMake to build in a build directory configure.dir ${workpath}/build build.dir ${configure.dir} post-extract { file mkdir ${configure.dir} } configure.post_args ${worksrcpath} configure.args-append -DOCE_INSTALL_PREFIX:PATH=${prefix} variant test description {Build and run unit testing framework} { configure.args-append -DOCE_TESTING:BOOL=ON test.run yes } variant draw description {Build DRAW test harness} { depends_lib-append port:tcl port:tk configure.args-append -DTCL_INCLUDE_PATH=${prefix}/include configure.args-append -DOCE_DRAW:BOOL=ON configure.args-append -DOCE_INSTALL_PACKAGE_LIB_DIR=lib } variant tbb description {Use TBB for memory allocation} { depends_lib-append port:tbb configure.args-append -DOCE_MULTITHREAD_LIBRARY:STRING=TBB } variant freeimage description {Build with FreeImage support} { depends_lib-append port:freeimage configure.args-append -DOCE_WITH_FREEIMAGE:BOOL=ON } variant gl2ps description {Build with gl2ps support} { depends_lib-append port:gl2ps configure.args-append -DOCE_WITH_GL2PS:BOOL=ON } post-destroot { # modify installation paths relative to ${prefix}/Library/Frameworks reinplace "s|\\\${SELF_DIR}/../../../../include/oce|${prefix}/include/oce|g" \ ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCEConfig.cmake reinplace "s|^get.*_IMPORT_PREFIX.*CMAKE.*|set(_IMPORT_PREFIX \\\"${prefix}\\\")|" \ ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCE-libraries.cmake reinplace {/^get.*_IMPORT_PREFIX.*/d} \ ${destroot}${prefix}/OCE.framework/Versions/${version}/Resources/OCE-libraries.cmake # installing OCE.framework in ${prefix} violates the layout of the ports-filesystems! # move it to ${prefix}/Library/Frameworks move ${destroot}${prefix}/OCE.framework \ ${destroot}${frameworks_dir}/OCE.framework }