git: 50b348965fca - main - graphics/lensfun: enable tests only on amd64 and i386

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 05 Oct 2022 09:53:01 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=50b348965fca84ddbd63e58abc76a6be8e5b7293

commit 50b348965fca84ddbd63e58abc76a6be8e5b7293
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-10-05 08:38:49 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-10-05 08:38:49 +0000

    graphics/lensfun: enable tests only on amd64 and i386
    
    Tests use SSE code, so they break during compilation on non-SSE architectures.
---
 graphics/lensfun/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/graphics/lensfun/Makefile b/graphics/lensfun/Makefile
index 83ead2d1c5cc..0d05c0b59266 100644
--- a/graphics/lensfun/Makefile
+++ b/graphics/lensfun/Makefile
@@ -22,8 +22,7 @@ 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 -DBUILD_LENSTOOL:BOOL=ON \
-		-DBUILD_TESTS:BOOL=ON
+CMAKE_ARGS=	-DBUILD_AUXFUN:BOOL=ON -DBUILD_LENSTOOL:BOOL=ON
 MAKE_ENV+=	PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE=
 
 OPTIONS_DEFINE=	SIMD PYHELPERS
@@ -38,6 +37,12 @@ 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+
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == amd64 || ${ARCH} == i386
+CMAKE_ARGS+=	-DBUILD_TESTS:BOOL=ON
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '/#include <cmath>/ { x; s/^/#include <clocale>/; G; }' \
 		${WRKSRC}/tests/test_modifier_coord_centering_old.cpp \