Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/angr.mk
Show All 19 Lines | |||||
# | # | ||||
# MAINTAINER: ports@FreeBSD.org | # MAINTAINER: ports@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_ANGR_MK) | .if !defined(_INCLUDE_USES_ANGR_MK) | ||||
_INCLUDE_USES_ANGR_MK= yes | _INCLUDE_USES_ANGR_MK= yes | ||||
# Arguments validation. | # Arguments validation. | ||||
_valid_ARGS= binaries nose | _valid_ARGS= binaries nose | ||||
.for _arg in ${angr_ARGS} | . for _arg in ${angr_ARGS} | ||||
. if !${_valid_ARGS:M${_arg}} | . if !${_valid_ARGS:M${_arg}} | ||||
IGNORE= USES=angr: invalid argument: ${_arg} | IGNORE= USES=angr: invalid argument: ${_arg} | ||||
. endif | . endif | ||||
.endfor | . endfor | ||||
# Set the default angr version for all angr-related ports. | # Set the default angr version for all angr-related ports. | ||||
ANGR_VERSION?= 9.0.5405 | ANGR_VERSION?= 9.0.5405 | ||||
ANGR_BINARIES_TAGNAME?= v${ANGR_VERSION} | ANGR_BINARIES_TAGNAME?= v${ANGR_VERSION} | ||||
.if "${angr_ARGS:Mbinaries}" != "" | . if "${angr_ARGS:Mbinaries}" != "" | ||||
USE_GITHUB?= yes | USE_GITHUB?= yes | ||||
GH_TUPLE+= angr:binaries:${ANGR_BINARIES_TAGNAME}:binaries | GH_TUPLE+= angr:binaries:${ANGR_BINARIES_TAGNAME}:binaries | ||||
# Provide the binaries directory where it is expected by the test scripts. | # Provide the binaries directory where it is expected by the test scripts. | ||||
pre-test: angr-provide-test-binaries | pre-test: angr-provide-test-binaries | ||||
angr-provide-test-binaries: | angr-provide-test-binaries: | ||||
@${LN} -Fs ${WRKSRC_binaries} ${WRKDIR}/binaries | @${LN} -Fs ${WRKSRC_binaries} ${WRKDIR}/binaries | ||||
.endif # "${angr_ARGS:Mbinaries}" != "" | . endif # "${angr_ARGS:Mbinaries}" != "" | ||||
.if "${angr_ARGS:Mnose}" != "" | . if "${angr_ARGS:Mnose}" != "" | ||||
# Ensure that python.mk variables are available. | # Ensure that python.mk variables are available. | ||||
. if !${USES:Mpython*} | . if !${USES:Mpython*} | ||||
python_ARGS= test | python_ARGS= test | ||||
_USES_POST+= python:test | _USES_POST+= python:test | ||||
.include "${USESDIR}/python.mk" | .include "${USESDIR}/python.mk" | ||||
. endif # !${USES:Mpython*} | . endif # !${USES:Mpython*} | ||||
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} | TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} | ||||
TEST_WRKSRC?= ${WRKSRC}/tests | TEST_WRKSRC?= ${WRKSRC}/tests | ||||
ANGR_NOSETESTS?= nosetests-${PYTHON_VER} | ANGR_NOSETESTS?= nosetests-${PYTHON_VER} | ||||
do-test: | do-test: | ||||
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) | @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) | ||||
.endif # "${angr_ARGS:Mnose}" != "" | . endif # "${angr_ARGS:Mnose}" != "" | ||||
.endif | .endif |