[gnome-icon-theme] Patch by Luca Ferreti to enable legacy icon mapping during installation. bug #609458



commit 2d5418f1ffc1c489e609d24c8fe724fdace159df
Author: Jakub Steiner <jimmac gmail com>
Date:   Wed Mar 24 22:50:37 2010 +0100

    Patch by Luca Ferreti to enable legacy icon mapping during installation. bug #609458

 configure.ac    |    3 +++
 src/Makefile.am |   18 +++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5da26cb..d25ab1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,10 @@ if test "x$enable_mapping" != "xno"; then
       AC_MSG_ERROR([icon-naming-utils >= $UTILS_REQUIRED is required to build
                     and install gnome-icon-theme])
    fi
+else
+   ICONMAP="false"
 fi
+
 AC_SUBST(ICONMAP)
 
 # need git, icontool, and inkscape for rendering
diff --git a/src/Makefile.am b/src/Makefile.am
index b926dd8..c961d1e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,13 +23,29 @@ render: render-png
 
 install-data-local:
 	for size in $(render_sizes); do \
+		echo -e "Going to copy files for $$size"; \
 		for file in `cd $(top_builddir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \
 			context="`dirname $$file`"; \
 			$(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
 			$(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/$$size/$$file $(DESTDIR)$(themedir)/$$size/$$file; \
 		done; \
-	done
+	done; \
+	if [ $(ICONMAP) != "false" ]; then \
+		cd $(DESTDIR)$(themedir); \
+		for size in $(render_sizes); do \
+			cd $$size; \
+			echo -e "Going to set up icon mapping for $$size"; \
+			for dir in `find . -type d`; do \
+				context="`echo $$dir | cut -c 3-`"; \
+				if [ $$context ]; then \
+					$(ICONMAP) -c $$context; \
+				fi; \
+			done; \
+			cd ..; \
+		done; \
+	fi
 
+## FIXME we should add a way to remove links generated by icon mapping
 uninstall-local:
 	for size in $(render_sizes); do \
 		for file in `cd $(top_builddir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]