pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Turn PERL5_REQD into a list of values, the highest ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/158da6f56124
branches:  trunk
changeset: 468056:158da6f56124
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 10 02:18:04 2004 +0000

description:
Turn PERL5_REQD into a list of values, the highest of which will be used
to choose the correct Perl dependency.

diffstat:

 lang/libperl/buildlink2.mk |   4 +-
 lang/libperl/buildlink3.mk |   4 +-
 lang/perl5/buildlink2.mk   |   6 ++--
 lang/perl5/buildlink3.mk   |   6 ++--
 mk/bsd.pkg.mk              |  55 +++++++++++++++++++++++++++++++--------------
 5 files changed, 48 insertions(+), 27 deletions(-)

diffs (158 lines):

diff -r 42cad3451fdd -r 158da6f56124 lang/libperl/buildlink2.mk
--- a/lang/libperl/buildlink2.mk        Tue Feb 10 02:16:02 2004 +0000
+++ b/lang/libperl/buildlink2.mk        Tue Feb 10 02:18:04 2004 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: buildlink2.mk,v 1.1 2002/10/19 01:52:30 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.2 2004/02/10 02:18:04 jlam Exp $
 
 .if !defined(LIBPERL5_BUILDLINK2_MK)
 LIBPERL5_BUILDLINK2_MK=  # defined
 
-LIBPERL5_REQD?=                        ${PERL5_REQD}
+LIBPERL5_REQD?=                        ${_PERL5_REQD}
 BUILDLINK_PACKAGES+=           libperl
 BUILDLINK_DEPENDS.libperl?=    {libperl>=${LIBPERL5_REQD},perl>=5.8.0}
 BUILDLINK_PKGSRCDIR.libperl?=  ../../lang/libperl
diff -r 42cad3451fdd -r 158da6f56124 lang/libperl/buildlink3.mk
--- a/lang/libperl/buildlink3.mk        Tue Feb 10 02:16:02 2004 +0000
+++ b/lang/libperl/buildlink3.mk        Tue Feb 10 02:18:04 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.4 2004/01/24 03:26:47 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2004/02/10 02:18:04 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 LIBPERL_BUILDLINK3_MK:=        ${LIBPERL_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@
 BUILDLINK_DEPENDS.libperl+=    {libperl>=${LIBPERL5_REQD},perl>=5.8.0}
 BUILDLINK_PKGSRCDIR.libperl?=  ../../lang/libperl
 
-LIBPERL5_REQD?=                ${PERL5_REQD}
+LIBPERL5_REQD?=                ${_PERL5_REQD}
 
 .  include "../../lang/perl5/buildlink3.mk"
 .endif # LIBPERL_BUILDLINK3_MK
diff -r 42cad3451fdd -r 158da6f56124 lang/perl5/buildlink2.mk
--- a/lang/perl5/buildlink2.mk  Tue Feb 10 02:16:02 2004 +0000
+++ b/lang/perl5/buildlink2.mk  Tue Feb 10 02:18:04 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.11 2004/02/06 19:04:25 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.12 2004/02/10 02:18:04 jlam Exp $
 
 .if !defined(PERL5_BUILDLINK2_MK)
 PERL5_BUILDLINK2_MK=  # defined
@@ -7,9 +7,9 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-PERL5_REQD?=                   5.0
+PERL5_REQD+=                   5.0
 BUILDLINK_PACKAGES+=           perl
-BUILDLINK_DEPENDS.perl?=       perl>=${PERL5_REQD}
+BUILDLINK_DEPENDS.perl?=       perl>=${_PERL5_REQD}
 BUILDLINK_PKGSRCDIR.perl?=     ${PERL5_PKGSRCDIR}
 
 .if ${USE_PERL5} == "build"
diff -r 42cad3451fdd -r 158da6f56124 lang/perl5/buildlink3.mk
--- a/lang/perl5/buildlink3.mk  Tue Feb 10 02:16:02 2004 +0000
+++ b/lang/perl5/buildlink3.mk  Tue Feb 10 02:18:04 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.11 2004/02/06 19:04:25 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.12 2004/02/10 02:18:04 jlam Exp $
 
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH}+
 PERL5_BUILDLINK3_MK:=  ${PERL5_BUILDLINK3_MK}+
@@ -7,9 +7,9 @@
 .  include "../../mk/bsd.prefs.mk"
 
 USE_PERL5?=    run
-PERL5_REQD?=   5.0
+PERL5_REQD+=   5.0
 
-BUILDLINK_DEPENDS.perl+=       perl>=${PERL5_REQD}
+BUILDLINK_DEPENDS.perl+=       perl>=${_PERL5_REQD}
 BUILDLINK_PKGSRCDIR.perl?=     ${PERL5_PKGSRCDIR}
 
 .  if !empty(USE_PERL5:M[bB][uU][iI][lL][dD])
diff -r 42cad3451fdd -r 158da6f56124 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Tue Feb 10 02:16:02 2004 +0000
+++ b/mk/bsd.pkg.mk     Tue Feb 10 02:18:04 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1383 2004/02/09 05:42:57 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1384 2004/02/10 02:18:04 jlam Exp $
 #
 # This file is in the public domain.
 #
@@ -246,28 +246,49 @@
 BUILD_DEFS+=           KERBEROS
 .endif
 
-PERL5_REQD?=           5.0
-PERL5_PKGSRCDIR?=      ../../lang/perl5
+# Distill the PERL5_REQD list into a single _PERL5_REQD value that is the
+# highest version of Perl required.
+#
+PERL5_REQD+=           5.0
+PERL5_REQD+=           ${_OPSYS_PERL_REQD}
+
+_PERL5_STRICTEST_REQD?=        none
+.for _version_ in ${PERL5_REQD}
+.  for _pkg_ in perl-${_version_}
+.    if ${_PERL5_STRICTEST_REQD} == "none"
+_PERL5_PKG_SATISFIES_DEP=      YES
+.      for _vers_ in ${PERL5_REQD}
+.        if !empty(_PERL5_PKG_SATISFIES_DEP:M[yY][eE][sS])
+_PERL5_PKG_SATISFIES_DEP!=     \
+       if ${PKG_ADMIN} pmatch 'perl>=${_vers_}' ${_pkg_}; then         \
+               ${ECHO} "YES";                                          \
+       else                                                            \
+               ${ECHO} "NO";                                           \
+       fi
+.        endif
+.      endfor
+.      if !empty(_PERL5_PKG_SATISFIES_DEP:M[yY][eE][sS])
+_PERL5_STRICTEST_REQD= ${_version_}
+.      endif
+.    endif
+.  endfor
+.endfor
+_PERL5_REQD=   ${_PERL5_STRICTEST_REQD}
 
 # _PERL58_PATTERNS contains perl versions >=5.8.0 but before 6.0.
 _PERL58_PATTERNS=      5.8* 5.9* 5.[1-9][0-9]*
 
-.if defined(_OPSYS_PERL_REQD) && ${_OPSYS_PERL_REQD} != ""
-_PERL58_REQD?=         ${_OPSYS_PERL_REQD}
-.  for _pattern_ in ${_PERL58_PATTERNS}
-.    if !empty(PERL5_REQD:M${_pattern_})
-_PERL58_REQD:=         ${PERL5_REQD}
-.    endif
-.  endfor
-PERL5_REQD:=           ${_PERL58_REQD}
-.endif
-
-# For perl>=5.8.0, we need to build perl from ../../lang/perl58.
+_NEED_PERL58?= no
 .for _pattern_ in ${_PERL58_PATTERNS}
-.  if !empty(PERL5_REQD:M${_pattern_})
-PERL5_PKGSRCDIR=       ../../lang/perl58
+.  if !empty(_PERL5_REQD:M${_pattern_})
+_NEED_PERL58=  yes
 .  endif
 .endfor
+.if !empty(_NEED_PERL58:M[yY][eE][sS])
+PERL5_PKGSRCDIR?=      ../../lang/perl58
+.else
+PERL5_PKGSRCDIR?=      ../../lang/perl5
+.endif
 
 # Convert USE_PERL5 to be two-valued: either "build" or "run" to denote
 # whether we want a build-time or run-time dependency on perl.
@@ -279,7 +300,7 @@
 USE_PERL5:=            run
 _PERL5_DEPMETHOD=      DEPENDS
 .  endif
-_PERL5_DEPENDS=                perl>=${PERL5_REQD}
+_PERL5_DEPENDS=                perl>=${_PERL5_REQD}
 .  if !defined(BUILDLINK_DEPENDS.perl)
 ${_PERL5_DEPMETHOD}+=  ${_PERL5_DEPENDS}:${PERL5_PKGSRCDIR}
 .  endif



Home | Main Index | Thread Index | Old Index