freebsd-ports/security/py-angr/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

91 lines
4 KiB
Makefile

PORTNAME= angr
DISTVERSIONPREFIX= v
DISTVERSION= ${ANGR_VERSION}
PORTREVISION= 1
CATEGORIES= security devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Multi-architecture binary analysis toolkit
WWW= https://github.com/angr/angr
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyvex>=${ANGR_VERSION}:security/py-pyvex@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}unicorn>0:emulators/py-unicorn@${PY_FLAVOR}
LIB_DEPENDS= libunicorn.so:emulators/unicorn \
libz3.so:math/z3
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ailment>=${ANGR_VERSION}:security/py-ailment@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cachetools>=0:devel/py-cachetools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}capstone>=3.0.5:devel/py-capstone@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cffi>=1.14.0:devel/py-cffi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}claripy>=${ANGR_VERSION}:math/py-claripy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cle>=${ANGR_VERSION}:devel/py-cle@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cppheaderparser>=0:devel/py-cppheaderparser@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}dpkt>=0:net/py-dpkt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}gitpython>=0:devel/py-gitpython@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}itanium_demangler>=0:devel/py-itanium_demangler@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mulpyplexer>=0:devel/py-mulpyplexer@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}networkx>=2.0:math/py-networkx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}progressbar2>=0:misc/py-progressbar2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}protobuf>=3.12.0:devel/py-protobuf@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}psutil>=0:sysutils/py-psutil@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycparser>2.18:devel/py-pycparser@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyvex>=${ANGR_VERSION}:security/py-pyvex@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}rpyc>0:devel/py-RPyC@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sortedcontainers>=0:devel/py-sortedcontainers@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}unicorn>0:emulators/py-unicorn@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}keystone-engine>=0:devel/py-keystone-engine@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR}
USES= angr:binaries gmake localbase:ldflags python:3.6+
USE_GITHUB= yes
USE_PYTHON= autoplist distutils
TEST_ENV= ${MAKE_ENV} \
NOSE_EXCLUDE="${_NOSE_EXCLUDE}"
# Problem: the following tests require PySoot: https://github.com/angr/pysoot
_EXCLUDED_TESTS+= test_simple1
_EXCLUDED_TESTS+= test_simple2
_EXCLUDED_TESTS+= test_fauxware
_EXCLUDED_TESTS+= test_cmd_line_args
_EXCLUDED_TESTS+= test_jni_version_information
_EXCLUDED_TESTS+= test_jni_global_and_local_refs
_EXCLUDED_TESTS+= test_jni_object_operations
_EXCLUDED_TESTS+= test_jni_string_operations
_EXCLUDED_TESTS+= test_jni_field_access
_EXCLUDED_TESTS+= test_jni_method_calls
_EXCLUDED_TESTS+= test_jni_primitive_datatypes
_EXCLUDED_TESTS+= test_jni_object_arrays
_EXCLUDED_TESTS+= test_jni_array_operations
_EXCLUDED_TESTS+= test_method_calls
_EXCLUDED_TESTS+= test_array_operations
_EXCLUDED_TESTS+= test_multiarray_operations
_EXCLUDED_TESTS+= test_loading
_EXCLUDED_TESTS+= test_toggling_of_simstate
# Problem: "TypeError: %d format: a number is required, not NoneType"
_EXCLUDED_TESTS+= test_fastmem.*
# Problem: "angr.errors.AngrIncongruencyError: Different constraints!"
_EXCLUDED_TESTS+= test_similarity_fauxware
# Problem: "IndexError: list index out of range"
_EXCLUDED_TESTS+= test_self_modifying_code
# Problem: "Exception: Not a valid binary file: '/bin/false'"
_EXCLUDED_TESTS+= test_project
# Problem: the test is hanging
_EXCLUDED_TESTS+= test_veritesting_a
# There are far more tests which are failing at the moment...
# Create a regular expression out of the excluded tests,
# but first remove double spaces.
_NOSE_EXCLUDE= (${_EXCLUDED_TESTS:S, , ,g:S, ,|,gW})
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/lib/angr_native*.so
do-test:
@(cd ${WRKSRC}/tests && ${SETENV} ${TEST_ENV} nosetests-${PYTHON_VER} -v)
.include <bsd.port.mk>