# -*- 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 compilers 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 # getline legacysupport.newest_darwin_requires_legacy 10 github.setup libocca occa 1.6.0 v name libocca revision 1 categories devel parallel license BSD maintainers {@barracuda156 gmail.com:vital.had} openmaintainer description Portable and vendor-neutral framework for parallel programming on heterogeneous platforms long_description OCCA is an open source, portable and vendor-neutral framework for parallel programming \ on heterogeneous platforms. The OCCA API provides unified models for heterogeneous programming \ concepts — such as a device, memory or kernel — while the OCCA Kernel Language (OKL) \ enables the creation of portable device kernels using a directive-based extension to the C language. homepage htpps://libocca.org checksums rmd160 74974bd170d9cf9b9dfe178a78d168cda6451d7e \ sha256 b863a24171000097121aff5c43dadf22416c143824598a51c653689fd917794f \ size 1131891 github.tarball_from archive compiler.c_standard 2011 compiler.cxx_standard 2017 compiler.openmp_version 4.0 compilers.setup require_fortran # By default it installs into a weird location: patchfiles-append 0001-CMakeLists-fix-install-paths.patch # Drop once this is merged: https://github.com/libocca/occa/pull/739 patchfiles-append 0002-sys.cpp-add-missing-AvailabilityMacros.h.patch \ 0003-sys.cpp-use-clock_gettime-on-macOS-when-supported.patch \ 0004-sys.cpp-update-pthread_threadid-code-for-macOS.patch post-patch { reinplace "s,@DESTROOTDIR@,${destroot}${prefix}," ${worksrcpath}/CMakeLists.txt } pre-configure { # sh: /bin/ps: Operation not permitted append portsandbox_profile " (allow process-exec (literal \"/bin/ps\") (with no-profile))" configure.args-append \ -DOCCA_CC=${configure.cc} \ -DOCCA_CXX=${configure.cxx} } configure.args-append \ -DENABLE_FORTRAN=ON \ -DENABLE_OPENMP=ON \ -DENABLE_CUDA=OFF \ -DENABLE_DPCPP=OFF \ -DENABLE_EXAMPLES=OFF \ -DENABLE_HIP=OFF \ -DENABLE_METAL=OFF \ -DENABLE_TESTS=OFF if {[string match *clang* ${configure.compiler}]} { configure.ldflags-append \ -L${prefix}/lib/libomp \ -lomp } # https://github.com/libocca/occa/issues/653 if {${configure.cxx_stdlib} eq "libc++"} { configure.ldflags-append -lc++abi -lc++ } if {${os.platform} eq "darwin" && ${os.major} < 11} { configure.args-append \ -DENABLE_OPENCL=OFF } pre-destroot { xinstall -d ${destroot}${prefix}/include/occa xinstall -d ${destroot}${prefix}/share/occa/modulefiles } # Some tests fail on PPC: https://github.com/libocca/occa/issues/652 variant tests description "Build tests" { configure.pre_args-replace \ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF configure.args-replace \ -DENABLE_TESTS=OFF -DENABLE_TESTS=ON test.run yes test.cmd ctest test.env-append OCCA_CC=${configure.cc} \ OCCA_CXX=${configure.cxx} }