git: 75618bfd83dd - main - x11/wl-clipboard: respect LOCALBASE for MIME types

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Wed, 12 Oct 2022 16:38:40 UTC
The branch main has been updated by jbeich:

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

commit 75618bfd83dd8ce7922ea45b46e22f352689d5db
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-10-12 16:08:24 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-10-12 16:36:24 +0000

    x11/wl-clipboard: respect LOCALBASE for MIME types
---
 x11/wl-clipboard/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/x11/wl-clipboard/Makefile b/x11/wl-clipboard/Makefile
index 3898244ec5ec..becd6cfa12aa 100644
--- a/x11/wl-clipboard/Makefile
+++ b/x11/wl-clipboard/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	wl-clipboard
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.1.0
+PORTREVISION=	1
 CATEGORIES=	x11 wayland
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -31,5 +32,11 @@ PLIST_FILES=	bin/wl-copy \
 post-patch:
 	@${REINPLACE_CMD} 's,/usr/share,${DATADIR:H},' \
 		${WRKSRC}/completions/fish/meson.build
+# Search mime-support (etc/mime.types) and shared-mime-info (share/mime/types)
+	@${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \
+		-e '/local/!s,/etc,${LOCALBASE}&,' \
+		${WRKSRC}/completions/bash/wl-copy \
+		${WRKSRC}/completions/zsh/_wl-copy \
+		${WRKSRC}/src/util/files.c
 
 .include <bsd.port.mk>