diff options
author | jmmv <jmmv@pkgsrc.org> | 2003-02-14 20:04:05 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2003-02-14 20:04:05 +0000 |
commit | a2c383d8877a43097a7761cb32f1735a54e42ce9 (patch) | |
tree | a20387effa9e81326d77680123cdda251fbba0c2 /devel/GConf2 | |
parent | 0cd357ab3cd5f172384227f809c228d5e6312ecb (diff) | |
download | pkgsrc-a2c383d8877a43097a7761cb32f1735a54e42ce9.tar.gz |
Updated to 2.2.0. Changes since 1.2.1 include:
* backends/markup-tree.c (markup_entry_get_value): fix a logic error causing
us to deref a null pointer, reported by Brian Alexander Quistorff.
* configure.in: fix gtk-doc version check.
* configure.in: Added Belarusian to ALL_LINGUAS.
* gconf/gconf-internals.c (gconf_value_list_to_primitive_list_destructive):
fix using the wrong type (value->type not value->list_type) in an error
message, #96210.
* gconf/gconf-internals.c (subst_variables): patch from Benn Vosseteig fixing
a crash with a long path to $HOME.
* doc/gconf/gconf.sgml, doc/gconf-1.0.dtd: Some additions to match the full
range of schema elements curently accepted by gconftool. Supposedly complete
now.
* doc/Makefile.am: change the gconf-1.0.dtd install location to
$(datadir)/sgml/gconf which sounds more standards compliant.
* backends/markup-backend.c (resolve_address): add FIXME about.
Changes in the package:
* Honor PKG_SYSCONFDIR, maintaining the database inside it (PLIST do not need
to care about files in etc/gconf.xml.defaults any more).
* Provide a schemas.mk file that is used to automatically register .schemas
files in the database.
* Add a patch to handle schema deinstallation.
Reviewed by wiz.
Diffstat (limited to 'devel/GConf2')
-rw-r--r-- | devel/GConf2/Makefile | 19 | ||||
-rw-r--r-- | devel/GConf2/Makefile.common | 11 | ||||
-rw-r--r-- | devel/GConf2/PLIST | 19 | ||||
-rw-r--r-- | devel/GConf2/buildlink2.mk | 4 | ||||
-rw-r--r-- | devel/GConf2/distinfo | 12 | ||||
-rw-r--r-- | devel/GConf2/files/deinstall.tmpl | 22 | ||||
-rw-r--r-- | devel/GConf2/files/install.tmpl | 22 | ||||
-rw-r--r-- | devel/GConf2/patches/patch-aa | 16 | ||||
-rw-r--r-- | devel/GConf2/patches/patch-ab | 15 | ||||
-rw-r--r-- | devel/GConf2/patches/patch-ac | 24 | ||||
-rw-r--r-- | devel/GConf2/patches/patch-ad | 22 | ||||
-rw-r--r-- | devel/GConf2/patches/patch-ae | 306 | ||||
-rw-r--r-- | devel/GConf2/schemas.mk | 52 |
13 files changed, 517 insertions, 27 deletions
diff --git a/devel/GConf2/Makefile b/devel/GConf2/Makefile index d39aa1ae7e4..7c599b8dc29 100644 --- a/devel/GConf2/Makefile +++ b/devel/GConf2/Makefile @@ -1,17 +1,32 @@ -# $NetBSD: Makefile,v 1.13 2003/02/05 22:06:45 jmmv Exp $ +# $NetBSD: Makefile,v 1.14 2003/02/14 20:04:05 jmmv Exp $ # .include "../../devel/GConf2/Makefile.common" PKGNAME= ${DISTNAME:S/GConf/GConf2/} -PKGREVISION= 5 + +USE_PKGINSTALL= YES CONFIGURE_ENV+= PKG_USE_GTK=no +OWN_DIRS= ${PKG_SYSCONFDIR}/2 +OWN_DIRS+= ${PKG_SYSCONFDIR}/gconf.xml.defaults +OWN_DIRS+= ${PKG_SYSCONFDIR}/gconf.xml.mandatory + +EGDIR= ${PREFIX}/share/examples/GConf2 +CONF_FILES= ${EGDIR}/path ${PKG_SYSCONFDIR}/2/path + +# XXX: We need to use XML_CATALOGS here to register the installed DTD. +# But we have to wait until a public identifier is choosen for it. + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/gconf/schemas + .include "../../devel/gettext-lib/buildlink2.mk" .include "../../devel/glib2/buildlink2.mk" .include "../../devel/popt/buildlink2.mk" .include "../../net/ORBit2/buildlink2.mk" .include "../../net/linc/buildlink2.mk" .include "../../textproc/libxml2/buildlink2.mk" +.include "../../textproc/xmlcatmgr/buildlink2.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/GConf2/Makefile.common b/devel/GConf2/Makefile.common index b27dd121b02..a55e0dcc9fa 100644 --- a/devel/GConf2/Makefile.common +++ b/devel/GConf2/Makefile.common @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.common,v 1.2 2003/02/05 22:16:10 jmmv Exp $ +# $NetBSD: Makefile.common,v 1.3 2003/02/14 20:04:06 jmmv Exp $ # -DISTNAME= GConf-1.2.1 +DISTNAME= GConf-2.2.0 CATEGORIES= devel gnome -MASTER_SITES= ${MASTER_SITE_GNOME:=sources/GConf/1.2/} +MASTER_SITES= ${MASTER_SITE_GNOME:=sources/GConf/2.2/} EXTRACT_SUFX= .tar.bz2 MAINTAINER= jmmv@netbsd.org @@ -24,6 +24,11 @@ USE_GMAKE= yes USE_PERL5= build LIBTOOL_OVERRIDE= ${WRKSRC}/libtool +PKGCONFIG_OVERRIDE= ${WRKSRC}/gconf-2.0.pc.in +PKG_SYSCONFSUBDIR= gconf + +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} CONFIGURE_ARGS+= --with-html-dir=${PREFIX}/share/doc/html CONFIGURE_ARGS+= --enable-gtk-doc=no +CONFIGURE_ARGS+= --enable-gconf-source=xml::${PKG_SYSCONFDIR}/gconf.xml.defaults diff --git a/devel/GConf2/PLIST b/devel/GConf2/PLIST index d3f39ee47ac..47e53e4af14 100644 --- a/devel/GConf2/PLIST +++ b/devel/GConf2/PLIST @@ -1,6 +1,5 @@ -@comment $NetBSD: PLIST,v 1.8 2003/01/25 16:29:49 jmmv Exp $ +@comment $NetBSD: PLIST,v 1.9 2003/02/14 20:04:06 jmmv Exp $ bin/gconftool-2 -etc/gconf/2/path include/gconf/2/gconf/gconf-changeset.h include/gconf/2/gconf/gconf-client.h include/gconf/2/gconf/gconf-engine.h @@ -51,8 +50,10 @@ share/doc/html/gconf/x289.html share/doc/html/gconf/x42.html share/doc/html/gconf/x462.html share/doc/html/gconf/x485.html +share/examples/GConf2/path ${PKGLOCALEDIR}/locale/ar/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/az/LC_MESSAGES/GConf2.mo +${PKGLOCALEDIR}/locale/be/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/bg/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/ca/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/cs/LC_MESSAGES/GConf2.mo @@ -69,6 +70,7 @@ ${PKGLOCALEDIR}/locale/hu/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/it/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/ja/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/ko/LC_MESSAGES/GConf2.mo +${PKGLOCALEDIR}/locale/lv/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/ms/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/nl/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/nn/LC_MESSAGES/GConf2.mo @@ -86,15 +88,16 @@ ${PKGLOCALEDIR}/locale/uk/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/vi/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/zh_CN/LC_MESSAGES/GConf2.mo ${PKGLOCALEDIR}/locale/zh_TW/LC_MESSAGES/GConf2.mo +share/sgml/gconf/gconf-1.0.dtd +@dirrm share/sgml/gconf +@comment in xmlcatmgr: @dirrm share/sgml +@exec ${MKDIR} %D/share/gconf/schemas +@dirrm share/gconf/schemas +@dirrm share/gconf +@dirrm share/examples/GConf2 @dirrm share/doc/html/gconf @dirrm lib/GConf/2 @unexec ${RMDIR} -p %D/lib/GConf 2>/dev/null || ${TRUE} @dirrm include/gconf/2/gconf @dirrm include/gconf/2 @unexec ${RMDIR} -p %D/include/gconf 2>/dev/null || ${TRUE} -@exec ${MKDIR} %D/etc/gconf/gconf.xml.mandatory -@dirrm etc/gconf/gconf.xml.mandatory -@exec ${MKDIR} %D/etc/gconf/gconf.xml.defaults -@dirrm etc/gconf/gconf.xml.defaults -@dirrm etc/gconf/2 -@dirrm etc/gconf diff --git a/devel/GConf2/buildlink2.mk b/devel/GConf2/buildlink2.mk index 9c4756c36be..a0277a023dd 100644 --- a/devel/GConf2/buildlink2.mk +++ b/devel/GConf2/buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink2.mk,v 1.11 2003/01/25 16:29:50 jmmv Exp $ +# $NetBSD: buildlink2.mk,v 1.12 2003/02/14 20:04:06 jmmv Exp $ # # This Makefile fragment is included by packages that use GConf2. # @@ -9,7 +9,7 @@ GCONF2_BUILDLINK2_MK= # defined BUILDLINK_PACKAGES+= GConf2 -BUILDLINK_DEPENDS.GConf2?= GConf2>=1.2.1nb3 +BUILDLINK_DEPENDS.GConf2?= GConf2>=2.2.0 BUILDLINK_PKGSRCDIR.GConf2?= ../../devel/GConf2 EVAL_PREFIX+= BUILDLINK_PREFIX.GConf2=GConf2 diff --git a/devel/GConf2/distinfo b/devel/GConf2/distinfo index d65cc691b70..808ec5d66e0 100644 --- a/devel/GConf2/distinfo +++ b/devel/GConf2/distinfo @@ -1,5 +1,9 @@ -$NetBSD: distinfo,v 1.5 2003/02/05 22:06:45 jmmv Exp $ +$NetBSD: distinfo,v 1.6 2003/02/14 20:04:07 jmmv Exp $ -SHA1 (GConf-1.2.1.tar.bz2) = a0b585dbfbd598380bd4e40f275ff478b196eefc -Size (GConf-1.2.1.tar.bz2) = 954798 bytes -SHA1 (patch-aa) = 140463db01048861197fbaf4fe3940f23e11ae46 +SHA1 (GConf-2.2.0.tar.bz2) = 498cfd3d4d26b765fe4e54d7bacef01285a37b02 +Size (GConf-2.2.0.tar.bz2) = 1049910 bytes +SHA1 (patch-aa) = bbafe6158ed1dd45df5c38264a2a34e1536860da +SHA1 (patch-ab) = eb9ffa0ec87fe21b0f754aef019221d619b37b11 +SHA1 (patch-ac) = 32f8bc70f3f384c7c044104520fa412530b90846 +SHA1 (patch-ad) = 50b0d919768b179d0209c49aee25a7c64ca5b497 +SHA1 (patch-ae) = 158845de022ac4e6a33782658835c8834044e02f diff --git a/devel/GConf2/files/deinstall.tmpl b/devel/GConf2/files/deinstall.tmpl new file mode 100644 index 00000000000..38f3f40eabd --- /dev/null +++ b/devel/GConf2/files/deinstall.tmpl @@ -0,0 +1,22 @@ +# $NetBSD: deinstall.tmpl,v 1.1 2003/02/14 20:05:14 jmmv Exp $ +# +# Unregister GConf2 schema files from GConf2's database at install time. +# + +GCONFTOOL2="@GCONFTOOL2@" +GCONF2_SCHEMAS="@GCONF2_SCHEMAS@" +GCONF2_SCHEMAS_DIR="@GCONF2_SCHEMAS_DIR@" +GCONF2_CONFIG_SOURCE="@GCONF2_CONFIG_SOURCE@" + +case ${STAGE} in +DEINSTALL) + ${ECHO} "===> Unregistering GConf2 schemas for ${PKGBASE}" + for f in ${GCONF2_SCHEMAS}; do + GCONF_CONFIG_SOURCE="${GCONF2_CONFIG_SOURCE}" \ + ${GCONFTOOL2} --makefile-deinstall-rule \ + ${GCONF2_SCHEMAS_DIR}/$f >/dev/null + done + ;; +*) + ;; +esac diff --git a/devel/GConf2/files/install.tmpl b/devel/GConf2/files/install.tmpl new file mode 100644 index 00000000000..0528c761e4c --- /dev/null +++ b/devel/GConf2/files/install.tmpl @@ -0,0 +1,22 @@ +# $NetBSD: install.tmpl,v 1.1 2003/02/14 20:05:14 jmmv Exp $ +# +# Register GConf2 schema files into GConf2's database at install time. +# + +GCONFTOOL2="@GCONFTOOL2@" +GCONF2_SCHEMAS="@GCONF2_SCHEMAS@" +GCONF2_SCHEMAS_DIR="@GCONF2_SCHEMAS_DIR@" +GCONF2_CONFIG_SOURCE="@GCONF2_CONFIG_SOURCE@" + +case ${STAGE} in +POST-INSTALL) + ${ECHO} "===> Registering GConf2 schemas for ${PKGBASE}" + for f in ${GCONF2_SCHEMAS}; do + GCONF_CONFIG_SOURCE="${GCONF2_CONFIG_SOURCE}" \ + ${GCONFTOOL2} --makefile-install-rule \ + ${GCONF2_SCHEMAS_DIR}/$f >/dev/null + done + ;; +*) + ;; +esac diff --git a/devel/GConf2/patches/patch-aa b/devel/GConf2/patches/patch-aa index 7736a36d9f4..84c95cb1e1e 100644 --- a/devel/GConf2/patches/patch-aa +++ b/devel/GConf2/patches/patch-aa @@ -1,11 +1,11 @@ -$NetBSD: patch-aa,v 1.2 2003/02/05 22:06:45 jmmv Exp $ +$NetBSD: patch-aa,v 1.3 2003/02/14 20:04:08 jmmv Exp $ Disable GTK2 support. This is a workaround until bug #102825 gets fixed. See http://bugzilla.gnome.org/show_bug.cgi?id=102825 for more details. - ---- configure.orig Sun Aug 4 20:18:52 2002 -+++ configure -@@ -8107,6 +8107,7 @@ fi + +--- configure.orig 2003-01-21 04:29:24.000000000 +0100 ++++ configure 2003-02-13 13:16:42.000000000 +0100 +@@ -8549,6 +8549,7 @@ fi @@ -13,7 +13,7 @@ See http://bugzilla.gnome.org/show_bug.cgi?id=102825 for more details. if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" -@@ -8150,6 +8151,7 @@ echo "${ECHO_T}$DEPENDENT_WITH_GTK_LIBS" +@@ -8592,6 +8593,7 @@ echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi @@ -21,7 +21,7 @@ See http://bugzilla.gnome.org/show_bug.cgi?id=102825 for more details. if test $succeeded = yes; then HAVE_GTK=yes -@@ -8203,6 +8205,7 @@ fi +@@ -8645,6 +8647,7 @@ fi @@ -29,7 +29,7 @@ See http://bugzilla.gnome.org/show_bug.cgi?id=102825 for more details. if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" -@@ -8246,6 +8249,7 @@ echo "${ECHO_T}$DEPENDENT_WITH_XML_AND_G +@@ -8688,6 +8691,7 @@ echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi diff --git a/devel/GConf2/patches/patch-ab b/devel/GConf2/patches/patch-ab new file mode 100644 index 00000000000..3f781d8d1e5 --- /dev/null +++ b/devel/GConf2/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1 2003/02/14 20:04:09 jmmv Exp $ + +--- Makefile.in.orig Mon Jan 27 11:12:15 2003 ++++ Makefile.in +@@ -455,10 +455,6 @@ mostlyclean distclean maintainer-clean + install-data-local: + -mkdir -p $(DESTDIR)$(datadir)/aclocal + $(INSTALL_DATA) gconf.m4 $(DESTDIR)$(datadir)/aclocal/gconf-$(MAJOR_VERSION).m4 +- -mkdir -p $(DESTDIR)$(sysconfdir)/gconf/gconf.xml.defaults +- -chmod 755 $(DESTDIR)$(sysconfdir)/gconf/gconf.xml.defaults +- -mkdir -p $(DESTDIR)$(sysconfdir)/gconf/gconf.xml.mandatory +- -chmod 755 $(DESTDIR)$(sysconfdir)/gconf/gconf.xml.mandatory + + install-schemas: + (cd standard-schemas && $(MAKE) $(AM_MAKEFLAGS) install-schemas) diff --git a/devel/GConf2/patches/patch-ac b/devel/GConf2/patches/patch-ac new file mode 100644 index 00000000000..8049617ba57 --- /dev/null +++ b/devel/GConf2/patches/patch-ac @@ -0,0 +1,24 @@ +$NetBSD: patch-ac,v 1.1 2003/02/14 20:04:10 jmmv Exp $ + +--- gconf/Makefile.in.orig 2003-01-21 04:30:18.000000000 +0100 ++++ gconf/Makefile.in +@@ -136,7 +136,7 @@ NULL = + + GCONFD_BINARY_NAME = gconfd-2 + +-INCLUDES = -I$(top_srcdir) -I$(top_builddir) $(DEPENDENT_WITH_XML_AND_GTK_CFLAGS) -DG_LOG_DOMAIN=\"GConf\" -DGCONF_LOCALE_DIR=\""$(gconflocaledir)"\" -DGCONF_SRCDIR=\""$(absolute_top_srcdir)"\" -DGCONF_CONFDIR=\""$(sysconfdir)/gconf/$(MAJOR_VERSION)"\" -DGCONF_ETCDIR=\""$(sysconfdir)/gconf"\" -DGCONF_BINDIR=\""$(bindir)"\" -DGCONF_SERVERDIR=\""$(libexecdir)"\" -DGCONF_BUILDDIR=\""$(top_builddir)"\" -DGCONF_BACKEND_DIR=\""$(pkglibdir)/$(MAJOR_VERSION)"\" -DVERSION=\""$(VERSION)"\" -DGCONF_ENABLE_INTERNALS=1 -DGCONFD=\""$(GCONFD_BINARY_NAME)"\" $(NULL) ++INCLUDES = -I$(top_srcdir) -I$(top_builddir) $(DEPENDENT_WITH_XML_AND_GTK_CFLAGS) -DG_LOG_DOMAIN=\"GConf\" -DGCONF_LOCALE_DIR=\""$(gconflocaledir)"\" -DGCONF_SRCDIR=\""$(absolute_top_srcdir)"\" -DGCONF_CONFDIR=\""$(sysconfdir)/$(MAJOR_VERSION)"\" -DGCONF_ETCDIR=\""$(sysconfdir)"\" -DGCONF_BINDIR=\""$(bindir)"\" -DGCONF_SERVERDIR=\""$(libexecdir)"\" -DGCONF_BUILDDIR=\""$(top_builddir)"\" -DGCONF_BACKEND_DIR=\""$(pkglibdir)/$(MAJOR_VERSION)"\" -DVERSION=\""$(VERSION)"\" -DGCONF_ENABLE_INTERNALS=1 -DGCONFD=\""$(GCONFD_BINARY_NAME)"\" $(NULL) + + + EFENCE = +@@ -614,8 +614,8 @@ $(CORBA_SOURCECODE): $(srcdir)/GConfX.id + $(ORBIT_IDL) $(srcdir)/GConfX.idl + + install-data-local: +- -mkdir -p $(DESTDIR)$(sysconfdir)/gconf/$(MAJOR_VERSION) +- $(INSTALL_DATA) default.path $(DESTDIR)$(sysconfdir)/gconf/$(MAJOR_VERSION)/path ++ -mkdir -p $(DESTDIR)$(datadir)/examples/GConf2 ++ $(INSTALL_DATA) default.path $(DESTDIR)$(datadir)/examples/GConf2/path + + gconfmarshal.h: @REBUILD@ stamp-gconfmarshal.h + @true diff --git a/devel/GConf2/patches/patch-ad b/devel/GConf2/patches/patch-ad new file mode 100644 index 00000000000..18b23482f70 --- /dev/null +++ b/devel/GConf2/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1 2003/02/14 20:04:10 jmmv Exp $ + +--- gconf/default.path.in.orig 2000-01-31 22:49:05.000000000 +0100 ++++ gconf/default.path.in +@@ -7,7 +7,7 @@ + + # Look first in systemwide mandatory settings directory + # (commented out until xml backend knows how to be read-only for users) +-xml:readonly:@EXPANDED_SYSCONFDIR@/gconf/gconf.xml.mandatory ++xml:readonly:@EXPANDED_SYSCONFDIR@/gconf.xml.mandatory + + # Now see where users want us to look - basically the user can stick arbitrary + # sources in a ~/.gconf.path file and they're inserted here +@@ -19,7 +19,7 @@ xml:readwrite:$(HOME)/.gconf + + # Finally, look at the systemwide defaults + # (commented out for now) +-xml:readonly:@EXPANDED_SYSCONFDIR@/gconf/gconf.xml.defaults ++xml:readonly:@EXPANDED_SYSCONFDIR@/gconf.xml.defaults + + + diff --git a/devel/GConf2/patches/patch-ae b/devel/GConf2/patches/patch-ae new file mode 100644 index 00000000000..fbbd0d191f6 --- /dev/null +++ b/devel/GConf2/patches/patch-ae @@ -0,0 +1,306 @@ +$NetBSD: patch-ae,v 1.1 2003/02/14 20:04:10 jmmv Exp $ + +Implement a --makefile-deinstall-rule option. This is beeing tracked in +bug #104487. See http://bugzilla.gnome.org/show_bug.cgi?id=104487 + +--- gconf/gconftool.c.orig 19 Sep 2002 02:49:08 -0000 ++++ gconf/gconftool.c 26 Jan 2003 21:15:51 -0000 +@@ -52,6 +52,7 @@ + static const char* config_source = NULL; + static int use_local_source = FALSE; + static int makefile_install_mode = FALSE; ++static int makefile_deinstall_mode = FALSE; + static int break_key_mode = FALSE; + static int break_dir_mode = FALSE; + static int short_docs_mode = FALSE; +@@ -282,6 +283,15 @@ + NULL + }, + { ++ "makefile-deinstall-rule", ++ '\0', ++ POPT_ARG_NONE, ++ &makefile_deinstall_mode, ++ 0, ++ N_("Properly deinstalls schema files on the command line from the database. GCONF_CONFIG_SOURCE environment variable should be set to a non-default config source or set to the empty string to use the default."), ++ NULL ++ }, ++ { + "break-key", + '\0', + POPT_ARG_NONE, +@@ -376,6 +386,7 @@ + static int do_break_key(GConfEngine* conf, const gchar** args); + static int do_break_directory(GConfEngine* conf, const gchar** args); + static int do_makefile_install(GConfEngine* conf, const gchar** args); ++static int do_makefile_deinstall(GConfEngine* conf, const gchar** args); + static int do_recursive_list(GConfEngine* conf, const gchar** args); + static int do_all_pairs(GConfEngine* conf, const gchar** args); + static void list_pairs_in_dir(GConfEngine* conf, const gchar* dir, guint depth); +@@ -499,7 +510,8 @@ + + if (ping_gconfd && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || +- spawn_gconfd || dir_exists || schema_file || makefile_install_mode || ++ spawn_gconfd || dir_exists || schema_file || ++ makefile_install_mode || makefile_deinstall_mode || + break_key_mode || break_dir_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) + { +@@ -510,7 +522,8 @@ + if (dir_exists && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || + spawn_gconfd || schema_file || makefile_install_mode || +- break_key_mode || break_dir_mode || short_docs_mode || ++ makefile_deinstall_mode || break_key_mode || ++ break_dir_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) + { + fprintf(stderr, _("--dir-exists option must be used by itself.\n")); +@@ -520,7 +533,8 @@ + if (schema_file && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || + spawn_gconfd || dir_exists || makefile_install_mode || +- break_key_mode || break_dir_mode || short_docs_mode || ++ makefile_deinstall_mode || break_key_mode || ++ break_dir_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) + { + fprintf(stderr, _("--install-schema-file must be used by itself.\n")); +@@ -530,6 +544,7 @@ + + if (makefile_install_mode && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || ++ makefile_deinstall_mode || + spawn_gconfd || dir_exists || schema_file || + break_key_mode || break_dir_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) +@@ -539,10 +554,24 @@ + } + + ++ if (makefile_deinstall_mode && (shutdown_gconfd || set_mode || get_mode || ++ unset_mode || all_subdirs_mode || ++ all_entries_mode || recursive_list || ++ makefile_install_mode || ++ spawn_gconfd || dir_exists || schema_file || ++ break_key_mode || break_dir_mode || short_docs_mode || ++ long_docs_mode || schema_name_mode)) ++ { ++ fprintf(stderr, _("--makefile-deinstall-rule must be used by itself.\n")); ++ return 1; ++ } ++ ++ + if (break_key_mode && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || + spawn_gconfd || dir_exists || schema_file || +- makefile_install_mode || break_dir_mode || short_docs_mode || ++ makefile_install_mode || makefile_deinstall_mode || ++ break_dir_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) + { + fprintf(stderr, _("--break-key must be used by itself.\n")); +@@ -553,7 +582,8 @@ + if (break_dir_mode && (shutdown_gconfd || set_mode || get_mode || unset_mode || + all_subdirs_mode || all_entries_mode || recursive_list || + spawn_gconfd || dir_exists || schema_file || +- break_key_mode || makefile_install_mode || short_docs_mode || ++ break_key_mode || makefile_install_mode || ++ makefile_deinstall_mode || short_docs_mode || + long_docs_mode || schema_name_mode)) + { + fprintf(stderr, _("--break-directory must be used by itself.\n")); +@@ -608,8 +638,15 @@ + g_print (_("GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL is set, not installing schemas\n")); + makefile_install_mode = FALSE; + } +- +- if (makefile_install_mode) ++ ++ if (makefile_deinstall_mode && ++ g_getenv ("GCONF_DISABLE_MAKEFILE_SCHEMA_DEINSTALL")) ++ { ++ g_print (_("GCONF_DISABLE_MAKEFILE_SCHEMA_DEINSTALL is set, not deinstalling schemas\n")); ++ makefile_deinstall_mode = FALSE; ++ } ++ ++ if (makefile_install_mode || makefile_deinstall_mode) + { + g_assert (config_source == NULL); + +@@ -701,6 +738,16 @@ + return retval; + } + ++ if (makefile_deinstall_mode) ++ { ++ const gchar** args = poptGetArgs(ctx); ++ gint retval = do_makefile_deinstall (conf, args); ++ ++ gconf_engine_unref (conf); ++ ++ return retval; ++ } ++ + if (break_key_mode) + { + const gchar** args = poptGetArgs(ctx); +@@ -2158,7 +2205,7 @@ + } + + static void +-hash_foreach(gpointer key, gpointer value, gpointer user_data) ++hash_foreach_install(gpointer key, gpointer value, gpointer user_data) + { + SchemaInfo* info; + GConfSchema* schema; +@@ -2186,6 +2233,36 @@ + gconf_schema_free(schema); + } + ++static void ++hash_foreach_deinstall(gpointer key, gpointer value, gpointer user_data) ++{ ++ SchemaInfo* info; ++ GConfSchema* schema; ++ GError* error = NULL; ++ ++ info = user_data; ++ schema = value; ++ ++ //if (!gconf_engine_set_schema(info->conf, info->key, schema, &error)) ++ if (!gconf_engine_unset(info->conf, info->key, &error)) ++ { ++ g_assert(error != NULL); ++ ++ fprintf(stderr, _("WARNING: failed to deinstall schema `%s' locale `%s': %s\n"), ++ info->key, gconf_schema_get_locale(schema), error->message); ++ g_error_free(error); ++ error = NULL; ++ } ++ else ++ { ++ g_assert(error == NULL); ++ printf(_("Deinstalled schema `%s' from locale `%s'\n"), ++ info->key, gconf_schema_get_locale(schema)); ++ } ++ ++ gconf_schema_free(schema); ++} ++ + + static int + process_key_list(GConfEngine* conf, const gchar* schema_name, GSList* keylist) +@@ -2197,22 +2274,47 @@ + + while (tmp != NULL) + { +- if (!gconf_engine_associate_schema(conf, tmp->data, schema_name, &error)) ++ if (!makefile_deinstall_mode) + { +- g_assert(error != NULL); +- +- fprintf(stderr, _("WARNING: failed to associate schema `%s' with key `%s': %s\n"), +- schema_name, (gchar*)tmp->data, error->message); +- g_error_free(error); +- error = NULL; ++ if (!gconf_engine_associate_schema(conf, tmp->data, schema_name, ++ &error)) ++ { ++ g_assert(error != NULL); ++ ++ fprintf(stderr, _("WARNING: failed to associate schema `%s' " ++ "with key `%s': %s\n"), ++ schema_name, (gchar*)tmp->data, error->message); ++ g_error_free(error); ++ error = NULL; ++ } ++ else ++ { ++ g_assert(error == NULL); ++ printf(_("Attached schema `%s' to key `%s'\n"), ++ schema_name, (gchar*)tmp->data); ++ } + } + else + { +- g_assert(error == NULL); +- printf(_("Attached schema `%s' to key `%s'\n"), +- schema_name, (gchar*)tmp->data); ++ if (!gconf_engine_associate_schema(conf, tmp->data, NULL, ++ &error)) ++ { ++ g_assert(error != NULL); ++ ++ fprintf(stderr, _("WARNING: failed to deassociate schema `%s' " ++ "with key `%s': %s\n"), ++ schema_name, (gchar*)tmp->data, error->message); ++ g_error_free(error); ++ error = NULL; ++ } ++ else ++ { ++ g_assert(error == NULL); ++ printf(_("Deattached schema `%s' from key `%s'\n"), ++ schema_name, (gchar*)tmp->data); ++ } + } +- ++ + tmp = g_slist_next(tmp); + } + +@@ -2292,8 +2394,11 @@ + return 1; + } + +- /* Now install each schema in the hash into the GConfEngine */ +- g_hash_table_foreach(info.hash, hash_foreach, &info); ++ /* Now (de)install each schema in the hash into the GConfEngine */ ++ if (makefile_deinstall_mode) ++ g_hash_table_foreach(info.hash, hash_foreach_deinstall, &info); ++ else ++ g_hash_table_foreach(info.hash, hash_foreach_install, &info); + + g_hash_table_destroy(info.hash); + +@@ -2416,6 +2521,38 @@ + if (args == NULL) + { + fprintf(stderr, _("Must specify some schema files to install\n")); ++ return 1; ++ } ++ ++ while (*args) ++ { ++ if (do_load_schema_file(conf, *args) != 0) ++ return 1; ++ ++ ++args; ++ } ++ ++ gconf_engine_suggest_sync(conf, &err); ++ ++ if (err != NULL) ++ { ++ fprintf(stderr, _("Error syncing config data: %s"), ++ err->message); ++ g_error_free(err); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++static int ++do_makefile_deinstall(GConfEngine* conf, const gchar** args) ++{ ++ GError* err = NULL; ++ ++ if (args == NULL) ++ { ++ fprintf(stderr, _("Must specify some schema files to deinstall\n")); + return 1; + } + diff --git a/devel/GConf2/schemas.mk b/devel/GConf2/schemas.mk new file mode 100644 index 00000000000..e7da571b444 --- /dev/null +++ b/devel/GConf2/schemas.mk @@ -0,0 +1,52 @@ +# $NetBSD: schemas.mk,v 1.1 2003/02/14 20:04:07 jmmv Exp $ +# +# This Makefile fragment is intended to be included by packages that install +# GConf2 schema files. It takes care of registering them in the GConf2 +# global configuration database. +# +# The following variables are automatically defined for free use in packages: +# GCONFTOOL2 - The gconftool-2 binary program. +# GCONF2_CONFIG_SOURCE - URI of the global configuration database. +# GCONF2_SCHEMAS_DIR - Directory where .schemas files are installed. +# +# The following variables can be defined by a package to register .schemas +# files: +# GCONF2_SCHEMAS - A list of .schemas files to register. When using this +# variable, packages need to be fixed to not register +# them and to install those files to GCONF2_SCHEMAS_DIR. +# + +.if !defined(GCONF2_SCHEMAS_MK) +GCONF2_SCHEMAS_MK= # defined + +# The gconftool-2 binary program. +GCONFTOOL2= ${BUILDLINK_PREFIX.GConf2}/bin/gconftool-2 + +# Default configuration source (database). +.if defined(PKG_SYSCONFDIR.GConf2) +GCONF2_CONFIG_SOURCE= xml::${PKG_SYSCONFDIR.GConf2}/gconf/gconf.xml.defaults +.else +GCONF2_CONFIG_SOURCE= xml::${PKG_SYSCONFBASE}/gconf/gconf.xml.defaults +.endif + +# Where .schemas files go. +GCONF2_SCHEMAS_DIR= ${BUILDLINK_PREFIX.GConf2}/share/gconf/schemas + +.if defined(GNU_CONFIGURE) && !empty(GNU_CONFIGURE:M[Yy][Ee][Ss]) +CONFIGURE_ARGS+= --disable-schemas-install +CONFIGURE_ARGS+= --with-gconf-schema-file-dir=${GCONF2_SCHEMAS_DIR} +.endif + +.if !empty(GCONF2_SCHEMAS) +FILES_SUBST+= GCONFTOOL2="${GCONFTOOL2}" +FILES_SUBST+= GCONF2_CONFIG_SOURCE="${GCONF2_CONFIG_SOURCE}" +FILES_SUBST+= GCONF2_SCHEMAS="${GCONF2_SCHEMAS}" +FILES_SUBST+= GCONF2_SCHEMAS_DIR="${GCONF2_SCHEMAS_DIR}" +INSTALL_EXTRA_TMPL+= ../../devel/GConf2/files/install.tmpl +DEINSTALL_EXTRA_TMPL+= ../../devel/GConf2/files/deinstall.tmpl +USE_PKGINSTALL= YES +.endif + +.include "../../devel/GConf2/buildlink2.mk" + +.endif # GCONF2_SCHEMAS_MK |