summaryrefslogtreecommitdiff
path: root/graphics/gnome-icon-theme
diff options
context:
space:
mode:
authorwiz <wiz>2010-10-19 13:09:48 +0000
committerwiz <wiz>2010-10-19 13:09:48 +0000
commitbe93bd9d29044e11718bf1d697c9192775c0eec2 (patch)
treef7a3cc9ff8f55463fc17403c631fdad6b3401b55 /graphics/gnome-icon-theme
parent65a961dffbe2ea0d7d6300f0fc1718944a653291 (diff)
downloadpkgsrc-be93bd9d29044e11718bf1d697c9192775c0eec2.tar.gz
Handle gnome-icon-theme the same way as hicolor-icon-theme.
Based on patch by kre in PR 43769.
Diffstat (limited to 'graphics/gnome-icon-theme')
-rw-r--r--graphics/gnome-icon-theme/Makefile11
-rw-r--r--graphics/gnome-icon-theme/buildlink3.mk28
-rw-r--r--graphics/gnome-icon-theme/files/icon-cache.tmpl27
3 files changed, 63 insertions, 3 deletions
diff --git a/graphics/gnome-icon-theme/Makefile b/graphics/gnome-icon-theme/Makefile
index 10a3f5b42f5..dcf59b28410 100644
--- a/graphics/gnome-icon-theme/Makefile
+++ b/graphics/gnome-icon-theme/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.70 2010/09/14 11:01:59 wiz Exp $
+# $NetBSD: Makefile,v 1.71 2010/10/19 13:09:48 wiz Exp $
#
DISTNAME= gnome-icon-theme-2.30.3
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= graphics gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gnome-icon-theme/2.30/}
EXTRACT_SUFX= .tar.bz2
@@ -28,6 +28,13 @@ PKGCONFIG_OVERRIDE= gnome-icon-theme.pc.in
# the current pkgsrc version.
BUILDLINK_API_DEPENDS.icon-naming-utils+= icon-naming-utils>=0.8.90
+EVAL_PREFIX+= PREFIX.gtk2=gtk2+
+FILES_SUBST+= GTK_UPDATE_ICON_CACHE="${PREFIX.gtk2}/bin/gtk-update-icon-cache"
+FILES_SUBST+= ICON_THEME_DIR="${PREFIX}/share/icons/gnome"
+INSTALL_TEMPLATES+= ../../graphics/gnome-icon-theme/files/icon-cache.tmpl
+DEINSTALL_TEMPLATES+= ../../graphics/gnome-icon-theme/files/icon-cache.tmpl
+PRINT_PLIST_AWK+= /^share\/icons\/gnome\/icon-theme.cache$$/ { next; }
+
post-install:
${PREFIX}/bin/rsvg-convert ${FILESDIR}/distributor-logo.svg -w 16 -h 16 -o ${DESTDIR}${PREFIX}/share/icons/gnome/16x16/places/start-here.png
${PREFIX}/bin/rsvg-convert ${FILESDIR}/distributor-logo.svg -w 22 -h 22 -o ${DESTDIR}${PREFIX}/share/icons/gnome/22x22/places/start-here.png
diff --git a/graphics/gnome-icon-theme/buildlink3.mk b/graphics/gnome-icon-theme/buildlink3.mk
index 21d7bc44aba..8f02295c6a6 100644
--- a/graphics/gnome-icon-theme/buildlink3.mk
+++ b/graphics/gnome-icon-theme/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.15 2009/06/14 22:58:01 joerg Exp $
+# $NetBSD: buildlink3.mk,v 1.16 2010/10/19 13:09:48 wiz Exp $
BUILDLINK_TREE+= gnome-icon-theme
@@ -13,6 +13,32 @@ BUILDLINK_PKGSRCDIR.gnome-icon-theme?= ../../graphics/gnome-icon-theme
# of packages that use gnome-icon-theme and are executed during build.
#
USE_TOOLS+= perl
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if !defined(GNOME_ICON_THEME_DEPEND_ONLY)
+EVAL_PREFIX+= PREFIX.gtk2=gtk2+
+FILES_SUBST+= GTK_UPDATE_ICON_CACHE="${PREFIX.gtk2}/bin/gtk-update-icon-cache"
+FILES_SUBST+= ICON_THEME_DIR="${BUILDLINK_PREFIX.gnome-icon-theme}/share/icons/gnome"
+INSTALL_TEMPLATES+= ../../graphics/gnome-icon-theme/files/icon-cache.tmpl
+DEINSTALL_TEMPLATES+= ../../graphics/gnome-icon-theme/files/icon-cache.tmpl
+
+PRINT_PLIST_AWK+= /^share\/icons\/gnome\/icon-theme.cache$$/ { next; }
+CHECK_FILES_SKIP+= ${PREFIX}/share/icons/gnome/icon-theme.cache
+
+BUILDLINK_TARGETS+= guic-buildlink-fake
+_GUIC_FAKE= ${BUILDLINK_DIR}/bin/gtk-update-icon-cache
+
+.PHONY: guic-buildlink-fake
+guic-buildlink-fake:
+ ${RUN} \
+ if [ ! -f ${_GUIC_FAKE} ]; then \
+ ${ECHO_BUILDLINK_MSG} "Creating ${_GUIC_FAKE}"; \
+ ${MKDIR} ${_GUIC_FAKE:H}; \
+ ${ECHO} "#!${SH}" > ${_GUIC_FAKE}; \
+ ${CHMOD} +x ${_GUIC_FAKE}; \
+ fi
+.endif # GNOME_ICON_THEME_DEPEND_ONLY
.endif # GNOME_ICON_THEME_BUILDLINK3_MK
BUILDLINK_TREE+= -gnome-icon-theme
diff --git a/graphics/gnome-icon-theme/files/icon-cache.tmpl b/graphics/gnome-icon-theme/files/icon-cache.tmpl
new file mode 100644
index 00000000000..07fbe205997
--- /dev/null
+++ b/graphics/gnome-icon-theme/files/icon-cache.tmpl
@@ -0,0 +1,27 @@
+# $NetBSD: icon-cache.tmpl,v 1.1 2010/10/19 13:09:48 wiz Exp $
+#
+# Rebuild the icon cache.
+#
+
+GTK_UPDATE_ICON_CACHE="@GTK_UPDATE_ICON_CACHE@"
+ICON_THEME_DIR="@ICON_THEME_DIR@"
+
+case ${STAGE} in
+POST-INSTALL)
+ ${TEST} -x ${GTK_UPDATE_ICON_CACHE} && \
+ ${GTK_UPDATE_ICON_CACHE} -f -t ${ICON_THEME_DIR} >/dev/null 2>&1 || \
+ ${TRUE}
+ ;;
+DEINSTALL)
+ ${TEST} "${PKGBASE}" = "gnome-icon-theme" && \
+ ${RM} -f ${ICON_THEME_DIR}/icon-theme.cache
+ ;;
+POST-DEINSTALL)
+ ${TEST} "${PKGBASE}" != "gnome-icon-theme" && \
+ ${TEST} -x ${GTK_UPDATE_ICON_CACHE} && \
+ ${GTK_UPDATE_ICON_CACHE} -f -t ${ICON_THEME_DIR} >/dev/null \
+ 2>&1 || ${TRUE}
+ ;;
+*)
+ ;;
+esac