From d6baac254677b7863af413a38f382e9a2e0252bd Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sun, 28 Apr 2013 10:36:43 +0100 Subject: [PATCH] Only install fallback icon when required (#695279) Applications are moving away from storing icons in /usr/share/pixmaps, instead preferring /usr/share/icons/hicolor/$SIZE/apps, so only install the fallback icon when GParted requires it. Bug #695279 - GParted doesn't compile on RHEL / CentOS 5.9 --- configure.ac | 5 ++++- data/icons/Makefile.am | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8f81870c..c28f71da 100644 --- a/configure.ac +++ b/configure.ac @@ -308,9 +308,12 @@ AC_LINK_IFELSE( )], [AC_DEFINE([HAVE_SET_DEFAULT_ICON_NAME], 1, [Define to 1 if gtkmm-2.4 provides Gtk::Window::set_default_icon_name() method.]) + AM_CONDITIONAL([INSTALL_PIXMAPS_DIR], false) AC_MSG_RESULT([yes]) ], - [AC_MSG_RESULT([no])] + [AM_CONDITIONAL([INSTALL_PIXMAPS_DIR], true) + AC_MSG_RESULT([no]) + ] ) CXXFLAGS="$CXXFLAGS_save" AC_LANG_POP([C++]) diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 01f9b899..9572d171 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -36,6 +36,12 @@ EXTRA_DIST = \ $(noinst_DATA) \ $(NULL) +# Only install fallback icon to /usr/share/pixmaps if required +if INSTALL_PIXMAPS_DIR +INSTALL_PIXMAP = install-pixmap +UNINSTALL_PIXMAP = uninstall-pixmap +endif + ############################################################################### gtk_update_icon_cache = gtk-update-icon-cache -f -t @@ -94,6 +100,6 @@ install-pixmap: uninstall-pixmap: rm -f $(DESTDIR)$(datadir)/pixmaps/gparted.png -install-data-local: install-icons install-pixmap update-icon-cache +install-data-local: install-icons $(INSTALL_PIXMAP) update-icon-cache -uninstall-local: uninstall-icons uninstall-pixmap update-icon-cache +uninstall-local: uninstall-icons $(UNINSTALL_PIXMAP) update-icon-cache