git: 3f85c64afc47 - main - net-im/signal-desktop: Fix build on aarch64

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 10 Oct 2023 12:24:06 UTC
The branch main has been updated by mikael:

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

commit 3f85c64afc478f6352b311dcb10b1453f8039fed
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2023-10-10 12:22:48 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-10-10 12:23:47 +0000

    net-im/signal-desktop: Fix build on aarch64
    
    libvk_swiftshader is x86 only
    
    Reported by:    jhibbits
---
 net-im/signal-desktop/Makefile  | 10 +++++++++-
 net-im/signal-desktop/pkg-plist |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile
index 1080025b1e84..6c4dc5af9a03 100644
--- a/net-im/signal-desktop/Makefile
+++ b/net-im/signal-desktop/Makefile
@@ -104,6 +104,14 @@ PLIST_SUB=	NODE_ARCH=${NODE_ARCH} \
 
 YARN_TIMESTAMP=	1661146515
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == aarch64
+PLIST_SUB+=	NOT_AARCH64="@comment "
+.elif ${ARCH} == amd64
+PLIST_SUB+=	NOT_AARCH64=""
+.endif
+
 fetch-yarn:
 	if [ ! -f ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz ]; then \
 		${MKDIR} /tmp/signal-desktop; \
@@ -230,4 +238,4 @@ create-caches-tarball:
 	cd ${WRKDIR} && \
 		${TAR} czf signal-desktop-${DISTVERSION}-npm-cache.tar.gz .npm
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/net-im/signal-desktop/pkg-plist b/net-im/signal-desktop/pkg-plist
index c50aff9eebad..3b6939e8b8f3 100644
--- a/net-im/signal-desktop/pkg-plist
+++ b/net-im/signal-desktop/pkg-plist
@@ -8,7 +8,7 @@ share/pixmaps/signal-desktop.png
 %%DATADIR%%/libEGL.so
 %%DATADIR%%/libGLESv2.so
 %%DATADIR%%/libffmpeg.so
-%%DATADIR%%/libvk_swiftshader.so
+%%NOT_AARCH64%%%%DATADIR%%/libvk_swiftshader.so
 %%DATADIR%%/libvulkan.so
 %%DATADIR%%/locales/af-ZA.pak
 %%DATADIR%%/locales/af.pak