# -*- 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: Portfile 142595 2015-11-16 16:59:43Z eborisch@macports.org $ PortSystem 1.0 PortGroup cmake 1.0 PortGroup muniversal 1.0 PortGroup compiler_blacklist_versions 1.0 name libomp version 0.0 revision 253200 maintainers eborisch openmaintainer homepage http://openmp.llvm.org description The OpenMP subproject of LLVM long_description ${description} is intended to contain all of the\ components required to build an executing OpenMP\ program that are outside the compiler itself. categories lang platforms darwin supported_archs i386 x86_64 license {MIT NCSA} fetch.type svn svn.url http://llvm.org/svn/llvm-project/openmp/trunk svn.revision ${revision} worksrcdir ${name}-${version}/runtime cmake.out_of_source yes # According to documentation builds with clang >= 3.3 compiler.whitelist clang \ macports-clang-3.3 \ macports-clang-3.4 \ macports-clang-3.5 \ macports-clang-3.6 \ macports-clang-3.7 compiler.blacklist-append {clang < 500} # Do actual install into ${prefix}/(install|lib)/libomp # A little unorthodox, but to have clang automatically find the includes and # lib, with -fopenmp, it is nice to have them their own directories. Not # exactly a config cmake supports directly; install into dummy location and # move post-install configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}/tmp configure.args-delete -DCMAKE_INSTALL_RPATH=${prefix}/lib \ -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib \ # With this, cmake sets the correct library name in the dylibs for the # final destination we move them to configure.args-append -DCMAKE_INSTALL_RPATH=${prefix}/lib/libomp \ -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/libomp \ variant top_level description \ "Install (links to) omp.h and libs into ${prefix}/(include|lib)" {} post-extract { file rename ${workpath}/trunk ${workpath}/${name}-${version} # Patch tool for build with CMAKE_INSTALL_PREFIX reinplace "/bulk.*compatibility/s/s\+/s+.*/" \ tools/check-depends.pl } post-destroot { set instdest ${destroot}${prefix} xinstall -d ${instdest}/share/doc/libomp file copy ${worksrcpath}/README.txt ${worksrcpath}/../LICENSE.txt \ ${worksrcpath}/../www ${instdest}/share/doc/libomp/ xinstall -d ${instdest}/include/libomp move ${instdest}/tmp/include/omp.h ${instdest}/include/libomp/ xinstall -d ${instdest}/lib/libomp foreach p {libiomp5.dylib libomp.dylib libgomp.dylib} { move ${instdest}/tmp/lib/${p} ${instdest}/lib/libomp/ } if [variant_isset top_level] { system -W ${instdest}/include \ "ln -s libomp/omp.h" foreach p {libiomp5.dylib libomp.dylib libgomp.dylib} { system -W ${instdest}/lib/ \ "ln -s libomp/${p}" } } } notes " Use with clang-3.\[78\] (when built with +openmp variant) by adding \"-fopenmp\" to your compile and link lines. (Or \"-I${prefix}/include/libomp -L${prefix}/lib/libomp -fopenmp\" if clang is installed without +openmp.) " test.run yes test.target libomp-micro-tests livecheck.url \ http://llvm.org/viewvc/llvm-project/openmp/trunk/?view=log livecheck.version ${revision} livecheck.regex revision=(\[0-9\]+)