git: 774261e4a635 - main - x11/fuzzel: unbreak zsh completion for --icon-theme

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 09 Oct 2021 11:24:02 UTC
The branch main has been updated by jbeich:

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

commit 774261e4a63517d28cc0637141033eaaaa8c71b7
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-10-09 11:16:35 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-09 11:23:49 +0000

    x11/fuzzel: unbreak zsh completion for --icon-theme
    
    _fuzzel:cd:38: no such file or directory: /usr/share/icons
---
 x11/fuzzel/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/x11/fuzzel/Makefile b/x11/fuzzel/Makefile
index 8fa51007e55c..78ba21b1a35a 100644
--- a/x11/fuzzel/Makefile
+++ b/x11/fuzzel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	fuzzel
 DISTVERSION=	1.6.3
+PORTREVISION=	1
 CATEGORIES=	x11
 MASTER_SITES=	https://codeberg.org/dnkl/${PORTNAME}/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/
 
@@ -39,7 +40,9 @@ PNG_LIB_DEPENDS=	libpng.so:graphics/png
 PNG_MESON_ENABLED=	enable-png
 
 post-patch:
-	@${REINPLACE_CMD} 's,/usr/local,${PREFIX},g' \
+# Respect PREFIX for icons
+	@${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \
+		${WRKSRC}/completions/zsh/_${PORTNAME} \
 		${WRKSRC}/xdg.c
 
 .include <bsd.port.mk>