diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2022-09-28 08:11:30 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2022-09-28 08:11:30 +0000 |
commit | f00462870ffcbdaebb11be12b42a8f58bcfead95 (patch) | |
tree | 7688cd0b8817f4e5c28447f2dbae9a38737a8922 | |
parent | c080558054e014c94435ab11f399e518324abe31 (diff) | |
download | ports-f00462870ffcbdaebb11be12b42a8f58bcfead95.tar.gz ports-f00462870ffcbdaebb11be12b42a8f58bcfead95.zip |
graphics/lensfun: fix packaging of the Python bits, enable test suite
Python bits require distutils which was missing from the dependencies
but often installed on user's machine, this breaking packaging.
Drop redundant PYTHON_SUFFIX from the PLIST_SUB while here and enable
the build of ancillary program (because why not).
PR: 265753
Submitted by: Gian-Simon Purkert
-rw-r--r-- | graphics/lensfun/Makefile | 22 | ||||
-rw-r--r-- | graphics/lensfun/pkg-plist | 6 |
2 files changed, 23 insertions, 5 deletions
diff --git a/graphics/lensfun/Makefile b/graphics/lensfun/Makefile index 2d048bcc4bd6..83ead2d1c5cc 100644 --- a/graphics/lensfun/Makefile +++ b/graphics/lensfun/Makefile @@ -1,6 +1,6 @@ PORTNAME= lensfun PORTVERSION= 0.3.95 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/${PORTVERSION} @@ -22,19 +22,33 @@ SHEBANG_FILES= apps/lensfun-add-adapter apps/lensfun-convert-lcp \ apps/lensfun-update-data USE_GNOME= glib20 USE_LDCONFIG= yes -CMAKE_ARGS= -DBUILD_AUXFUN:BOOL=ON +CMAKE_ARGS= -DBUILD_AUXFUN:BOOL=ON -DBUILD_LENSTOOL:BOOL=ON \ + -DBUILD_TESTS:BOOL=ON MAKE_ENV+= PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= -PLIST_SUB+= PYTHON_SUFFIX=${PYTHON_SUFFIX} OPTIONS_DEFINE= SIMD PYHELPERS OPTIONS_DEFAULT= SIMD PYHELPERS OPTIONS_SUB= yes -PYHELPERS_DESC= Install database helper scripts (need Python 3) +PYHELPERS_DESC= Install database helper Python scripts SIMD_CMAKE_OFF= -DBUILD_FOR_SSE:BOOL=OFF -DBUILD_FOR_SSE2:BOOL=OFF +PYHELPERS_BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/setuptools/_distutils/core.py:devel/py-setuptools@${PY_FLAVOR} PYHELPERS_CMAKE_ON= -DSTAGEDIR:STRING=${STAGEDIR} -DPYTHON:STRING=${PYTHON_CMD} PYHELPERS_CMAKE_OFF= -DINSTALL_HELPER_SCRIPTS:BOOL=OFF -DPYTHON:STRING=IGNORE PYHELPERS_USES= python:3.4+ +post-patch: + @${REINPLACE_CMD} -e '/#include <cmath>/ { x; s/^/#include <clocale>/; G; }' \ + ${WRKSRC}/tests/test_modifier_coord_centering_old.cpp \ + ${WRKSRC}/tests/test_modifier_coord_perspective_correction.cpp \ + ${WRKSRC}/tests/test_modifier_coord_perspective_correction_old.cpp \ + ${WRKSRC}/tests/test_modifier_coord_tiny_image_old.cpp \ + ${WRKSRC}/tests/test_modifier_performance.cpp \ + ${WRKSRC}/tests/test_modifier_regression.cpp \ + ${WRKSRC}/tests/test_modifier_regression_old.cpp + +do-test: + @cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS} + .include <bsd.port.mk> diff --git a/graphics/lensfun/pkg-plist b/graphics/lensfun/pkg-plist index eed26801d239..e2a3a9712842 100644 --- a/graphics/lensfun/pkg-plist +++ b/graphics/lensfun/pkg-plist @@ -2,6 +2,7 @@ %%PYHELPERS%%bin/lensfun-add-adapter %%PYHELPERS%%bin/lensfun-convert-lcp %%PYHELPERS%%bin/lensfun-update-data +bin/lenstool include/lensfun/lensfun.h lib/liblensfun.so lib/liblensfun.so.2 @@ -63,6 +64,9 @@ libdata/pkgconfig/lensfun.pc %%DATADIR%%/version_2/slr-vivitar.xml %%DATADIR%%/version_2/slr-zeiss.xml %%DATADIR%%/version_2/timestamp.txt -%%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun-0.3.95-py%%PYTHON_VER%%.egg-info +%%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun-0.3.95-py%%PYTHON_VER%%.egg-info/PKG-INFO +%%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun-0.3.95-py%%PYTHON_VER%%.egg-info/SOURCES.txt +%%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun-0.3.95-py%%PYTHON_VER%%.egg-info/dependency_links.txt +%%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun-0.3.95-py%%PYTHON_VER%%.egg-info/top_level.txt %%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun/__init__.py %%PYHELPERS%%%%PYTHON_SITELIBDIR%%/lensfun/__pycache__/__init__.cpython-%%PYTHON_SUFFIX%%.pyc |