# -*- 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 PortSystem 1.0 PortGroup cmake 1.1 PortGroup muniversal 1.0 name opencascade version 7.8.0 revision 0 categories science license LGPL-2 maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer description Development platform for CAD/CAE, 3D surface/solid modeling and data exchange long_description ${description} homepage https://www.opencascade.com/content/open-source-core-technology set git_version [join [split ${version} .] _] master_sites "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V${git_version};sf=tgz;dummy=" extract.suffix .tgz worksrcdir occt-V${git_version} checksums rmd160 88033cfe653f3d18feb41c7e0225ec31fd613104 \ sha256 b9c8f0a9d523ac1a606697f95fc39d8acf1140d3728561b8010a604431b4e9cf \ size 48431454 patchfiles-append patch-CMakeLists.txt.diff \ patch-env.sh.in.diff compiler.cxx_standard 2011 configure.args-append -DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD_REQUIRED=ON depends_build-append path:lib/pkgconfig/RapidJSON.pc:rapidjson depends_lib-append port:freeimage \ port:freetype \ port:onetbb \ port:tcl \ port:tk # install it into libexec to avoid conflict with oce port cmake.install_prefix ${prefix}/libexec/${name} configure.args-append -DUSE_FREEIMAGE=ON \ -DUSE_RAPIDJSON=ON \ -DUSE_TBB=ON \ -DBUILD_DOC_Overview=OFF \ -D3RDPARTY_DIR=${prefix} # see https://trac.macports.org/ticket/59917 if {${os.major} < 12} { configure.cxxflags-append \ -F/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks } if {[string match *gcc* ${configure.compiler}]} { # OpenGl_GlFunctions.cxx: error: invalid conversion from 'void (*)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)' # {aka 'void (*)(unsigned int, int, unsigned int, int, int, int, unsigned int, unsigned int, const void*)'} to 'OpenGl_GlFunctions::glTexImage2D_t' # {aka 'void (*)(unsigned int, int, int, int, int, int, unsigned int, unsigned int, const void*)'} [-fpermissive] configure.cxxflags-append \ -fpermissive if {${configure.build_arch} in [list arm i386 ppc]} { # Undefined symbols: "___atomic_fetch_add_8" configure.ldflags-append \ -latomic } } variant docs description {Build and install documentation} { depends_build-append path:bin/doxygen:doxygen configure.args-delete -DBUILD_DOC_Overview=OFF } if {${universal_possible} && [variant_isset universal]} { set merger_dont_diff ${prefix}/bin/custom.sh post-destroot { file delete ${destroot}${prefix}/bin/custom.sh system -W ${destroot}${prefix}/bin/ "echo \"#!/bin/bash\" > custom.sh" foreach arch ${configure.universal_archs} { reinplace "s|^#!/bin/bash||" ${destroot}${prefix}/bin/${arch}-custom.sh system -W ${destroot}${prefix}/bin/ "cat ${arch}-custom.sh >> custom.sh" file delete ${destroot}${prefix}/bin/${arch}-custom.sh } } } # keep this port at perfix's cmake's lib post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${cmake.install_prefix}/lib/cmake *] { xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake/${cmakedir} foreach cmakefile [glob -tails -directory ${destroot}${cmake.install_prefix}/lib/cmake/${cmakedir} *.cmake] { ln -s ${cmake.install_prefix}/lib/cmake/${cmakedir}/${cmakefile} \ ${destroot}${prefix}/lib/cmake/${cmakedir}/ reinplace -q "s|\\\${CMAKE_CURRENT_LIST_DIR}|${cmake.install_prefix}/lib/cmake/${cmakedir}|g" \ ${destroot}${cmake.install_prefix}/lib/cmake/${cmakedir}/${cmakefile} reinplace -q "s|\\\${CMAKE_CURRENT_LIST_FILE}|${cmake.install_prefix}/lib/cmake/${cmakedir}/${cmakefile}|g" \ ${destroot}${cmake.install_prefix}/lib/cmake/${cmakedir}/${cmakefile} } } } livecheck.url https://www.opencascade.com/content/latest-release