Sat Mar 12 14:07:14 2011 UTC ()
Add MULTI variable, and add it to BUILD_DEFS, to more easily find
variable settings affecting binary packages.

>From Aleksey Cheusov in PR 44695.


(wiz)
diff -r1.13 -r1.14 pkgsrc/lang/php/phpversion.mk
diff -r1.86 -r1.87 pkgsrc/lang/python/pyversion.mk
diff -r1.59 -r1.60 pkgsrc/lang/ruby/rubyversion.mk
diff -r1.25 -r1.26 pkgsrc/mk/apache.mk
diff -r1.1976 -r1.1977 pkgsrc/mk/bsd.pkg.mk

cvs diff -r1.13 -r1.14 pkgsrc/lang/php/phpversion.mk (expand / switch to context diff)
--- pkgsrc/lang/php/phpversion.mk 2010/09/23 07:38:05 1.13
+++ pkgsrc/lang/php/phpversion.mk 2011/03/12 14:07:13 1.14
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.13 2010/09/23 07:38:05 taca Exp $
+# $NetBSD: phpversion.mk,v 1.14 2011/03/12 14:07:13 wiz Exp $
 #
 # This file selects a PHP version, based on the user's preferences and
 # the installed packages. It does not add a dependency on the PHP
@@ -135,6 +135,10 @@
 .if !defined(_PHP_VERSION)
 _PHP_VERSION=	${_PHP_VERSION_FIRSTACCEPTED}
 .endif
+
+#
+# Variable assignment for multi-PHP packages
+MULTI+=	PHP_VERSION_REQD=${_PHP_VERSION}
 
 # export some of internal variables
 PKG_PHP_VERSION:=	${_PHP_VERSION:C/\.[0-9]//}

cvs diff -r1.86 -r1.87 pkgsrc/lang/python/pyversion.mk (expand / switch to context diff)
--- pkgsrc/lang/python/pyversion.mk 2011/02/25 09:47:24 1.86
+++ pkgsrc/lang/python/pyversion.mk 2011/03/12 14:07:13 1.87
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.86 2011/02/25 09:47:24 wiz Exp $
+# $NetBSD: pyversion.mk,v 1.87 2011/03/12 14:07:13 wiz Exp $
 
 # This file determines which Python version is used as a dependency for
 # a package.
@@ -111,6 +111,10 @@
 . endfor
 . endif
 .endif
+
+#
+# Variable assignment for multi-python packages
+MULTI+=	PYTHON_VERSION_REQD=${_PYTHON_VERSION}
 
 # No supported version found, annotate to simplify statements below.
 .if !defined(_PYTHON_VERSION)

cvs diff -r1.59 -r1.60 pkgsrc/lang/ruby/rubyversion.mk (expand / switch to context diff)
--- pkgsrc/lang/ruby/rubyversion.mk 2011/02/21 15:00:34 1.59
+++ pkgsrc/lang/ruby/rubyversion.mk 2011/03/12 14:07:13 1.60
@@ -1,4 +1,4 @@
-# $NetBSD: rubyversion.mk,v 1.59 2011/02/21 15:00:34 taca Exp $
+# $NetBSD: rubyversion.mk,v 1.60 2011/03/12 14:07:13 wiz Exp $
 #
 
 .if !defined(_RUBYVERSION_MK)
@@ -60,6 +60,10 @@
 RUBY_VERSION_SUFFIX=	${RUBY_VERSION}${RUBY_PATCH_LEVEL}
 RUBY_ABI_VERSION=	${RUBY19_API_VERSION}
 .endif
+
+#
+# Variable assignment for multi-ruby packages
+MULTI+=	RUBY_VERSION_REQD=${RUBY_VERSION_REQD:U${_RUBY_VERSION_DEFAULT}}
 
 # RUBY_VERSION_SUPPORTED defines the list of ${RUBY_VER} which is
 #	supported by the package.  It should be defined by the packages

cvs diff -r1.25 -r1.26 pkgsrc/mk/apache.mk (expand / switch to context diff)
--- pkgsrc/mk/apache.mk 2007/12/17 22:09:58 1.25
+++ pkgsrc/mk/apache.mk 2011/03/12 14:07:13 1.26
@@ -1,4 +1,4 @@
-# $NetBSD: apache.mk,v 1.25 2007/12/17 22:09:58 tron Exp $
+# $NetBSD: apache.mk,v 1.26 2011/03/12 14:07:13 wiz Exp $
 #
 # This file is meant to be included by packages that require an apache
 # web server.
@@ -134,5 +134,9 @@
 .  include "../../devel/apr/buildlink3.mk"
 .  include "../../devel/apr-util/buildlink3.mk"
 .endif
+
+#
+# Variable assignment for multi-apache packages
+MULTI+=	PKG_APACHE=${PKG_APACHE}
 
 .endif	# APACHE_MK

cvs diff -r1.1976 -r1.1977 pkgsrc/mk/bsd.pkg.mk (expand / switch to context diff)
--- pkgsrc/mk/bsd.pkg.mk 2011/02/07 10:32:32 1.1976
+++ pkgsrc/mk/bsd.pkg.mk 2011/03/12 14:07:13 1.1977
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.pkg.mk,v 1.1976 2011/02/07 10:32:32 wiz Exp $
+#	$NetBSD: bsd.pkg.mk,v 1.1977 2011/03/12 14:07:13 wiz Exp $
 #
 # This file is in the public domain.
 #
@@ -203,6 +203,13 @@
 
 .if empty(DEPOT_SUBDIR)
 PKG_FAIL_REASON+=	"DEPOT_SUBDIR may not be empty."
+.endif
+
+# Store the build options for multi-packages, i.e. packages that can
+# be built with multiple versions of Apache, Python, Ruby, PHP etc.
+#
+.if defined(MULTI)
+_BUILD_DEFS+=            MULTI
 .endif
 
 # ZERO_FILESIZE_P exits with a successful return code if the given file