sthen 25f0e460f2 Add COMPILER lines to c++ ports which currently use the default. Adjust
some existing COMPILER lines with arch restrictions etc. In the usual
case this is now using "COMPILER = base-clang ports-gcc base-gcc" on
ports with c++ libraries in WANTLIB.

This is basically intended to be a noop on architectures using clang
as the system compiler, but help with other architectures where we
currently have many ports knocked out due to building with an unsuitable
compiler -

- some ports require c++11/newer so the GCC version in base that is used
on these archirtectures is too old.

- some ports have conflicts where an executable is built with one compiler
(e.g. gcc from base) but a library dependency is built with a different
one (e.g. gcc from ports), resulted in mixing incompatible libraries in the
same address space.

devel/gmp is intentionally skipped as it's on the path to building gcc -
the c++ library there is unused in ports (and not built by default upstream)
so intending to disable building gmpcxx in a future commit.
2018-10-24 14:27:57 +00:00

52 lines
1.1 KiB
Makefile

# $OpenBSD: Makefile,v 1.2 2018/10/24 14:28:01 sthen Exp $
ONLY_FOR_ARCHS = ${CLANG_ARCHS}
COMMENT = threading building blocks
PKGNAME = tbb-${GH_TAGNAME:S/_U/./}
REVISION = 0
GH_ACCOUNT = 01org
GH_PROJECT = tbb
GH_TAGNAME = 2018_U5
SHARED_LIBS += tbb 0.0
SHARED_LIBS += tbbmalloc 0.0
CATEGORIES = devel
HOMEPAGE = https://www.threadingbuildingblocks.org/
# Apache 2.0
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += ${COMPILER_LIBCXX} m
COMPILER = base-clang ports-gcc base-gcc
MAKE_FLAGS = CONLY="${CC}" \
CPLUS="${CXX}" \
CC="${CC}" \
CXX="${CXX}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
TBB.DLL="libtbb.so.${LIBtbb_VERSION}" \
MALLOC.DLL="libtbbmalloc.so.${LIBtbbmalloc_VERSION}"
USE_GMAKE = Yes
# Don't run time-consuming examples like fractal generators during build...
ALL_TARGET = tbb tbbmalloc tbbproxy
TEST_TARGET = test examples
post-extract:
cp ${FILESDIR}/OpenBSD*.inc ${WRKSRC}/build
do-install:
${INSTALL_DATA} ${WRKSRC}/build/OpenBSD*_release/*.so.* ${PREFIX}/lib
${INSTALL_DATA_DIR} ${PREFIX}/include/tbb
cp -R ${WRKSRC}/include/tbb/* ${PREFIX}/include/tbb
.include <bsd.port.mk>