pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43769: graphics/gnome-icon-theme update to *nb2 (patch included)



>Number:         43769
>Category:       pkg
>Synopsis:       graphics/gnome-icon-theme update to *nb2 (patch included)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 16 06:25:00 +0000 2010
>Originator:     Robert Elz
>Release:        NetBSD 5.1_RC3 (irrelevant)   pkgsrc current 2010-08-15
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 5.1_RC3 NetBSD 5.1_RC3 (JADE-1.12-20100614) 
#2: Mon Jun 14 08:35:26 ICT 2010 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/5.1/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        See PR pkg/43588 for the motivation for this change request.
        The idea is to give gnome-icon-theme the same magic PLIST
        processing as is gone for hicolor-icon-theme

>How-To-Repeat:
        Attempt to build any package that uses gnome-icon-theme and note
        the problem indicated in PR pkg/43588 (which applies to
        devel/libgweather)

>Fix:
        Apply the following patch, or something similar.   The similarity
        between this and what is in graphics/hicolor-icon-theme is no
        accident, and all credit goes to the people who wrote that code
        originally (all I have done is copied it and changed a few names).

        This does appear to fix the problem in 43588 (for me anyway), so when
        this PR is handled, that one can close.

        It would be good if someone who really inderstands the
        hicolor-icon-theme magic could look at this, and undo anything
        that isn't needed for gnome-icon-theme but I included just because
        I wanted to change as little as possible (and it worked like this...)

Index: Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/graphics/gnome-icon-theme/Makefile,v
retrieving revision 1.69
diff -u -r1.69 Makefile
--- Makefile    17 Jul 2010 12:22:32 -0000      1.69
+++ Makefile    16 Aug 2010 05:49:37 -0000
@@ -2,7 +2,7 @@
 #
 
 DISTNAME=              gnome-icon-theme-2.30.3
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            graphics gnome
 MASTER_SITES=          ${MASTER_SITE_GNOME:=sources/gnome-icon-theme/2.30/}
 EXTRACT_SUFX=          .tar.bz2
@@ -28,6 +28,13 @@
 # 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
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/graphics/gnome-icon-theme/buildlink3.mk,v
retrieving revision 1.15
diff -u -r1.15 buildlink3.mk
--- buildlink3.mk       14 Jun 2009 22:58:01 -0000      1.15
+++ buildlink3.mk       16 Aug 2010 05:40:48 -0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.15 2009/06/14 22:58:01 joerg Exp $
+# $NetBSD$
 
 BUILDLINK_TREE+=       gnome-icon-theme
 
@@ -13,6 +13,32 @@
 # 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/hicolor"
+INSTALL_TEMPLATES+=    ../../graphics/hicolor-icon-theme/files/icon-cache.tmpl
+DEINSTALL_TEMPLATES+=  ../../graphics/hicolor-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
Index: files/icon-cache.tmpl
===================================================================
RCS file: files/icon-cache.tmpl
diff -N files/icon-cache.tmpl
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ files/icon-cache.tmpl       16 Aug 2010 06:13:05 -0000
@@ -0,0 +1,27 @@
+# $NetBSD$
+#
+# 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



Home | Main Index | Thread Index | Old Index