summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjmmv <jmmv>2011-02-20 17:40:54 +0000
committerjmmv <jmmv>2011-02-20 17:40:54 +0000
commit1f6c49927d697fdd7d71e45756de974c95b09cbe (patch)
tree2664a6be1d01dd12688864d925bf133a72e96651 /devel
parentab5cd1814280c934994a03a20698fa762fb5b3cb (diff)
downloadpkgsrc-1f6c49927d697fdd7d71e45756de974c95b09cbe.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/DEINSTALL19
-rw-r--r--devel/glib2/INSTALL19
-rw-r--r--devel/glib2/Makefile9
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