[telepathy-account-widgets] build: add --with-icondir to set a different install path for icons
- From: Marco Barisione <mbari src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [telepathy-account-widgets] build: add --with-icondir to set a different install path for icons
- Date: Thu, 22 Aug 2013 13:40:14 +0000 (UTC)
commit ee70418cea9bb97223589087aa6a970860f147a6
Author: Marco Barisione <marco barisione collabora co uk>
Date: Thu Aug 22 11:46:21 2013 +0100
build: add --with-icondir to set a different install path for icons
configure.ac | 18 +++++++++++++++---
data/icons/Makefile.am | 10 +++++-----
tp-account-widgets/Makefile.am | 1 +
3 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 671dbfa..82f5e6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,12 +130,11 @@ fi
AC_SUBST(LDFLAGS)
# -----------------------------------------------------------
-# Allow to overwrite where to install icons and other data
-# files
+# Allow to overwrite where to install data files
# -----------------------------------------------------------
AC_ARG_WITH([pkgdatadir],
AS_HELP_STRING([--with-pkgdatadir],
- [set a different directory where to install the icon]),,
+ [set a different directory where to install data files]),,
with_pkgdatadir=)
if test x"$with_pkgdatadir" != x"" ; then
@@ -145,6 +144,18 @@ else
fi
AC_SUBST(real_pkgdatadir)
+AC_ARG_WITH([icondir],
+ AS_HELP_STRING([--with-icondir],
+ [set a different directory where to install icons]),,
+ with_icondir=)
+
+if test x"$with_icondir" != x"" ; then
+ icondir="${with_icondir}"
+else
+ icondir="${real_pkgdatadir}/icons"
+fi
+AC_SUBST(icondir)
+
# -----------------------------------------------------------
# Pkg-Config dependency checks
# -----------------------------------------------------------
@@ -358,6 +369,7 @@ Configure summary:
Linker Flags................: ${LDFLAGS}
Prefix......................: ${prefix}
Data directory .............: ${real_pkgdatadir}
+ Icon directory .............: ${icondir}
Coding style checks.........: ${ENABLE_CODING_STYLE_CHECKS}
Unreleased version checks...: ${enable_unreleased_checks}
GETTEXT_PACKAGE.............: ${GETTEXT_PACKAGE}
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index ba62ff7..71207a8 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -145,12 +145,12 @@ update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
for theme in $(private_icons_themes); do \
- $(gtk_update_icon_cache) $(real_pkgdatadir)/icons/$$theme; \
+ $(gtk_update_icon_cache) $(icondir)/$$theme; \
done; \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
for theme in $(private_icons_themes); do \
- echo "*** $(gtk_update_icon_cache) $(real_pkgdatadir)/icons/$$theme"; \
+ echo "*** $(gtk_update_icon_cache) $(icondir)/$$theme"; \
done; \
fi
@@ -160,8 +160,8 @@ install-icons:
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
- mkdir -p $(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
- $(INSTALL_DATA) $(srcdir)/$$icon
$(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ mkdir -p $(DESTDIR)$(icondir)/$$THEME/$$SIZE/$$CONTEXT; \
+ $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(icondir)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
uninstall-icons:
@@ -170,7 +170,7 @@ uninstall-icons:
CONTEXT=`echo $$icon | cut -d_ -f2`; \
SIZE=`echo $$icon | cut -d_ -f3`; \
ICONFILE=`echo $$icon | cut -d_ -f4`; \
- rm -f $(DESTDIR)$(real_pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ rm -f $(DESTDIR)$(icondir)/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
done
install-data-local:
diff --git a/tp-account-widgets/Makefile.am b/tp-account-widgets/Makefile.am
index 32e44c9..ff60c4a 100644
--- a/tp-account-widgets/Makefile.am
+++ b/tp-account-widgets/Makefile.am
@@ -2,6 +2,7 @@ AM_CPPFLAGS = \
$(ERROR_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
-DPKGDATADIR=\""$(real_pkgdatadir)"\" \
+ -DICONDIR=\""$(icondir)"\" \
-DG_LOG_DOMAIN=\"tp-account-widgets\" \
-DGCR_API_SUBJECT_TO_CHANGE \
$(TPAW_CFLAGS) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]