summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-09-17 02:38:22 +0000
committerjlam <jlam@pkgsrc.org>2003-09-17 02:38:22 +0000
commit2843d5f4c896e05a3ebc565e4a32aabe03f46d32 (patch)
tree075c2f5dda579f36707f768f171254501ff90c89 /mk/bsd.pkg.mk
parent62a71a08c428f488452e35563766f9ff15102914 (diff)
downloadpkgsrc-2843d5f4c896e05a3ebc565e4a32aabe03f46d32.tar.gz
Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
config directory matches the config directory for the dependency listed in CONF_DEPENDS. Use symlinks to physically point the package's config directory to the dependency's config directory, and handle all of this in the INSTALL/DEINSTALL scripts. Also make the INSTALL/DEINSTALL scripts a bit smarter about not copying files and not removing files if the source and destination file locations point to the same thing.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 9b8729a868d..c652c2cac74 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1287 2003/09/16 11:45:42 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1288 2003/09/17 02:38:22 jlam Exp $
#
# This file is in the public domain.
#
@@ -633,6 +633,15 @@ USE_MAKEINFO?= no # default to not using makeinfo
. include "../../mk/texinfo.mk"
.endif
+# CONF_DEPENDS notes a dependency where the config directory for the
+# package matches the dependency's config directory. CONF_DEPENDS is
+# only meaningful if ${PKG_INSTALLATION_TYPE} == "pkgviews".
+#
+CONF_DEPENDS?= # empty
+.if !empty(CONF_DEPENDS)
+USE_PKGINSTALL= yes
+.endif
+
.if defined(USE_PKGINSTALL) && !empty(USE_PKGINSTALL:M[yY][eE][sS])
. include "../../mk/bsd.pkg.install.mk"
.endif
@@ -1243,6 +1252,9 @@ PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
!empty(PKG_SYSCONFBASE:M${PREFIX}/*)
PKG_SYSCONFDEPOTBASE= # empty
PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
+. if !empty(CONF_DEPENDS)
+_PLIST_IGNORE_FILES+= ${PKG_SYSCONFDIR:S,^${PREFIX}/,,}
+. endif
. else
PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR}
PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME}
@@ -1257,7 +1269,7 @@ PKG_SYSCONFDIR= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR}
CONFIGURE_ENV+= PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
MAKE_ENV+= PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
-BUILD_DEFS+= PKG_SYSCONFDIR
+BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR
# Passed to most of script invocations
SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \