aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2011-02-23 23:14:35 +0800
committergarga <garga@FreeBSD.org>2011-02-23 23:14:35 +0800
commitf8d0b829e95c2d3868f53d86e7b3ecfb9fc4ccbb (patch)
tree52c393d38f7465701ba472a91065db416fd4fe24 /security
parentb87222ffd1c2d4009671be9561d338ad48c6ede1 (diff)
downloadfreebsd-ports-gnome-f8d0b829e95c2d3868f53d86e7b3ecfb9fc4ccbb.tar.gz
freebsd-ports-gnome-f8d0b829e95c2d3868f53d86e7b3ecfb9fc4ccbb.tar.zst
freebsd-ports-gnome-f8d0b829e95c2d3868f53d86e7b3ecfb9fc4ccbb.zip
Add a new option to build JIT bytecode compiler using llvm installed from ports
instead of build clamav's own llvm. The option is off by default, so, no PORTREVISION bum is required PR: ports/154900 Submitted by: Denny Lin <dennylin93@hs.ntnu.edu.tw>
Diffstat (limited to 'security')
-rw-r--r--security/clamav/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 679600536ad3..1fca015f926a 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -18,7 +18,8 @@ OPTIONS= ARC "Enable arch archives support" On \
LHA "Enable lha archives support" On \
UNZOO "Enable zoo archives support" On \
UNRAR "Enable rar archives support" On \
- LLVM "Enable JIT Bytecode compiler" On \
+ LLVM "Enable JIT Bytecode compiler (bundled LLVM)" On \
+ LLVM_PORTS "Enable JIT Bytecode compiler (from Ports)" Off \
TESTS "Run compile-time tests (req. python)" On \
MILTER "Compile the milter interface" Off \
LDAP "libmilter was built with LDAP" Off \
@@ -139,9 +140,16 @@ USE_ICONV= yes
CONFIGURE_ARGS+=--without-iconv
.endif
-.if defined(WITH_LLVM) && ( ${ARCH} == "i386" || ${ARCH} == "amd64" )
+.if (defined(WITH_LLVM) || defined(WITH_LLVM_PORTS)) && ( ${ARCH} == "i386" || ${ARCH} == "amd64" )
CONFIGURE_ARGS+=--enable-llvm
USE_GMAKE= yes
+. if defined(WITH_LLVM_PORTS)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/llvm-config:${PORTSDIR}/devel/llvm
+CONFIGURE_ARGS+=-with-system-llvm=${LOCALBASE}/bin/llvm-config
+. endif
+. if defined(WITH_LLVM) && defined(WITH_LLVM_PORTS)
+IGNORE=Select only one LLVM
+. endif
. if defined(WITH_TESTS)
USE_PYTHON_BUILD= yes
. endif
@@ -203,7 +211,7 @@ post-patch:
@${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \
${WRKSRC}/libclamunrar/unrar.c
-.if defined(WITH_LLVM) && defined(WITH_TESTS)
+.if (defined(WITH_LLVM) || defined(WITH_LLVM_PORTS)) && defined(WITH_TESTS)
pre-configure:
@if ! ${PYTHON_CMD} -c "import thread" >/dev/null 2>&1; then \
${ECHO_MSG} ""; \