pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/perl5 Rewrote vars.mk so that perl is only invoke...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/13d5391edd1b
branches:  trunk
changeset: 538128:13d5391edd1b
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Jan 29 16:41:36 2008 +0000

description:
Rewrote vars.mk so that perl is only invoked once, as opposed to once
per value to fetch.

diffstat:

 lang/perl5/vars.mk |  26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diffs (53 lines):

diff -r d95ad82160bd -r 13d5391edd1b lang/perl5/vars.mk
--- a/lang/perl5/vars.mk        Tue Jan 29 16:04:13 2008 +0000
+++ b/lang/perl5/vars.mk        Tue Jan 29 16:41:36 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: vars.mk,v 1.3 2005/08/06 06:18:45 jlam Exp $
+# $NetBSD: vars.mk,v 1.4 2008/01/29 16:41:36 tnn Exp $
 #
 # This Makefile fragment exposes several Perl configuration variables
 # to the package Makefiles.  The variables are only defined if the
@@ -11,34 +11,28 @@
                INSTALLVENDORLIB INSTALLVENDORARCH                      \
                INSTALLVENDORMAN1DIR INSTALLVENDORMAN3DIR
 
-_PERL5_VAR.INSTALLARCHLIB=             installarchlib
-_PERL5_VAR.INSTALLSCRIPT=              installscript
-_PERL5_VAR.INSTALLVENDORBIN=           installvendorbin
-_PERL5_VAR.INSTALLVENDORSCRIPT=                installvendorscript
-_PERL5_VAR.INSTALLVENDORLIB=           installvendorlib
-_PERL5_VAR.INSTALLVENDORARCH=          installvendorarch
-_PERL5_VAR.INSTALLVENDORMAN1DIR=       installvendorman1dir
-_PERL5_VAR.INSTALLVENDORMAN3DIR=       installvendorman3dir
-
 .if defined(PERL5) && exists(${PERL5:Q})
 #
 # Locate some of the installation prefixes for ${PERL5} that are used to
 # define later variables.
 #
+.  if !defined(_PERL5_VARS_OUT)
+_PERL5_VARS_CMD=       ${PERL5:Q} -V:prefix ${_PERL5_VARS:tl:S/^/-V:/}
+_PERL5_VARS_OUT:=      ${_PERL5_VARS_CMD:sh:ts,:S/'//g:S/;//g:Q:S/,/ /g}
+MAKEVARS+=             _PERL5_VARS_OUT
+.  endif
+
 .  if !defined(_PERL5_PREFIX)
-_PERL5_PREFIX!=                \
-       eval `${PERL5:Q} -V:prefix 2>/dev/null`; ${ECHO} $$prefix
+_PERL5_PREFIX:=                ${_PERL5_VARS_OUT:Mprefix=*:C/^prefix=//}
+MAKEVARS+=             _PERL5_PREFIX
 .  endif
-MAKEVARS+=     _PERL5_PREFIX
 #
 # Define PERL5_SUB_* as the vendor variables minus the installation prefix
 # define later variables.
 #
 .  for _var_ in ${_PERL5_VARS}
 .    if !defined(PERL5_SUB_${_var_})
-PERL5_SUB_${_var_}!=   \
-       eval `${PERL5:Q} -V:${_PERL5_VAR.${_var_}} 2>/dev/null`;        \
-       ${ECHO} $${${_PERL5_VAR.${_var_}}} | ${SED} -e "s,^${_PERL5_PREFIX}/,,"
+PERL5_SUB_${_var_}:=   ${_PERL5_VARS_OUT:M${_var_:tl}=*:S/^${_var_:tl}=${_PERL5_PREFIX:=/}//}
 .    endif
 PERL5_${_var_}?=       ${PREFIX}/${PERL5_SUB_${_var_}}
 MAKEVARS+=             PERL5_SUB_${_var_}



Home | Main Index | Thread Index | Old Index