svn commit: r534329 - head/x11-themes/papirus-icon-theme

Hiroki Tagato tagattie at FreeBSD.org
Fri May 8 07:14:20 UTC 2020


Author: tagattie
Date: Fri May  8 07:14:19 2020
New Revision: 534329
URL: https://svnweb.freebsd.org/changeset/ports/534329

Log:
  Fix plist to generate icon cache
  
  Approved by:	ehaupt (mentor)

Modified:
  head/x11-themes/papirus-icon-theme/Makefile

Modified: head/x11-themes/papirus-icon-theme/Makefile
==============================================================================
--- head/x11-themes/papirus-icon-theme/Makefile	Fri May  8 07:06:24 2020	(r534328)
+++ head/x11-themes/papirus-icon-theme/Makefile	Fri May  8 07:14:19 2020	(r534329)
@@ -2,6 +2,7 @@
 
 PORTNAME=	papirus-icon-theme
 PORTVERSION=	20200430
+PORTREVISION=	1
 CATEGORIES=	x11-themes
 
 MAINTAINER=	tagattie at FreeBSD.org
@@ -11,7 +12,7 @@ LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 USES=		gmake gnome
-INSTALLS_ICONS=	yes
+USE_GNOME=	gtk-update-icon-cache
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	PapirusDevelopmentTeam
@@ -19,6 +20,7 @@ GH_ACCOUNT=	PapirusDevelopmentTeam
 NO_ARCH=	yes
 NO_BUILD=	yes
 
+POST_PLIST=	add-plist-icon-cache
 PORTDOCS=	AUTHORS README.md
 
 OPTIONS_DEFINE=	DOCS
@@ -30,5 +32,16 @@ post-install:
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+add-plist-icon-cache:
+# taken from Mk/Uses/gnome.mk gnome-post-icons
+	for dir in `${GREP} "^share/icons/.*/" ${TMPPLIST} | \
+			${CUT} -d / -f 1-3 | ${SORT} -u`; do \
+		${ECHO_CMD} "@rmtry $${dir}/icon-theme.cache" >> ${TMPPLIST}; \
+		${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache \
+			-q -f %D/$${dir} 2>/dev/null || /usr/bin/true" >> ${TMPPLIST}; \
+		${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache \
+			-q -f %D/$${dir} 2>/dev/null || /usr/bin/true" >> ${TMPPLIST}; \
+	done
 
 .include <bsd.port.mk>


More information about the svn-ports-head mailing list