Commit ee70418c authored by Marco Barisione's avatar Marco Barisione

build: add --with-icondir to set a different install path for icons

parent 84d26bd9
......@@ -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}
......
......@@ -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:
......
......@@ -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) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment