[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kov at webkit.org kov at webkit.org
Wed Dec 22 12:13:11 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 277e210f3a5bd435908c514cf390ae31cd41d0cb
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 17 13:09:57 2010 +0000

    2010-08-17  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Martin Robinson.
    
            [GTK] GSettings support adds annoying warnings on systems with older glib versions
            https://bugs.webkit.org/show_bug.cgi?id=44056
    
            Add file containing GLIB_GSETTINGS macro so that
            configure doesn't spit warnings in older systems.
    
            * autotools/gsettings.m4: Added.
            * .gitignore: Ignore files that are generated inside autotools
            explicitely, because we have some that are kept in version
            control.
    
    WebKit/gtk
    
    2010-08-17  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Martin Robinson.
    
            [GTK] GSettings support adds annoying warnings on systems with older glib versions
            https://bugs.webkit.org/show_bug.cgi?id=44056
    
            Use #ifdef instead of #if for HAVE_GSETTINGS to avoid warnings
            when it is not defined.
    
            * WebCoreSupport/InspectorClientGtk.cpp:
            * webkit/webkitprivate.cpp:
            (webkit_init):
            * webkit/webkitprivate.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/.gitignore b/.gitignore
index 49cf0c0..a2c789b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,7 +63,19 @@ LayoutTests/java/*.class
 # a few files into the source tree.
 /aclocal.m4
 /autom4te.cache
-/autotools
+/autotools/compile
+/autotools/config.guess
+/autotools/config.sub
+/autotools/depcomp
+/autotools/gtk-doc.m4
+/autotools/install-sh
+/autotools/libtool.m4
+/autotools/ltmain.sh
+/autotools/ltoptions.m4
+/autotools/ltsugar.m4
+/autotools/ltversion.m4
+/autotools/lt~obsolete.m4
+/autotools/missing
 /autotoolsconfig.h.in
 /configure
 /GNUmakefile.in
diff --git a/ChangeLog b/ChangeLog
index c3d2c84..f62b9e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-17  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] GSettings support adds annoying warnings on systems with older glib versions
+        https://bugs.webkit.org/show_bug.cgi?id=44056
+
+        Add file containing GLIB_GSETTINGS macro so that
+        configure doesn't spit warnings in older systems.
+
+        * autotools/gsettings.m4: Added.
+        * .gitignore: Ignore files that are generated inside autotools
+        explicitely, because we have some that are kept in version
+        control.
+
 2010-08-16  Paul Sawaya  <psawaya at apple.com>
 
         Reviewed by Chris Marrin.
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 0cc231e..1ee7f7b 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-17  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
+
+        Reviewed by Martin Robinson.
+
+        [GTK] GSettings support adds annoying warnings on systems with older glib versions
+        https://bugs.webkit.org/show_bug.cgi?id=44056
+
+        Use #ifdef instead of #if for HAVE_GSETTINGS to avoid warnings
+        when it is not defined.
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        * webkit/webkitprivate.cpp:
+        (webkit_init):
+        * webkit/webkitprivate.h:
+
 2010-08-12  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Really add a missing file. I wish I would remember running git add
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index 331535c..691a915 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -119,7 +119,7 @@ void InspectorClient::hideHighlight()
     gtk_widget_queue_draw(GTK_WIDGET(m_inspectedWebView));
 }
 
-#if HAVE_GSETTINGS
+#ifdef HAVE_GSETTINGS
 static String toGSettingName(String inspectorSettingName)
 {
     if (inspectorSettingName == "resourceTrackingEnabled")
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 001b3cc..856a259 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -215,7 +215,7 @@ static void closeIconDatabaseOnExit()
     iconDatabase()->close();
 }
 
-#if HAVE_GSETTINGS
+#ifdef HAVE_GSETTINGS
 static bool isSchemaAvailable(char* schemaID)
 {
     const char* const* availableSchemas = g_settings_list_schemas();
@@ -278,7 +278,7 @@ void webkit_init()
     // FIXME: Expose this with an API and/or calculate based on available resources
     webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
 
-#if HAVE_GSETTINGS
+#ifdef HAVE_GSETTINGS
     // Initialize settings variables here to make sure this happens in
     // the main thread.
     inspectorGSettings();
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 4f5a119..a5508a4 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -120,7 +120,7 @@ namespace WebKit {
 extern "C" {
     void webkit_init();
 
-#if HAVE_GSETTINGS
+#ifdef HAVE_GSETTINGS
     GSettings* inspectorGSettings();
 #endif
 
diff --git a/autotools/gsettings.m4 b/autotools/gsettings.m4
new file mode 100644
index 0000000..ac9945e
--- /dev/null
+++ b/autotools/gsettings.m4
@@ -0,0 +1,93 @@
+dnl GLIB_GSETTINGS
+dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
+dnl the schema should be compiled
+dnl
+
+AC_DEFUN([GLIB_GSETTINGS],
+[
+  m4_pattern_allow([AM_V_GEN])
+  AC_ARG_ENABLE(schemas-compile,
+                AC_HELP_STRING([--disable-schemas-compile],
+                               [Disable regeneration of gschemas.compiled on install]),
+                [case ${enableval} in
+                  yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE=""  ;;
+                  no)  GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
+                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
+                 esac])
+  AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
+  PKG_PROG_PKG_CONFIG([0.16])
+  AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
+  if test x$cross_compiling != xyes; then
+    GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
+  else
+    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
+  fi
+  AC_SUBST(GLIB_COMPILE_SCHEMAS)
+  if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
+    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
+  else
+    ifelse([$1],,[:],[$1])
+  fi
+
+  GSETTINGS_RULES='
+.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
+
+mostlyclean-am: clean-gsettings-schemas
+
+gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
+
+%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
+	$(AM_V_GEN) if test -f "$<"; then d=; else d="$(srcdir)/"; fi; $(GLIB_COMPILE_SCHEMAS) --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$${d}$< && touch [$]@
+
+all-am: $(gsettings_SCHEMAS:.xml=.valid)
+uninstall-am: uninstall-gsettings-schemas
+install-data-am: install-gsettings-schemas
+
+.SECONDARY: $(gsettings_SCHEMAS)
+
+gsettings__base_list = \
+  sed "$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g" | \
+  sed "$$!N;$$!N;$$!N;$$!N;s/\n/ /g"
+
+install-gsettings-schemas: $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
+	@$(NORMAL_INSTALL)
+	test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"
+	@list='\''$(gsettings__enum_file) $(gsettings_SCHEMAS)'\''; test -n "$(gsettingsschemadir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(gsettings__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '\''$(DESTDIR)$(gsettingsschemadir)'\''"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(gsettingsschemadir)" || exit $$?; \
+	done
+	test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+uninstall-gsettings-schemas:
+	@$(NORMAL_UNINSTALL)
+	@list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
+	test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+clean-gsettings-schemas:
+	rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
+
+ifdef gsettings_ENUM_NAMESPACE
+$(gsettings__enum_file): $(gsettings_ENUM_FILES)
+	$(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead "  <@type@ id='\''$(gsettings_ENUM_NAMESPACE). at EnumName@'\''>" --vprod "    <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail "  </@type@>" --ftail "</schemalist>" $(gsettings_ENUM_FILES) > [$]@.tmp && mv [$]@.tmp [$]@
+endif
+'
+  _GSETTINGS_SUBST(GSETTINGS_RULES)
+])
+
+dnl _GSETTINGS_SUBST(VARIABLE)
+dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+AC_DEFUN([_GSETTINGS_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list