Skip to content

Commit

Permalink
added configure option --disable-pixmaps to install icons to share/icons
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnorantGuru committed Jul 23, 2012
1 parent d0fcb53 commit f06b5b8
Show file tree
Hide file tree
Showing 12 changed files with 295 additions and 85 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
smart size display for free space and tasks closes #115
case insensitive sort detect all created files #119
fix Skip All in overwrite query
added configure option --disable-pixmaps to install icons to share/icons
0.7.9: 2012-07-13:
new threading for tasks
network filesystem lag issues improved
Expand Down
7 changes: 7 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ EXTRA_DIST = \
intltool-merge.in \
intltool-update.in

if NO_PIXMAPS
all-local:
@echo
@echo "IMPORTANT: After installation, run:"
@echo " sudo gtk-update-icon-cache -q -t -f $(datadir)/icons/hicolor"
@echo
endif
43 changes: 25 additions & 18 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
Expand Down Expand Up @@ -717,7 +717,8 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA)
@NO_PIXMAPS_FALSE@all-local:
all-am: Makefile $(DATA) all-local
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(mimedir)"; do \
Expand Down Expand Up @@ -827,22 +828,28 @@ uninstall-am: uninstall-mimeDATA
install-am install-strip tags-recursive

.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-mimeDATA install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-mimeDATA

all all-am all-local am--refresh check check-am clean \
clean-generic clean-libtool ctags ctags-recursive dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-mimeDATA install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-mimeDATA


@NO_PIXMAPS_TRUE@all-local:
@NO_PIXMAPS_TRUE@ @echo
@NO_PIXMAPS_TRUE@ @echo "IMPORTANT: After installation, run:"
@NO_PIXMAPS_TRUE@ @echo " sudo gtk-update-icon-cache -q -t -f $(datadir)/icons/hicolor"
@NO_PIXMAPS_TRUE@ @echo

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
Expand Down
27 changes: 14 additions & 13 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
configure_ac=configure.ac

DIE=0

Expand All @@ -14,7 +15,7 @@ if [ -n "$GNOME2_DIR" ]; then
export LD_LIBRARY_PATH
fi

(test -f $srcdir/configure.in) || {
(test -f $srcdir/$configure_ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
Expand All @@ -28,7 +29,7 @@ fi
DIE=1
}

(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
(grep "^AC_PROG_INTLTOOL" $srcdir/$configure_ac >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltool' installed."
Expand All @@ -38,7 +39,7 @@ fi
}
}

(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/$configure_ac >/dev/null) && {
(xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml-i18n-toolize' installed."
Expand All @@ -48,7 +49,7 @@ fi
}
}

(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(grep "^AM_PROG_LIBTOOL" $srcdir/$configure_ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
Expand All @@ -57,8 +58,8 @@ fi
}
}

(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/$configure_ac >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/$configure_ac) > /dev/null || \
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`glib' installed."
Expand Down Expand Up @@ -101,7 +102,7 @@ xlc )
am_opt=--include-deps;;
esac

for coin in `find $srcdir -name configure.in -print`
for coin in `find $srcdir -name $configure_ac -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
Expand All @@ -112,31 +113,31 @@ do

aclocalinclude="$ACLOCAL_FLAGS"

if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
if grep "^AM_PROG_XML_I18N_TOOLS" $configure_ac >/dev/null; then
echo "Running xml-i18n-toolize..."
xml-i18n-toolize --copy --force --automake
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
if grep "^AM_PROG_LIBTOOL" $configure_ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
if grep "^AM_CONFIG_HEADER" $configure_ac >/dev/null; then
echo "Running autoheader..."
autoheader
fi
Expand All @@ -153,7 +154,7 @@ conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
&& echo "Now type 'make' to compile, then 'sudo make install' to install." || exit 1
else
echo Skipping configure process.
fi
50 changes: 47 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,8 @@ CATOBJEXT
CATALOGS
MSGFMT_OPTS
GETTEXT_PACKAGE
NO_PIXMAPS_FALSE
NO_PIXMAPS_TRUE
DESKTOP_INTEGRATION_FALSE
DESKTOP_INTEGRATION_TRUE
FAM_LIBS
Expand Down Expand Up @@ -833,6 +835,7 @@ enable_largefile
enable_superuser_checks
with_preferable_sudo
enable_desktop_integration
enable_pixmaps
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1494,6 +1497,8 @@ Optional Features:
--disable-desktop-integration
disable desktop integrations such as icons (default:
enable)
--disable-pixmaps disable use of share/pixmaps dir and use share/icons
dir to store icons (default: enable)

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
Expand Down Expand Up @@ -14511,6 +14516,22 @@ else
fi


# Check whether --enable-pixmaps was given.
if test "${enable_pixmaps+set}" = set; then :
enableval=$enable_pixmaps; use_pixmaps=$enableval
else
use_pixmaps="yes"
fi

if test ! x"$use_pixmaps" = x"yes"; then
NO_PIXMAPS_TRUE=
NO_PIXMAPS_FALSE='#'
else
NO_PIXMAPS_TRUE='#'
NO_PIXMAPS_FALSE=
fi


CPPFLAGS="$CPPFLAGS -fstrict-aliasing -fmessage-length=0"

CPPFLAGS="$CPPFLAGS -DDATADIR=\\\"$datadir\\\" -DHTMLDIR=\\\"$htmldir\\\""
Expand Down Expand Up @@ -15450,6 +15471,10 @@ if test -z "${DESKTOP_INTEGRATION_TRUE}" && test -z "${DESKTOP_INTEGRATION_FALSE
as_fn_error $? "conditional \"DESKTOP_INTEGRATION\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${NO_PIXMAPS_TRUE}" && test -z "${NO_PIXMAPS_FALSE}"; then
as_fn_error $? "conditional \"NO_PIXMAPS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
Expand Down Expand Up @@ -17524,10 +17549,27 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


resolve_datadir="$(eval echo "$datadir")"
while [ "${resolve_datadir:0:1}" == "$" ]; do
resolve_datadir="$(eval echo "$resolve_datadir")"
done

resolve_htmldir="$(eval echo "$htmldir")"
while [ "${resolve_htmldir:0:1}" == "$" ]; do
resolve_htmldir="$(eval echo "$resolve_htmldir")"
done

echo
echo SpaceFM...................................... : Version $VERSION
echo
echo Prefix....................................... : $prefix
echo Executable................................... : $prefix/bin/spacefm
if test x"$use_pixmaps" = x"yes"; then
echo Icon Dir..................................... : "$resolve_datadir/pixmaps/"
else
echo Icon Dir..................................... : "$resolve_datadir/icons/hicolor/"
fi
echo Documentation Dir............................ : "$resolve_htmldir/"
if test x"$use_hal" = x"yes"; then
echo Linux device support......................... : hal
else
Expand All @@ -17545,11 +17587,13 @@ echo Additional program to switch to super user... : $preferable_sudo
fi
echo Desktop icon integration..................... : $desktop_integration
echo
echo "The binary will be installed as $prefix/bin/spacefm"
echo
echo 'Homepage: http://ignorantguru.github.com/spacefm/'
echo
echo Please read README carefully if you are packaging SpaceFM.
echo
echo

if test ! x"$use_pixmaps" = x"yes"; then
echo 'IMPORTANT: After make and install, run:'
echo " sudo gtk-update-icon-cache -q -t -f $resolve_datadir/icons/hicolor/"
echo
fi
32 changes: 29 additions & 3 deletions configure.in → configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ if test x"$desktop_integration" = "xyes"; then
fi
AM_CONDITIONAL(DESKTOP_INTEGRATION, test "$desktop_integration" = "yes")

AC_ARG_ENABLE(
[pixmaps],
AS_HELP_STRING([--disable-pixmaps],
[disable use of share/pixmaps dir and use share/icons dir to store icons (default: enable)]),
use_pixmaps=$enableval, use_pixmaps="yes")
AM_CONDITIONAL(NO_PIXMAPS, test ! x"$use_pixmaps" = x"yes")

dnl advanced compiler tweaking
CPPFLAGS="$CPPFLAGS -fstrict-aliasing -fmessage-length=0"

Expand Down Expand Up @@ -216,10 +223,27 @@ po/Makefile.in
data/Makefile
])

resolve_datadir="$(eval echo "$datadir")"
while [[ "${resolve_datadir:0:1}" == "$" ]]; do
resolve_datadir="$(eval echo "$resolve_datadir")"
done

resolve_htmldir="$(eval echo "$htmldir")"
while [[ "${resolve_htmldir:0:1}" == "$" ]]; do
resolve_htmldir="$(eval echo "$resolve_htmldir")"
done

echo
echo SpaceFM...................................... : Version $VERSION
echo
echo Prefix....................................... : $prefix
echo Executable................................... : $prefix/bin/spacefm
if test x"$use_pixmaps" = x"yes"; then
echo Icon Dir..................................... : "$resolve_datadir/pixmaps/"
else
echo Icon Dir..................................... : "$resolve_datadir/icons/hicolor/"
fi
echo Documentation Dir............................ : "$resolve_htmldir/"
if test x"$use_hal" = x"yes"; then
echo Linux device support......................... : hal
else
Expand All @@ -237,11 +261,13 @@ echo Additional program to switch to super user... : $preferable_sudo
fi
echo Desktop icon integration..................... : $desktop_integration
echo
echo "The binary will be installed as $prefix/bin/spacefm"
echo
echo 'Homepage: http://ignorantguru.github.com/spacefm/'
echo
echo Please read README carefully if you are packaging SpaceFM.
echo
echo

if test ! x"$use_pixmaps" = x"yes"; then
echo 'IMPORTANT: After make and install, run:'
echo " sudo gtk-update-icon-cache -q -t -f $resolve_datadir/icons/hicolor/"
echo
fi
Loading

0 comments on commit f06b5b8

Please sign in to comment.