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

64 lines
1.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.26 2018/10/24 14:28:00 sthen Exp $
# as error: ``operation combines symbols in different segments''
# (known toolchain problem) - if fixing, re-enable in devel/cmake/Makefile
# and devel/cmake/cmake.port.mk.
NOT_FOR_ARCHS= m88k
COMMENT = small build system with a focus on speed
GH_ACCOUNT = ninja-build
GH_PROJECT = ninja
GH_TAGNAME = v1.8.2
REVISION = 0
CATEGORIES = devel
HOMEPAGE = https://ninja-build.org/
MAINTAINER = Matthew Dempsky <matthew@dempsky.org>
# Apache License v2.0
PERMIT_PACKAGE_CDROM = Yes
# c>=68.1 needed for ppoll
WANTLIB = c>=68.1 m ${COMPILER_LIBCXX}
COMPILER = base-clang ports-gcc base-gcc
MODULES = lang/python
MODPY_RUNDEP = No
MODPY_ADJ_FILES = bootstrap.py \
configure.py \
misc/ninja_syntax.py \
src/browse.py
# Not strictly required, but will be used if available. Included as a build
# dependency to ensure consistent builds.
BUILD_DEPENDS = devel/re2c
MAKE_ENV = CXX="${CXX}"
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
${MODPY_BIN} ./configure.py --bootstrap \
--verbose --with-python=${MODPY_BIN}
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/ninja ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ninja
${INSTALL_DATA} ${WRKSRC}/doc/manual.asciidoc ${PREFIX}/share/doc/ninja
${INSTALL_DATA_DIR} ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/bash-completion ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/ninja-mode.el ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/ninja.vim ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/ninja_syntax.py ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/write_fake_manifests.py ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/measure.py ${PREFIX}/share/ninja
${INSTALL_DATA} ${WRKSRC}/misc/zsh-completion ${PREFIX}/share/ninja
do-test:
@cd ${WRKSRC} && ./ninja ninja_test \
&& ./ninja_test --gtest_filter=MyTest.Name
.include <bsd.port.mk>