| @@ -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) |
9 | GLIB_SCHEMAS_MK= # defined | | 9 | GLIB_SCHEMAS_MK= # defined |
10 | | | 10 | |
11 | GLIB_COMPILE_SCHEMAS= ${BUILDLINK_PREFIX.glib2}/bin/glib-compile-schemas | | 11 | GLIB_COMPILE_SCHEMAS= ${BUILDLINK_PREFIX.glib2}/bin/glib-compile-schemas |
12 | | | 12 | |
13 | FILES_SUBST+= GLIB_SCHEMAS_DIR=${GLIB_SCHEMAS_DIR:Q} | | 13 | FILES_SUBST+= GLIB_SCHEMAS_DIR=${GLIB_SCHEMAS_DIR:Q} |
14 | FILES_SUBST+= GLIB_COMPILE_SCHEMAS=${GLIB_COMPILE_SCHEMAS:Q} | | 14 | FILES_SUBST+= GLIB_COMPILE_SCHEMAS=${GLIB_COMPILE_SCHEMAS:Q} |
15 | GLIB_SCHEMAS_DIR=${BUILDLINK_PREFIX.glib2}/share/glib-2.0/schemas | | 15 | GLIB_SCHEMAS_DIR=${BUILDLINK_PREFIX.glib2}/share/glib-2.0/schemas |
16 | INSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl | | 16 | INSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl |
17 | DEINSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl | | 17 | DEINSTALL_TEMPLATES+= ../../devel/glib2/files/schemas.tmpl |
18 | | | 18 | |
19 | TOOLS_NOOP+= glib-compile-schemas | | 19 | TOOLS_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. |
| | | 25 | MAKE_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 |