$NetBSD: patch-cm,v 1.1 2011/10/09 19:40:02 jmmv Exp $

sysutils/gio-fam builds the gio/fam backend as a separate module.  Force it
to link against the installed version of glib2, as it is not rebuilt by the
package.

--- gio/fam/Makefile.am.orig	2010-09-27 18:48:33.000000000 +0000
+++ gio/fam/Makefile.am
@@ -25,11 +25,9 @@ libgiofam_la_CFLAGS = \
 	-DGIO_COMPILATION		\
 	-DG_DISABLE_DEPRECATED
 
-libgiofam_la_LDFLAGS = $(module_flags)
+libgiofam_la_LDFLAGS = $(module_flags) \
+		$$(pkg-config --libs gio-2.0 gobject-2.0 glib-2.0)
 libgiofam_la_LIBADD = \
-		$(top_builddir)/gio/libgio-2.0.la \
-		$(top_builddir)/gobject/libgobject-2.0.la \
-		$(top_builddir)/glib/libglib-2.0.la \
 		$(GLIB_LIBS) \
 		$(FAM_LIBS) \
 		$(NULL)
@@ -41,9 +39,6 @@ RUN_QUERY_MODULES=true
 endif
 
 install-data-hook:
-	if $(RUN_QUERY_MODULES) && test -z "$(DESTDIR)" ; then					\
-		$(top_builddir)/gio/gio-querymodules$(EXEEXT) $(DESTDIR)$(GIO_MODULE_DIR) ;	\
-	fi
 
 uninstall-local:
 	$(RM) $(DESTDIR)$(GIO_MODULE_DIR)/giomodules.cache
