Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2015 20:53:15 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r399791 - in head/Mk: . Scripts Uses
Message-ID:  <201510192053.t9JKrF66043418@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Mon Oct 19 20:53:15 2015
New Revision: 399791
URL: https://svnweb.freebsd.org/changeset/ports/399791

Log:
  Avoid redundantly looking up perl version when looking up dependencies or in sub-makes.
  
  With hat:	portmgr

Modified:
  head/Mk/Scripts/functions.sh
  head/Mk/Uses/perl5.mk
  head/Mk/bsd.default-versions.mk

Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh	Mon Oct 19 20:23:01 2015	(r399790)
+++ head/Mk/Scripts/functions.sh	Mon Oct 19 20:53:15 2015	(r399791)
@@ -165,10 +165,12 @@ export_ports_env() {
 	validate_env MAKE PORTSDIR
 
 	make_env="\
+		_PORTS_ENV_CHECK=1 \
 		PACKAGE_BUILDING=1 \
 		GNU_CONFIGURE=1 \
 		USE_JAVA=1 \
 		USE_LINUX=1 \
+		USES=perl5 \
 	"
 
 	make_cmd="${make_env}"
@@ -187,6 +189,7 @@ export_ports_env() {
 		_JAVA_VENDOR_LIST_REGEXP \
 		_JAVA_VERSION_LIST_REGEXP \
 		_OSRELEASE \
+		_PERL5_FROM_BIN \
 		_PKG_CHECKED \
 		_SMP_CPUS \
 	"

Modified: head/Mk/Uses/perl5.mk
==============================================================================
--- head/Mk/Uses/perl5.mk	Mon Oct 19 20:23:01 2015	(r399790)
+++ head/Mk/Uses/perl5.mk	Mon Oct 19 20:53:15 2015	(r399791)
@@ -43,7 +43,9 @@ IGNORE=	Incorrect 'USES+=perl5:${perl5_A
 USE_PERL5?=	run build
 
 # remove when 5.20 goes away.
+.if !defined(_PORTS_ENV_CHECK)
 .sinclude "${LOCALBASE}/etc/perl5_version"
+.endif
 .if defined(PERL_VERSION)
 PERL5_DEPEND=	${PERL5}
 THIS_IS_OLD_PERL=	yes

Modified: head/Mk/bsd.default-versions.mk
==============================================================================
--- head/Mk/bsd.default-versions.mk	Mon Oct 19 20:23:01 2015	(r399790)
+++ head/Mk/bsd.default-versions.mk	Mon Oct 19 20:53:15 2015	(r399791)
@@ -23,16 +23,19 @@ FPC_DEFAULT?=		2.6.4
 GCC_DEFAULT?=		4.8
 LUA_DEFAULT?=		5.2
 MYSQL_DEFAULT?=		5.6
-.if defined(PACKAGE_BUILDING) || !exists(${LOCALBASE}/bin/perl)
+.if !defined(_PORTS_ENV_CHECK) && \
+    (defined(PACKAGE_BUILDING) || !exists(${LOCALBASE}/bin/perl))
 PERL5_DEFAULT?=		5.20
 .elif !defined(PERL5_DEFAULT)
 # There's no need to replace development versions, like "5.23" with "devel"
 # because 1) nobody is supposed to use it outside of poudriere, and 2) it must
 # be set manually in /etc/make.conf in the first place, and we're never getting
 # in here.
+.if !defined(_PERL5_FROM_BIN)
 _PERL5_FROM_BIN!=	perl -e 'printf "%vd\n", $$^V;'
+.endif
+_EXPORTED_VARS+=	_PERL5_FROM_BIN
 PERL5_DEFAULT:=		${_PERL5_FROM_BIN:R}
-.undef _PERL5_FROM_BIN
 .endif
 PGSQL_DEFAULT?=		9.3
 PHP_DEFAULT?=		5.6



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510192053.t9JKrF66043418>