[Compcomm] [PATCH]Gconf schemas, redux + jpeg plugin typo
Christopher Halse Rogers
chalserogers at gmail.com
Tue May 8 23:19:37 EDT 2007
For all those who can't magically intuit email-addresses from IRC
nicks, I'm RAOF on Freenode.
Here's a (better) patch to add gconf schemas generation to
beryl-premerge. It adds a gconf dependency at autogen time, but since
there's one of those for compiz, too, it shouldn't be a problem.
Also, while I was fiddling with configure.ac, I noticed a typo in the
--disable-jpeg option. Patch attached.
-------------- next part --------------
From 645da8c9baeac437cfbb470a3d5cac688dadb659 Mon Sep 17 00:00:00 2001
From: Christopher James Halse Rogers <chris at Burninator.(none)>
Date: Wed, 9 May 2007 13:14:53 +1000
Subject: [PATCH] Fix JPEG plugin's --disable-jpeg configure option. Trivial spelling mistake :)
---
configure.ac | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0c54ccb..ad12f0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,7 +163,7 @@ fi
AC_ARG_ENABLE(jpeg,
[ --disable-jpeg Disable jpeg plugin],
- [use_jpege=$enableval], [use_jpeg=yes])
+ [use_jpeg=$enableval], [use_jpeg=yes])
AM_CONDITIONAL(JPEG_PLUGIN, test "x$use_jpeg" = "xyes")
if test "$use_jpeg" = yes; then
--
1.4.4.2
-------------- next part --------------
From 5f2eb0dd20017ab55fc7b9c0be7901347a6357b3 Mon Sep 17 00:00:00 2001
From: Christopher James Halse Rogers <chris at Burninator.(none)>
Date: Wed, 9 May 2007 13:13:20 +1000
Subject: [PATCH] Add an --enable-schemas options to configure, to generate gconf schemas
from metadata, using the new compiz-gconf.pc & xsltproc
---
configure.ac | 26 ++++++++++++++++++++++++++
metadata/Makefile.am | 15 +++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4c17a52..0c54ccb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,6 +170,32 @@ if test "$use_jpeg" = yes; then
AC_DEFINE(USE_JPEG, 1, [Build jpeg plugin])
fi
+AC_ARG_ENABLE(schemas,
+ [ --enable-schemas Build gconf schemas],
+ [use_schemas=$enableval], [use_schemas=no])
+
+if test x"$use_schemas" = x"yes"; then
+ AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+ PKG_CHECK_MODULES(SCHEMAS, compiz-gconf, [use_schemas=yes], [use_schemas=no])
+ if test x"$GCONFTOOL" = xno; then
+ AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+ fi
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ if test x"$PKG_CONFIG" = xno ; then
+ AC_MSG_ERROR([pkg-config executable not found in your path, unable to determine schema directory])
+ fi
+ xsltdir=`$PKG_CONFIG --variable=xsltdir compiz-gconf`
+ AC_SUBST(xsltdir)
+fi
+
+AM_GCONF_SOURCE_2
+
+
+AM_CONDITIONAL(USE_SCHEMAS, test "x$use_schemas" = "xyes")
+if test "$use_schemas" = yes; then
+ AC_DEFINE(USE_SCHEMAS, 1, [Build gconf schemas])
+fi
+
AC_OUTPUT([
Makefile
metadata/Makefile
diff --git a/metadata/Makefile.am b/metadata/Makefile.am
index d26f323..e6e30c6 100644
--- a/metadata/Makefile.am
+++ b/metadata/Makefile.am
@@ -24,3 +24,18 @@ meta_DATA = \
wall.xml
EXTRA_DIST = $(meta_DATA)
+
+if USE_SCHEMAS
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_DATA = $(patsubst %.xml,compiz-%.schemas,$(meta_DATA))
+
+%.schemas: $(meta_DATA)
+ xsltproc -o $@ $(xsltdir)/schemas.xslt $(subst compiz-,,$*).xml;
+
+if GCONF_SCHEMAS_INSTALL
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA); \
+ fi
+endif
+endif
--
1.4.4.2
More information about the CompComm
mailing list