git: cf175b3c01db - main - graphics/krita: disable vc on non-x86 / non-arm64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 14:35:44 UTC
The branch main has been updated by pkubaj:

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

commit cf175b3c01db5aa05807d5e88c33ff3b5a1a28ae
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-06-17 13:44:57 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-06-17 14:35:39 +0000

    graphics/krita: disable vc on non-x86 / non-arm64
    
    In file included from /wrkdirs/usr/ports/graphics/krita/work/.build/libs/pigment/KoOptimizedCompositeOpFactoryPerArch_AVX2+FMA+BMI2.cpp:11:
    In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.0.8/libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h:11:
    In file included from /wrkdirs/usr/ports/graphics/krita/work/krita-5.0.8/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:28:
    In file included from /usr/local/include/Vc/Vc:30:
    In file included from /usr/local/include/Vc/vector.h:35:
    In file included from /usr/local/include/Vc/sse/vector.h:32:
    In file included from /usr/local/include/Vc/scalar/../common/../sse/intrinsics.h:34:
    In file included from /usr/lib/clang/13.0.0/include/x86intrin.h:13:
    /usr/lib/clang/13.0.0/include/ia32intrin.h:200:10: error: use of undeclared identifier '__builtin_ia32_readeflags_u32'
      return __builtin_ia32_readeflags_u32();
             ^
---
 graphics/krita/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/graphics/krita/Makefile b/graphics/krita/Makefile
index e89e682913f7..33465c4e2533 100644
--- a/graphics/krita/Makefile
+++ b/graphics/krita/Makefile
@@ -11,8 +11,7 @@ COMMENT=	Sketching and painting program
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BUILD_DEPENDS=	vc>=1.1.0:devel/vc \
-		libheif>=1.12.0:graphics/libheif
+BUILD_DEPENDS=	libheif>=1.12.0:graphics/libheif
 LIB_DEPENDS=	libImath.so:math/Imath \
 		libOpenColorIO.so:graphics/opencolorio \
 		libX11.so:x11/libX11 \
@@ -62,4 +61,12 @@ OPENEXR_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_OpenEXR
 PLIST_SUB=	SHLIB_VER=17.0.0 \
 		SHLIB_SHVER=17
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386
+BUILD_DEPENDS+=	vc>=1.1.0:devel/vc
+.else
+CMAKE_ARGS+=	-DCMAKE_DISABLE_FIND_PACKAGE_Vc=ON
+.endif
+
 .include <bsd.port.mk>