Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149478244
D31960.1790233387.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D31960.1790233387.diff
View Options
Index: Mk/Uses/gnome.mk
===================================================================
--- Mk/Uses/gnome.mk
+++ Mk/Uses/gnome.mk
@@ -46,12 +46,6 @@
# file and add apropriate @postexec/@postunexec directives for
# each .omf file found to track OMF registration database.
#
-# INSTALLS_ICONS - If a GTK+ port installs Freedesktop-style icons to
-# ${LOCALBASE}/share/icons, then you should use this
-# macro. Using this macro ensures that icons are cached
-# and will display correctly. This macro isn't needed
-# for QT based applications, which use a different method.
-#
# MAINTAINER: gnome@FreeBSD.org
.if !defined(_INCLUDE_USES_GNOME_MK)
@@ -458,24 +452,5 @@
done
.endif
-.if defined(INSTALLS_ICONS)
-_USES_install+= 690:gnome-post-icons
-gnome-post-icons:
- @${RM} ${TMPPLIST}.icons1
- @for i in `${GREP} "^share/icons/.*/" ${TMPPLIST} | ${CUT} -d / -f 1-3 | ${SORT} -u`; do \
- ${ECHO_CMD} "@rmtry $${i}/icon-theme.cache" \
- >> ${TMPPLIST}.icons1; \
- ${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/$${i} 2>/dev/null || /usr/bin/true" \
- >> ${TMPPLIST}; \
- ${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/$${i} 2>/dev/null || /usr/bin/true" \
- >> ${TMPPLIST}; \
- done
- @if test -f ${TMPPLIST}.icons1; then \
- ${CAT} ${TMPPLIST}.icons1 ${TMPPLIST} > ${TMPPLIST}.icons2; \
- ${RM} ${TMPPLIST}.icons1; \
- ${MV} -f ${TMPPLIST}.icons2 ${TMPPLIST}; \
- fi
-.endif
-
.endif
# End of use part.
Index: graphics/gtk-update-icon-cache/Makefile
===================================================================
--- graphics/gtk-update-icon-cache/Makefile
+++ graphics/gtk-update-icon-cache/Makefile
@@ -2,6 +2,7 @@
PORTNAME= gtk-update-icon-cache
PORTVERSION= 3.24.26
+PORTREVISION= 1
CATEGORIES= graphics
DIST_SUBDIR= gnome
@@ -14,6 +15,7 @@
USES= gettext gnome meson pkgconfig
USE_GNOME= gdkpixbuf2
USE_GITLAB= yes
+SUB_FILES= gtk-update-icon-cache.ucl
GL_SITE= https://gitlab.gnome.org
GL_ACCOUNT= Community/gentoo
GL_COMMIT= 5d5d06c43e088b527a283d8eae37e9ef3ea0d7ea
@@ -26,4 +28,9 @@
xsltproc:textproc/libxslt
MANPAGES_MESON_TRUE= man-pages
+post-install:
+ ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/pkg/triggers
+ ${INSTALL_DATA} ${WRKDIR}/gtk-update-icon-cache.ucl \
+ ${STAGEDIR}${LOCALBASE}/share/pkg/triggers
+
.include <bsd.port.mk>
Index: graphics/gtk-update-icon-cache/files/gtk-update-icon-cache.ucl.in
===================================================================
--- /dev/null
+++ graphics/gtk-update-icon-cache/files/gtk-update-icon-cache.ucl.in
@@ -0,0 +1,18 @@
+path_glob: "*/share/icons/*"
+trigger: {
+ type: lua
+ sandbox: false
+ script: <<EOS
+-- make sure we only get the path one level after share/icons
+-- Ensure each path is uniq
+local hash = {}
+for _,path in ipairs(arg) do
+ path = string.match(path, ".*share/icons/[^/]*")
+ if (not hash[path]) and pkg.stat(path) then
+ print("Generating GTK icon cache for " .. path)
+ pkg.exec({"%%PREFIX%%/bin/gtk-update-icon-cache", "-q", "-t", "-f", path})
+ hash[path] = true
+ end
+end
+EOS
+}
Index: graphics/gtk-update-icon-cache/pkg-plist
===================================================================
--- graphics/gtk-update-icon-cache/pkg-plist
+++ graphics/gtk-update-icon-cache/pkg-plist
@@ -116,3 +116,4 @@
share/locale/zh_CN/LC_MESSAGES/gtk-update-icon-cache.mo
share/locale/zh_HK/LC_MESSAGES/gtk-update-icon-cache.mo
share/locale/zh_TW/LC_MESSAGES/gtk-update-icon-cache.mo
+share/pkg/triggers/gtk-update-icon-cache.ucl
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 24, 7:03 AM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29894243
Default Alt Text
D31960.1790233387.diff (3 KB)
Attached To
Mode
D31960: graphics/gtk-update-icon-cache: use triggers
Attached
Detach File
Event Timeline
Log In to Comment