diff options
author | jmmv <jmmv@pkgsrc.org> | 2011-02-20 17:40:54 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2011-02-20 17:40:54 +0000 |
commit | 35b750b3ceea81e61d799a9fba9ebce0cdab67c5 (patch) | |
tree | 2664a6be1d01dd12688864d925bf133a72e96651 /devel | |
parent | 06212378af641629f04fe4d4119a2f1b747753da (diff) | |
download | pkgsrc-35b750b3ceea81e61d799a9fba9ebce0cdab67c5.tar.gz |
Forcibly delete any stale cache files during deinstall. For example, the
gio-querymodules utility does not delete the file when no modules are left,
so we were left with a giomodule.cache file after removing glib2 that was
not managed by any package.
Also, and as a side effect, ensure that the files are created during
install time so that in-place updates work correctly.
Bump PKGREVISION to 2.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glib2/DEINSTALL | 19 | ||||
-rw-r--r-- | devel/glib2/INSTALL | 19 | ||||
-rw-r--r-- | devel/glib2/Makefile | 9 |
3 files changed, 45 insertions, 2 deletions
diff --git a/devel/glib2/DEINSTALL b/devel/glib2/DEINSTALL new file mode 100644 index 00000000000..976d643c210 --- /dev/null +++ b/devel/glib2/DEINSTALL @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2011/02/20 17:40:54 jmmv Exp $ +# +# Forcibly remove any auto-generated caches. The cache-regeneration tools +# should be doing this automatically when there are no more files in the +# directories they scan, but they don't. And, anyway, we need to do this +# if we want in-place updates of glib2 to work correctly. +# + +GIO_MODULES_DIR="@GIO_MODULES_DIR@" +GLIB_SCHEMAS_DIR="@GLIB_SCHEMAS_DIR@" + +case ${STAGE} in +DEINSTALL) + ${RM} -f "${GIO_MODULES_DIR}/giomodule.cache" + ${RM} -f "${GLIB_SCHEMAS_DIR}/gschemas.compiled" + ;; +esac diff --git a/devel/glib2/INSTALL b/devel/glib2/INSTALL new file mode 100644 index 00000000000..c068471e20d --- /dev/null +++ b/devel/glib2/INSTALL @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2011/02/20 17:40:54 jmmv Exp $ +# +# Generate caches after installing the glib2 package. This is theorically +# not needed for a fresh install but is required for in-place updates to +# work correctly. + +GIO_MODULES_DIR="@GIO_MODULES_DIR@" +GIO_QUERYMODULES="@GIO_QUERYMODULES@" +GLIB_COMPILE_SCHEMAS="@GLIB_COMPILE_SCHEMAS@" +GLIB_SCHEMAS_DIR="@GLIB_SCHEMAS_DIR@" + +case ${STAGE} in +POST-INSTALL) + "${GIO_QUERYMODULES}" "${GIO_MODULES_DIR}" + XDG_DATA_DIRS= "${GLIB_COMPILE_SCHEMAS}" "${GLIB_SCHEMAS_DIR}" + ;; +esac diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index 1b4fd69c8a1..91582eae0d2 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.177 2010/11/20 01:36:49 obache Exp $ +# $NetBSD: Makefile,v 1.178 2011/02/20 17:40:54 jmmv Exp $ .include "Makefile.common" -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel COMMENT= Some useful routines for C programming (glib2) @@ -23,6 +23,11 @@ PKGCONFIG_OVERRIDE+= gthread-2.0.pc.in PKGCONFIG_OVERRIDE+= gio-2.0.pc.in PKGCONFIG_OVERRIDE+= gio-unix-2.0.pc.in +FILES_SUBST+= GIO_MODULES_DIR=${PREFIX}/lib/gio/modules +FILES_SUBST+= GIO_QUERYMODULES=${PREFIX}/bin/gio-querymodules +FILES_SUBST+= GLIB_COMPILE_SCHEMAS=${PREFIX}/bin/glib-compile-schemas +FILES_SUBST+= GLIB_SCHEMAS_DIR=${PREFIX}/share/glib-2.0/schemas + # need pcre utf8 + unicode-properties BUILDLINK_API_DEPENDS.pcre+= pcre>=7.4nb1 |