diff options
author | jlam <jlam@pkgsrc.org> | 2003-08-29 02:06:09 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-08-29 02:06:09 +0000 |
commit | 8ed46554b4dbb5fb5d308b0064f1eb7c8181e0a5 (patch) | |
tree | 5c6801a0459c0ac441512ab64e9bf5f8cd96afa0 | |
parent | ce06265c9fa4a0efbec38118d5c441d1d0f9dfcd (diff) | |
download | pkgsrc-8ed46554b4dbb5fb5d308b0064f1eb7c8181e0a5.tar.gz |
Support two new variables:
PKG_INSTALLATION_PREFS?= overwrite pkgviews
# This is a whitespace-separated list of installation types to try when
# building a package, in order of preference.
# Possible: any of: overwrite, pkgviews
# Default: overwrite pkgviews
PKG_INSTALLATION_TYPES?= overwrite
# This is a whitespace-separated list of installation types supported
# by the package.
#
# *NOTE*: This variable *must* be set in the package Makefile *before*
# the inclusion of bsd.prefs.mk.
#
# Possible: any of: overwrite, pkgviews
# Default: overwrite
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 18 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 8 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 16 |
3 files changed, 34 insertions, 8 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index fefa983a63c..94658b271bf 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.defaults.mk,v 1.160.2.8 2003/08/26 21:58:05 jlam Exp $ +# $NetBSD: bsd.pkg.defaults.mk,v 1.160.2.9 2003/08/29 02:06:09 jlam Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -153,6 +153,12 @@ DISTDIR?= ${_PKGSRCDIR}/distfiles # Possible: any directories # Default: none +PKG_INSTALLATION_PREFS?= overwrite pkgviews +# This is a whitespace-separated list of installation types to try when +# building a package, in order of preference. +# Possible: any of: overwrite, pkgviews +# Default: overwrite pkgviews + PACKAGES?= ${_PKGSRCDIR}/packages # Store generated packages on a per-architecture base # Possible: any path you like @@ -1465,6 +1471,16 @@ PILRC_USE_GTK?= YES # Possible: YES, not defined # Default: not defined +PKG_INSTALLATION_TYPES?= overwrite +# This is a whitespace-separated list of installation types supported +# by the package. +# +# *NOTE*: This variable *must* be set in the package Makefile *before* +# the inclusion of bsd.prefs.mk. +# +# Possible: any of: overwrite, pkgviews +# Default: overwrite + #PKG_JVM= # Used to choose a java virtual machine for packages which use Java. # ${JAVA_HOME} will be set based on this choice, if unset diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index ea544dd30a2..1c65046bc05 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1216.2.43 2003/08/29 00:53:05 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1216.2.44 2003/08/29 02:06:10 jlam Exp $ # # This file is in the public domain. # @@ -95,6 +95,10 @@ INTERACTIVE_STAGE?= none PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''." .endif +.if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE}) +PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}." +.endif + # The style of PLISTs that are used by the installed package. # Possible: dynamic, static # @@ -102,6 +106,8 @@ PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite PLIST_TYPE?= dynamic .elif ${PKG_INSTALLATION_TYPE} == "overwrite" PLIST_TYPE?= static +.else +PLIST_TYPE?= static .endif # PLIST_TYPE can only be one of two values: "dynamic" or "static". If we diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index e104db9b389..64f6ae36a61 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.118.2.14 2003/08/26 21:52:10 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.118.2.15 2003/08/29 02:06:12 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -279,12 +279,16 @@ DIGEST_VERSION!= ${DIGEST} -V 2>/dev/null MAKEFLAGS+= DIGEST_VERSION="${DIGEST_VERSION}" .endif -# The style of installation to be performed for the package. -# Possible: overwrite, pkgviews +# Set the style of installation to be performed for the package. The +# funky make variable modifiers just select the first word of the value +# stored in the referenced variable. # -# NOTE: PKG_INSTALLATION_TYPE should be set *before* including bsd.prefs.mk. -# -PKG_INSTALLATION_TYPE?= overwrite +.for _pref_ in ${PKG_INSTALLATION_PREFS} +. if !empty(PKG_INSTALLATION_TYPES:M${_pref_}) +PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//} +. endif +.endfor +PKG_INSTALLATION_TYPE?= none # This is the package database directory for the default view. PKG_DBDIR?= ${DESTDIR}/var/db/pkg |