# -*- 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.2 OCE- set branch [join [lrange [split ${version} .] 0 1] .] categories graphics platforms darwin maintainers gmail.com:mark.brethen openmaintainer license LGPL-2.1 description Open CASCADE Community Edition long_description ${description} checksums rmd160 0894502fe6dec7dc6be566dddc00bc0914e0b9a9 \ sha256 e73f1cb3bfd087abb903296944ea159d51266748a6b05162d0ee927ec3bb40cf depends_lib-append port:freetype # disable redundant definitions provided by OS time.h if {16 <= ${os.major}} { patchfiles-append patch-src-OSD-OSD_Chronometer.cxx.diff } # 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/${branch}/Resources/OCEConfig.cmake reinplace "s|^get.*_IMPORT_PREFIX.*CMAKE.*|set(_IMPORT_PREFIX \\\"${prefix}\\\")|" \ ${destroot}${prefix}/OCE.framework/Versions/${branch}/Resources/OCE-libraries.cmake reinplace {/^get.*_IMPORT_PREFIX.*/d} \ ${destroot}${prefix}/OCE.framework/Versions/${branch}/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 }