diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-10 02:18:04 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-10 02:18:04 +0000 |
commit | 99b8496906e97fd4f9e056e33a19d467a989039b (patch) | |
tree | d04e13b52e47b6eb9a068a7ca204a5b109b6771b | |
parent | 023b12614b5b7e518064497e8a262bdaeef03889 (diff) | |
download | pkgsrc-99b8496906e97fd4f9e056e33a19d467a989039b.tar.gz |
Turn PERL5_REQD into a list of values, the highest of which will be used
to choose the correct Perl dependency.
-rw-r--r-- | lang/libperl/buildlink2.mk | 4 | ||||
-rw-r--r-- | lang/libperl/buildlink3.mk | 4 | ||||
-rw-r--r-- | lang/perl5/buildlink2.mk | 6 | ||||
-rw-r--r-- | lang/perl5/buildlink3.mk | 6 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 55 |
5 files changed, 48 insertions, 27 deletions
diff --git a/lang/libperl/buildlink2.mk b/lang/libperl/buildlink2.mk index 9a2a939dfb3..8883ea33188 100644 --- a/lang/libperl/buildlink2.mk +++ b/lang/libperl/buildlink2.mk @@ -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 --git a/lang/libperl/buildlink3.mk b/lang/libperl/buildlink3.mk index cbb8422756c..c06ec5a6f70 100644 --- a/lang/libperl/buildlink3.mk +++ b/lang/libperl/buildlink3.mk @@ -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_PACKAGES+= libperl 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 --git a/lang/perl5/buildlink2.mk b/lang/perl5/buildlink2.mk index 6e709de4325..57867038698 100644 --- a/lang/perl5/buildlink2.mk +++ b/lang/perl5/buildlink2.mk @@ -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 @@ USE_PERL5?= run .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 --git a/lang/perl5/buildlink3.mk b/lang/perl5/buildlink3.mk index 17b4d4f6e46..a2849b4d4c7 100644 --- a/lang/perl5/buildlink3.mk +++ b/lang/perl5/buildlink3.mk @@ -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 @@ PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+ . 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 --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index cf1a9fb9e10..a37de88ce52 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -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 @@ CRYPTO?= uses Kerberos encryption code 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 @@ _PERL5_DEPMETHOD= BUILD_DEPENDS 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 |