Files
macports-ports/R/R-RcppParallel/Portfile
T
2023-01-26 17:14:35 -05:00

59 lines
2.4 KiB
Tcl
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- 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 R 1.0
R.setup cran RcppCore RcppParallel 5.1.6
revision 0
categories-append devel
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
license GPL-3
description High level functions for parallel programming with Rcpp
long_description {*}${description}
homepage https://rcppcore.github.io/RcppParallel
checksums rmd160 5286a2505f4dc7c4c4760e02be117cd15e71f939 \
sha256 ac560d868e9757a93ddbf176dfd851fc753f67919476f88e248fe94cba4f0f15 \
size 1968228
patch.pre_args -p1
patchfiles 0001-Fix-macos.inc.patch \
0002-proxy_overload-for-10.7.patch
post-patch {
reinplace "s|@MACOS_V@|${macosx_deployment_target}|" ${worksrcpath}/src/tbb/build/macos.inc
# https://github.com/RcppCore/RcppParallel/issues/176
if {[string match *gcc* ${configure.compiler}]} {
# "gcc-mp-12" is not supported on macos. Add build/macos.gcc-mp-12.inc file with compiler-specific settings.
reinplace "s|@CC@|gcc|g" ${worksrcpath}/src/tbb/build/macos.inc
# Don't use libcxx with gcc.
reinplace "s|@STDLIB@|libstdc++|" ${worksrcpath}/src/tbb/build/macos.inc
} else {
# This just reverts the patch to Clang hardcoding:
reinplace "s|@CC@|clang|g" ${worksrcpath}/src/tbb/build/macos.inc
reinplace "s|@STDLIB@|libc++|" ${worksrcpath}/src/tbb/build/macos.inc
}
}
platform powerpc {
# Otherwise configure script does nonsense, setting arch to ppc64 on G5 regardless of Macports settings and OS support of ppc64.
if {${build_arch} eq "ppc64"} {
configure.env-append \
arch=ppc64
destroot.env-append \
arch=ppc64
} else {
configure.env-append \
arch=ppc32
destroot.env-append \
arch=ppc32
}
}
# It is also possible to configure RcppParallel to use external TBB:
# https://github.com/RcppCore/RcppParallel
# This has not been tested though.
# depends_lib-append path:lib/libtbb.dylib:onetbb
# configure.args-append TBB=${prefix} \
# TBB_INC=${prefix}include/tbb \
# TBB_LIB=${prefix}/lib