You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
84 lines
3.4 KiB
Tcl
84 lines
3.4 KiB
Tcl
# -*- 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.7
|
||
revision 3
|
||
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 988c8b20fc31ac86c1d16ec54973b2c1c3f9b207 \
|
||
sha256 f9c30eb9ce1abffc590825d513d6d28dcbe970e36032dd7521febf04e905b29c \
|
||
size 1629119
|
||
|
||
patch.pre_args-replace -p0 -p1
|
||
patchfiles 0001-Fix-macos.inc.patch \
|
||
0002-proxy_overload-for-10.7.patch \
|
||
0003-patch-tbb-arch.diff
|
||
|
||
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
|
||
}
|
||
# Propagating arch via env does not work for tests. Notice, the following
|
||
# implies monoarch build. If R goes universal, alternative solution will be needed.
|
||
if {${build_arch} eq "arm64"} {
|
||
reinplace "s|@TBB_ARCH@|arm64|" ${worksrcpath}/src/Makevars.in
|
||
} elseif {${build_arch} eq "i386"} {
|
||
reinplace "s|@TBB_ARCH@|ia32|" ${worksrcpath}/src/Makevars.in
|
||
} elseif {${build_arch} eq "ppc"} {
|
||
reinplace "s|@TBB_ARCH@|ppc32|" ${worksrcpath}/src/Makevars.in
|
||
} elseif {${build_arch} eq "ppc64"} {
|
||
reinplace "s|@TBB_ARCH@|ppc64|" ${worksrcpath}/src/Makevars.in
|
||
} elseif {${build_arch} eq "x86_64"} {
|
||
reinplace "s|@TBB_ARCH@|intel64|" ${worksrcpath}/src/Makevars.in
|
||
}
|
||
}
|
||
|
||
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
|
||
build.env-append \
|
||
arch=ppc64
|
||
test.env-append \
|
||
arch=ppc64
|
||
} else {
|
||
configure.env-append \
|
||
arch=ppc32
|
||
build.env-append \
|
||
arch=ppc32
|
||
test.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
|
||
|
||
depends_test-append port:R-knitr \
|
||
port:R-Rcpp \
|
||
port:R-rmarkdown \
|
||
port:R-RUnit
|
||
|
||
test.run yes
|