[Xfce4-commits] <tumbler:master> Use xdg cache macro. Drop revision versioning. Drop MAINTAINER_MODE.

Jannis Pohlmann noreply at xfce.org
Tue Oct 6 15:38:03 CEST 2009


Updating branch refs/heads/master
         to 107f638da92c8da10b3b34c8fb5ad81e1690c9cd (commit)
       from 8daf819c6671a1d261731b169d228cecbb568644 (commit)

commit 107f638da92c8da10b3b34c8fb5ad81e1690c9cd
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Tue Oct 6 15:35:10 2009 +0200

    Use xdg cache macro. Drop revision versioning. Drop MAINTAINER_MODE.
    
    Don't generate the D-Bus C bindings before creating the dist tarball.
    Instead, ship the XML infos and generate the bindings at build time.
    This requires a separate check for dbus-binding-tool.

 configure.ac                  |   40 +++++++++++++++++++++++-----------------
 plugins/xdg-cache/Makefile.am |    2 +-
 tumbler/Makefile.am           |   21 ++++++++-------------
 tumblerd/Makefile.am          |   10 +++-------
 4 files changed, 35 insertions(+), 38 deletions(-)

diff --git a/configure.ac b/configure.ac
index c8b4da9..813954a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,14 +25,12 @@ m4_define([tumbler_version_api_major], [1])
 m4_define([tumbler_version_major], [0])
 m4_define([tumbler_version_minor], [0])
 m4_define([tumbler_version_micro], [0])
-m4_define([tumbler_version_build], [r at REVISION@])
-m4_define([tumbler_version_tag], [svn])
-m4_define([tumbler_version], [tumbler_version_major().tumbler_version_minor().tumbler_version_micro()ifelse(tumbler_version_tag(), [svn], [tumbler_version_tag()-tumbler_version_build()], [tumbler_version_tag()])])
+m4_define([tumbler_version], [tumbler_version_major().tumbler_version_minor().tumbler_version_micro()])
 
 dnl ********************************************
 dnl *** Full debug support for SVN snapshots ***
 dnl ********************************************
-m4_define([tumbler_debug_default], [ifelse(tumbler_version_tag(), [svn], [full], [minimum])])
+m4_define([tumbler_debug_default], [minimum])
 
 dnl ***************************
 dnl *** Initialize autoconf ***
@@ -40,7 +38,6 @@ dnl ***************************
 AC_COPYRIGHT([Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>])
 AC_INIT([tumbler], [tumbler_version], [http://bugzilla.xfce.org/])
 AC_PREREQ([2.50])
- AC_REVISION([@REVISION@])
 AC_CANONICAL_TARGET()
 
 dnl ***************************
@@ -48,7 +45,7 @@ dnl *** Initialize automake ***
 dnl ***************************
 AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
 AC_CONFIG_MACRO_DIR([m4])
-AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_AMFLAGS -I m4")
+AC_SUBST([ACLOCAL_AMFLAGS], ["$ACLOCAL_FLAGS -I m4"])
 AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE()
 
@@ -128,6 +125,17 @@ dnl *************************
 GTK_DOC_CHECK(1.9)
 
 dnl ***********************************
+dnl *** Check for dbus-binding-tool ***
+dnl ***********************************
+AC_ARG_VAR([DBUS_BINDING_TOOL], [Tool to generate C bindings from XML D-Bus interface definitions])
+AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool], [no])
+if test x"$DBUS_BINDING_TOOL" = x"no"; then
+  AC_MSG_ERROR([could not find dbus-binding-tool in \$PATH. You can run
+  ./configure DBUS_BINDING_TOOL=/path/to/dbus-binding-tool to define 
+  a custom location for it.])
+fi
+
+dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0])
@@ -136,22 +144,12 @@ PKG_CHECK_MODULES([GTHREAD], [gthread-2.0 >= 2.16.0])
 PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0.0])
 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1 >= 0.72])
 
-dnl *******************************
-dnl *** Check for PNG libraries ***
-dnl *******************************
-PKG_CHECK_MODULES(PNG, libpng >= 1.2.0, [have_libpng=yes], [
-  dnl libpng.pc not found, try with libpng12.pc
-  PKG_CHECK_MODULES(PNG, libpng12 >= 1.2.0, 
-                    [have_libpng=yes],
-                    [jhave_libpng=no])
-])
-AM_CONDITIONAL([HAVE_LIBPNG], test x"$have_libpng" = x"yes")
-
 dnl *************************
 dnl *** Check for plugins ***
 dnl *************************
 TUMBLER_PIXBUF_THUMBNAILER()
 TUMBLER_FONT_THUMBNAILER()
+TUMBLER_XDG_CACHE()
 
 dnl ************************************************************
 dnl *** Check for thumbnail flavors (normal, large, cropped) ***
@@ -214,6 +212,9 @@ echo
 echo "Build Configuration:"
 echo
 echo "  * Debug:                            $enable_debug"
+echo
+echo "Plugins:"
+echo
 if test x"$ac_tumbler_pixbuf_thumbnailer" = x"yes"; then
 echo "  * GdkPixbuf thumbnailer plugin:     yes"
 else
@@ -224,6 +225,11 @@ echo "  * FreeType font thumbnailer plugin: yes"
 else
 echo "  * FreeType font thumbnailer plugin: no"
 fi
+if test x"$ac_tumbler_xdg_cache" = x"yes"; then
+echo "  * Freedesktop.org cache plugin:     yes"
+else
+echo "  * Freedesktop.org cache plugin:     no"
+fi
 echo
 echo "Supported Thumbnail Flavors:"
 echo
diff --git a/plugins/xdg-cache/Makefile.am b/plugins/xdg-cache/Makefile.am
index b03ef21..14cb770 100644
--- a/plugins/xdg-cache/Makefile.am
+++ b/plugins/xdg-cache/Makefile.am
@@ -17,7 +17,7 @@
 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-if HAVE_LIBPNG
+if TUMBLER_XDG_CACHE
 
 tumbler_plugindir = $(libdir)/tumbler-$(TUMBLER_VERSION_API)/plugins
 tumbler_plugin_LTLIBRARIES =						\
diff --git a/tumbler/Makefile.am b/tumbler/Makefile.am
index e2023ce..9c33e47 100644
--- a/tumbler/Makefile.am
+++ b/tumbler/Makefile.am
@@ -81,8 +81,7 @@ libtumbler_1_la_CFLAGS =						\
 	$(GIO_CFLAGS)							\
 	$(GLIB_CFLAGS)							\
 	$(GTHREAD_CFLAGS)						\
-	$(PLATFORM_CFLAGS)						\
-	$(PNG_CFLAGS)
+	$(PLATFORM_CFLAGS)
 
 libtumbler_1_la_LDFLAGS =						\
 	-no-undefined							\
@@ -94,17 +93,15 @@ libtumbler_1_la_LIBADD =						\
 	$(GDK_PIXBUF_LIBS)						\
 	$(GIO_LIBS)							\
 	$(GLIB_LIBS)							\
-	$(GTHREAD_LIBS)							\
-	$(PNG_LIBS)
+	$(GTHREAD_LIBS)
 
 EXTRA_DIST =								\
-	tumbler-config.h.in
+	tumbler-config.h.in						\
+	tumbler-marshal.list
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = tumbler-1.pc
 
-if MAINTAINER_MODE
-
 DISTCLEANFILES =							\
 	stamp-tumbler-marshal.h						\
 	tumbler-config.h						\
@@ -117,12 +114,12 @@ tumbler-marshal.h: stamp-tumbler-marshal.h
 	@true
 
 stamp-tumbler-marshal.h: tumbler-marshal.list Makefile
-	cd $(srcdir) \
+	cd $(builddir) \
 	&& echo "#ifndef __TUMBLER_MARSHAL_H__" > xgen-emh \
 	&& echo "#define __TUMBLER_MARSHAL_H__" >> xgen-emh \
 	&& ( glib-genmarshal \
 		--prefix=tumbler_marshal \
-		--header tumbler-marshal.list ) >> xgen-emh \
+		--header $(srcdir)/tumbler-marshal.list ) >> xgen-emh \
 	&& echo "#endif /* !__TUMBLER_MARSHAL_H__ */" >> xgen-emh \
 	&& ( cmp -s xgen-emh tumbler-marshal.h \
 		|| cp xgen-emh tumbler-marshal.h ) \
@@ -130,12 +127,10 @@ stamp-tumbler-marshal.h: tumbler-marshal.list Makefile
 	&& echo timestamp > $(@F)
 
 tumbler-marshal.c: tumbler-marshal.list Makefile
-	cd $(srcdir) \
+	cd $(builddir) \
 	&& echo "#include <tumbler/tumbler-marshal.h>" > xgen-emc \
 	&& ( glib-genmarshal \
 		--prefix=tumbler_marshal \
-		--body tumbler-marshal.list ) >> xgen-emc \
+		--body $(srcdir)/tumbler-marshal.list ) >> xgen-emc \
 	&& cp xgen-emc tumbler-marshal.c \
 	&& rm -f xgen-emc
-
-endif
diff --git a/tumblerd/Makefile.am b/tumblerd/Makefile.am
index 75e4e91..cb09b8d 100644
--- a/tumblerd/Makefile.am
+++ b/tumblerd/Makefile.am
@@ -92,8 +92,6 @@ EXTRA_DIST =								\
 	tumbler-manager-dbus.xml					\
 	tumbler-service-dbus.xml
 
-if MAINTAINER_MODE
-
 DISTCLEANFILES =							\
 	$(tumblerd_built_sources)
 
@@ -101,12 +99,10 @@ BUILT_SOURCES =								\
 	$(tumblerd_built_sources)
 
 tumbler-cache-service-dbus-bindings.h: tumbler-cache-service-dbus.xml Makefile
-	dbus-binding-tool --mode=glib-server --prefix=tumbler_cache_service $< > $@
+	$(DBUS_BINDING_TOOL) --mode=glib-server --prefix=tumbler_cache_service $< > $@
 
 tumbler-manager-dbus-bindings.h: tumbler-manager-dbus.xml Makefile
-	dbus-binding-tool --mode=glib-server --prefix=tumbler_manager $< > $@
+	$(DBUS_BINDING_TOOL) --mode=glib-server --prefix=tumbler_manager $< > $@
 
 tumbler-service-dbus-bindings.h: tumbler-service-dbus.xml Makefile
-	dbus-binding-tool --mode=glib-server --prefix=tumbler_service $< > $@
-
-endif
+	$(DBUS_BINDING_TOOL) --mode=glib-server --prefix=tumbler_service $< > $@



More information about the Xfce4-commits mailing list