diff options
author | garga <garga@FreeBSD.org> | 2010-04-12 20:56:56 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2010-04-12 20:56:56 +0800 |
commit | 95a0e486673554b13d259b5686794de094ecdef8 (patch) | |
tree | 487055120a2ca64ac009fc9e99aa163f4192d7c0 | |
parent | aa4a70d5b5c548ac50492f70b7b211fffd2f019d (diff) | |
download | freebsd-ports-gnome-95a0e486673554b13d259b5686794de094ecdef8.tar.gz freebsd-ports-gnome-95a0e486673554b13d259b5686794de094ecdef8.tar.zst freebsd-ports-gnome-95a0e486673554b13d259b5686794de094ecdef8.zip |
Unit tests require python built with thread support, disable make check when
local python doesn't have this
PR: ports/145520
Submitted by: Michael Scheidell <scheidell at secnap.net>
-rw-r--r-- | security/clamav-devel/Makefile | 18 | ||||
-rw-r--r-- | security/clamav/Makefile | 18 |
2 files changed, 34 insertions, 2 deletions
diff --git a/security/clamav-devel/Makefile b/security/clamav-devel/Makefile index ff6fb6c606ef..50afece9ff05 100644 --- a/security/clamav-devel/Makefile +++ b/security/clamav-devel/Makefile @@ -40,6 +40,7 @@ DBDIR= /var/db/clamav LOGDIR= /var/log/clamav RUNDIR= /var/run/clamav PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} +PY_NO_THREAD= ${WRKDIR}/.python-has-no-threads CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" @@ -197,9 +198,24 @@ post-patch: @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \ ${WRKSRC}/libclamunrar/unrar.c +.if defined(WITH_LLVM) +pre-configure: + @if ! ${PYTHON_CMD} -c "import thread" >/dev/null 2>&1; then \ + ${ECHO_MSG} ""; \ + ${ECHO_MSG} "==========================================================================="; \ + ${ECHO_MSG} "= Unit tests REQUIRES python built with thread support, and yours is not. ="; \ + ${ECHO_MSG} "= It will not be called during this build ="; \ + ${ECHO_MSG} "==========================================================================="; \ + ${ECHO_MSG} ""; \ + touch ${PY_NO_THREAD}; \ + fi +.endif + .if ${OSVERSION} >= 700000 post-build: - @${MAKE} -C ${WRKSRC} check + @if [ -f "${PY_NO_THREAD}" ]; then \ + ${MAKE} -C ${WRKSRC} check; \ + fi .endif pre-su-install: diff --git a/security/clamav/Makefile b/security/clamav/Makefile index c850c2e42b29..0b51da968932 100644 --- a/security/clamav/Makefile +++ b/security/clamav/Makefile @@ -38,6 +38,7 @@ DBDIR= /var/db/clamav LOGDIR= /var/log/clamav RUNDIR= /var/run/clamav PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} +PY_NO_THREAD= ${WRKDIR}/.python-has-no-threads CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" @@ -196,9 +197,24 @@ post-patch: @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \ ${WRKSRC}/libclamunrar/unrar.c +.if defined(WITH_LLVM) +pre-configure: + @if ! ${PYTHON_CMD} -c "import thread" >/dev/null 2>&1; then \ + ${ECHO_MSG} ""; \ + ${ECHO_MSG} "==========================================================================="; \ + ${ECHO_MSG} "= Unit tests REQUIRES python built with thread support, and yours is not. ="; \ + ${ECHO_MSG} "= It will not be called during this build ="; \ + ${ECHO_MSG} "==========================================================================="; \ + ${ECHO_MSG} ""; \ + touch ${PY_NO_THREAD}; \ + fi +.endif + .if ${OSVERSION} >= 700000 post-build: - @${MAKE} -C ${WRKSRC} check + @if [ -f "${PY_NO_THREAD}" ]; then \ + ${MAKE} -C ${WRKSRC} check; \ + fi .endif pre-su-install: |