openbsd-ports/devel/llvm/Makefile
2013-05-02 15:41:57 +00:00

83 lines
2.2 KiB
Makefile

# $OpenBSD: Makefile,v 1.62 2013/05/02 15:41:57 sebastia Exp $
# XXX: Remember to bump MODCLANG_VERSION in lang/clang/clang.port.mk when
# updating this port.
ONLY_FOR_ARCHS = ${LLVM_ARCHS}
COMMENT = modular, fast C/C++/ObjC compiler, static analyzer and tools
LLVM_V = 3.2
DISTNAME = llvm-${LLVM_V}.src
PKGNAME = llvm-${LLVM_V}
REVISION = 3
CATEGORIES = devel
MASTER_SITES = http://llvm.org/releases/${LLVM_V}/
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} clang-${LLVM_V}.src${EXTRACT_SUFX}
SHARED_LIBS = clang 0.0 # 3.2
# packager notes in http://llvm.org/docs/Packaging.html
HOMEPAGE = http://www.llvm.org/
# BSD
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c m pthread stdc++
WRKDIST = ${WRKDIR}/llvm-${LLVM_V}.src
MODULES = devel/cmake \
lang/python
TEST_DEPENDS = devel/dejagnu
BUILD_DEPENDS += textproc/py-sphinx
VMEM_WARNING = Yes
MAKE_FLAGS = OPTIMIZE_OPTION="${CFLAGS}" \
VERBOSE=Yes \
INSTALL="install -c"
TEST_FLAGS = RUNTESTFLAGS=
SEPARATE_BUILD = Yes
CONFIGURE_ARGS = -DLLVM_ENABLE_FFI:Bool=False \
-DLLVM_REQUIRES_RTTI:Bool=True \
-DCMAKE_BUILD_TYPE:String=Release \
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2:Bool=True
# Workaround relocation overflow
.if ${MACHINE_ARCH} == "powerpc"
CONFIGURE_ARGS += -DCMAKE_EXE_LINKER_FLAGS=-Wl,--relax
.endif
CLANG_INCLUDE_PATH = lib/clang/${LLVM_V}/include
SUBST_VARS += CLANG_INCLUDE_PATH
post-extract:
@mv ${WRKDIR}/clang-${LLVM_V}.src ${WRKDIST}/tools/clang
pre-configure:
@${SUBST_CMD} ${WRKSRC}/tools/clang/tools/scan-build/scan-build
-@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
post-build:
cd ${WRKSRC}/docs && make -f Makefile.sphinx man
pod2man --release=CVS --center="LLVM" \
${WRKSRC}/tools/clang/docs/tools/clang.pod \
${WRKSRC}/docs/_build/man/clang.1
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/tools/scan-build/ccc-analyzer \
${WRKSRC}/tools/clang/tools/scan-build/c++-analyzer \
${WRKSRC}/tools/clang/tools/scan-build/scan-build ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/tools/clang/tools/scan-build/sorttable.js \
${WRKSRC}/tools/clang/tools/scan-build/scanview.css \
${PREFIX}/share/llvm
${INSTALL_DATA} ${WRKSRC}/docs/_build/man/* \
${PREFIX}/man/man1
.include <bsd.port.mk>