Index: Makefile =================================================================== --- Makefile (revision 462654) +++ Makefile (working copy) @@ -26,7 +26,9 @@ PORTDATA= * PORTDOCS= CREDITS NEWS README -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= CACHE_ICONS DOCS +CACHE_ICONS_DESC= Update icon cache after installation (GTK+) +CACHE_ICONS_RUN_DEPENDS= gtk-update-icon-cache:graphics/gtk-update-icon-cache post-patch: @${REINPLACE_CMD} -e '/INSTALLS/s/man //' \ @@ -36,6 +38,13 @@ ${INSTALL_MAN} ${WRKSRC}/resources/unix/focuswriter.1 \ ${STAGEDIR}${MANPREFIX}/man/man1 +post-install-CACHE_ICONS-on: +.for d in share/icons/hicolor + @${ECHO_CMD} "@rmtry ${d}/icon-theme.cache" >> ${TMPPLIST} + @${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/${d} 2>/dev/null || /usr/bin/true" >> ${TMPPLIST} + @${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/${d} 2>/dev/null || /usr/bin/true" >> ${TMPPLIST} +.endfor + post-install-DOCS-on: cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}