diff options
author | jperkin <jperkin@pkgsrc.org> | 2013-09-04 15:14:45 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2013-09-04 15:14:45 +0000 |
commit | 8dbb479e92b396d7fef7183bc4817c26a80c2cb0 (patch) | |
tree | efacd8a0b2da3eff4de37fa044a7d27eadc6de6d /mk | |
parent | b63e7a6d695312427e319cd78a145b557c8dc783 (diff) | |
download | pkgsrc-8dbb479e92b396d7fef7183bc4817c26a80c2cb0.tar.gz |
Introduce _OPSYS_PREFER.<pkg> variables as a way to set an advisory
per-platform default. Previously PREFER.<pkg> was used, and as that
has the highest precedence it meant the defaults could not be overridden
with the PREFER_PKGSRC and PREFER_NATIVE user variables.
While here, set the openssl default for SunOS back to pkgsrc, now that
users who wish to use the builtin can do so via PREFER_NATIVE=openssl.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.builtin.mk | 36 | ||||
-rw-r--r-- | mk/platform/Darwin.mk | 6 | ||||
-rw-r--r-- | mk/platform/HPUX.mk | 6 | ||||
-rw-r--r-- | mk/platform/QNX.mk | 8 | ||||
-rw-r--r-- | mk/platform/SunOS.mk | 10 |
5 files changed, 42 insertions, 24 deletions
diff --git a/mk/buildlink3/bsd.builtin.mk b/mk/buildlink3/bsd.builtin.mk index 7469253d9a7..e9d16bcdf98 100644 --- a/mk/buildlink3/bsd.builtin.mk +++ b/mk/buildlink3/bsd.builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.builtin.mk,v 1.11 2010/05/19 09:12:15 sbd Exp $ +# $NetBSD: bsd.builtin.mk,v 1.12 2013/09/04 15:14:45 jperkin Exp $ # # Copyright (c) 2004-2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -124,14 +124,29 @@ .for _pkg_ in ${BUILTIN_PKG} # -# Define PREFER.<pkg> to be either "pkgsrc" or "native" depending on -# whether to prefer the pkgsrc or native versions of software that's -# also part of the base system. Its value is determined from the -# user-settable values PREFER_PKGSRC and PREFER_NATIVE. Preferences are -# determined by the most specific instance of the package in either -# PREFER_PKGSRC or PREFER_NATIVE. If a package is specified in neither -# or in both variables, then PREFER_PKGSRC has precedence over -# PREFER_NATIVE. +# Define PREFER.<pkg> to be either "pkgsrc" or "native" depending on whether +# to prefer the pkgsrc or native version of a particular package. Its value +# is determined by a number of variables described below. +# +# PREFER.<pkg> +# This variable has the highest precedence, and should generally only be +# used by packages when it is known that a specific version should always +# be used or avoided. +# +# PREFER_PKGSRC +# PREFER_NATIVE +# These user-settable variables either take "yes" or a list of package +# names. The "yes" form has a lower precedence than a specific package, +# so the most common case is to set one variable to "yes" and then override +# specific packages in the other variable. +# +# If a package is specified in neither or in both variables, then the +# PREFER_PKGSRC setting takes precedence. +# +# _OPSYS_PREFER.<pkg> +# This variable should only be set in mk/platform files, and provides a +# per-platform default that takes precedence over "yes" in PREFER_* but is +# overridden by a more specific package name match. # _BLTN_PREFER.${_pkg_}= pkgsrc . if !empty(PREFER_NATIVE:M[yY][eE][sS]) @@ -140,6 +155,9 @@ _BLTN_PREFER.${_pkg_}= native . if !empty(PREFER_PKGSRC:M[yY][eE][sS]) _BLTN_PREFER.${_pkg_}= pkgsrc . endif +. if defined(_OPSYS_PREFER.${_pkg_}) +_BLTN_PREFER.${_pkg_}= ${_OPSYS_PREFER.${_pkg_}} +. endif . if !empty(PREFER_NATIVE:M${_pkg_}) _BLTN_PREFER.${_pkg_}= native . endif diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk index 405fb383d2a..2a5250e8837 100644 --- a/mk/platform/Darwin.mk +++ b/mk/platform/Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: Darwin.mk,v 1.54 2013/08/16 12:11:17 jperkin Exp $ +# $NetBSD: Darwin.mk,v 1.55 2013/09/04 15:14:45 jperkin Exp $ # # Variable definitions for the Darwin operating system. @@ -96,8 +96,8 @@ _USE_RPATH= no # don't add rpath to LDFLAGS KRB5_DEFAULT?= mit-krb5 # Builtin defaults which make sense for this platform. -PREFER.linux-pam?= native -PREFER.mit-krb5?= native +_OPSYS_PREFER.linux-pam?= native +_OPSYS_PREFER.mit-krb5?= native # flags passed to the linker to extract all symbols from static archives. # this is GNU ld. diff --git a/mk/platform/HPUX.mk b/mk/platform/HPUX.mk index 04dc6ce054a..916c757da7a 100644 --- a/mk/platform/HPUX.mk +++ b/mk/platform/HPUX.mk @@ -1,4 +1,4 @@ -# $NetBSD: HPUX.mk,v 1.22 2013/04/28 12:53:56 obache Exp $ +# $NetBSD: HPUX.mk,v 1.23 2013/09/04 15:14:45 jperkin Exp $ # # Variable definitions for the HP-UX operating system. @@ -70,8 +70,8 @@ KRB5_DEFAULT?= mit-krb5 # Builtin openssl and zlib have issues. Prefer pkgsrc's until we know which # versions work. -PREFER.openssl?= pkgsrc -PREFER.zlib?= pkgsrc +_OPSYS_PREFER.openssl?= pkgsrc +_OPSYS_PREFER.zlib?= pkgsrc _STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U} # cc(1) option to strip _STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U} # install(1) option to strip diff --git a/mk/platform/QNX.mk b/mk/platform/QNX.mk index dd2b5570dbb..48b7bcaa0ca 100644 --- a/mk/platform/QNX.mk +++ b/mk/platform/QNX.mk @@ -100,7 +100,7 @@ GAMEDIRMODE= 0775 PAM_DEFAULT?= openpam -PREFER.zlib?= pkgsrc -PREFER.bzip2?= pkgsrc -PREFER.curses?= pkgsrc -PREFER.termcap?= pkgsrc +_OPSYS_PREFER.zlib?= pkgsrc +_OPSYS_PREFER.bzip2?= pkgsrc +_OPSYS_PREFER.curses?= pkgsrc +_OPSYS_PREFER.termcap?= pkgsrc diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk index 8f5ac5a5dac..ee7e403e8de 100644 --- a/mk/platform/SunOS.mk +++ b/mk/platform/SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: SunOS.mk,v 1.55 2013/08/27 05:43:20 richard Exp $ +# $NetBSD: SunOS.mk,v 1.56 2013/09/04 15:14:45 jperkin Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -41,10 +41,10 @@ MOTIF_TYPE_DEFAULT?= motif KRB5_DEFAULT?= mit-krb5 # Builtin defaults which make sense for this platform. -PREFER.libexecinfo?= native -PREFER.mit-krb5?= native -#PREFER.openssl?= pkgsrc -PREFER.solaris-pam?= native +_OPSYS_PREFER.libexecinfo?= native +_OPSYS_PREFER.mit-krb5?= native +_OPSYS_PREFER.openssl?= pkgsrc +_OPSYS_PREFER.solaris-pam?= native _OPSYS_EMULDIR.solaris= # empty _OPSYS_EMULDIR.solaris32= # empty |