Sun Feb 20 15:07:41 2011 UTC ()
TOOLS_NOOP is not enough to catch all calls to glib-compile-schemas because
some packages deduce the full name to the tool instead of relying on the
PATH.

Attempt to do better by setting the GLIB_COMPILE_SCHEMAS variable to
a non-absolute name during the build, hoping that such packages do define
this Makefile variable.

This should fix the build of evince as reported in PR pkg/44589.


(jmmv)
diff -r1.1 -r1.2 pkgsrc/devel/glib2/schemas.mk

cvs diff -r1.1 -r1.2 pkgsrc/devel/glib2/schemas.mk (expand / switch to unified diff)

--- pkgsrc/devel/glib2/schemas.mk 2011/01/18 10:03:59 1.1
+++ pkgsrc/devel/glib2/schemas.mk 2011/02/20 15:07:40 1.2
@@ -1,23 +1,29 @@ @@ -1,23 +1,29 @@
1# $NetBSD: schemas.mk,v 1.1 2011/01/18 10:03:59 jmmv Exp $ 1# $NetBSD: schemas.mk,v 1.2 2011/02/20 15:07:40 jmmv Exp $
2# 2#
3# This Makefile fragment is intended to be included by packages that install 3# This Makefile fragment is intended to be included by packages that install
4# GSettings schemas. It takes care of rebuilding the corresponding databases 4# GSettings schemas. It takes care of rebuilding the corresponding databases
5# at (de)installation time. 5# at (de)installation time.
6# 6#
7 7
8.if !defined(GLIB_SCHEMAS_MK) 8.if !defined(GLIB_SCHEMAS_MK)
9GLIB_SCHEMAS_MK= # defined 9GLIB_SCHEMAS_MK= # defined
10 10
11GLIB_COMPILE_SCHEMAS= ${BUILDLINK_PREFIX.glib2}/bin/glib-compile-schemas 11GLIB_COMPILE_SCHEMAS= ${BUILDLINK_PREFIX.glib2}/bin/glib-compile-schemas
12 12
13FILES_SUBST+= GLIB_SCHEMAS_DIR=${GLIB_SCHEMAS_DIR:Q} 13FILES_SUBST+= GLIB_SCHEMAS_DIR=${GLIB_SCHEMAS_DIR:Q}
14FILES_SUBST+= GLIB_COMPILE_SCHEMAS=${GLIB_COMPILE_SCHEMAS:Q} 14FILES_SUBST+= GLIB_COMPILE_SCHEMAS=${GLIB_COMPILE_SCHEMAS:Q}
15GLIB_SCHEMAS_DIR=${BUILDLINK_PREFIX.glib2}/share/glib-2.0/schemas 15GLIB_SCHEMAS_DIR=${BUILDLINK_PREFIX.glib2}/share/glib-2.0/schemas
16INSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl 16INSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl
17DEINSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl 17DEINSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl
18 18
19TOOLS_NOOP+= glib-compile-schemas 19TOOLS_NOOP+= glib-compile-schemas
 20# Adding glib-compile-schemas to TOOLS_NOOP is not enough to mock out all
 21# calls to this tool. Some packages do 'pkg-config --variable
 22# glib_compile_schemas gio-2.0' to get the path to the binary. Do a best
 23# effort here by overriding the possibly-defined GLIB_COMPILE_SCHEMAS
 24# variable in the offending Makefiles.
 25MAKE_FLAGS+= GLIB_COMPILE_SCHEMAS=glib-compile-schemas
20 26
21.include "../../devel/glib2/buildlink3.mk" 27.include "../../devel/glib2/buildlink3.mk"
22 28
23.endif # GLIB_SCHEMAS_MK 29.endif # GLIB_SCHEMAS_MK