diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-18 22:42:07 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-18 22:42:07 +0000 |
commit | 237f73410932136ee0fdbd016ee674cc2ba95f52 (patch) | |
tree | 67b8f74bb10335e4db27319dcdd190d485ae9da0 /lang | |
parent | 68c28c427720dc87ee33edc120d8ba884a00734e (diff) | |
download | pkgsrc-237f73410932136ee0fdbd016ee674cc2ba95f52.tar.gz |
Goal: Remove USE_PERL5 from pkgsrc.
Plan:
(1) Change USE_PERL5=build into USE_TOOLS+=perl.
(2) Change all other USE_PERL5 into including perl5/buildlink3.mk.
Possibly, for packages that don't actually build anything with perl,
but merely require it for the perl interpreter, we can instead do:
USE_TOOLS+= perl
TOOLS_DEPMETHOD.perl= DEPENDS
but this is more verbose than simply including the perl5/buildlink3.mk
file.
Move the PERL5_REQD computation into a lang/perl5/version.mk file,
and only do the USE_PERL5 logic in bsd.pkg.use.mk if we're not using
the new tools framework. This consolidates all of the perl-handling
into two places -- lang/perl5 and mk/tools/perl.mk.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/libperl/buildlink3.mk | 6 | ||||
-rw-r--r-- | lang/perl5/buildlink3.mk | 16 | ||||
-rw-r--r-- | lang/perl5/module.mk | 6 | ||||
-rw-r--r-- | lang/perl5/version.mk | 38 |
4 files changed, 56 insertions, 10 deletions
diff --git a/lang/libperl/buildlink3.mk b/lang/libperl/buildlink3.mk index ee8313e69ef..9fa24dbdd6e 100644 --- a/lang/libperl/buildlink3.mk +++ b/lang/libperl/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.11 2004/09/15 14:35:11 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.12 2005/05/18 22:42:07 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ LIBPERL_BUILDLINK3_MK:= ${LIBPERL_BUILDLINK3_MK}+ @@ -11,12 +11,10 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibperl} BUILDLINK_PACKAGES+= libperl .if !empty(LIBPERL_BUILDLINK3_MK:M+) -BUILDLINK_DEPENDS.libperl+= {libperl>=${LIBPERL5_REQD},perl{,-thread}>=5.8.0} +BUILDLINK_DEPENDS.libperl+= {libperl>=${PERL5_REQD},perl{,-thread}>=5.8.0} BUILDLINK_PKGSRCDIR.libperl?= ../../lang/perl58 .endif # LIBPERL_BUILDLINK3_MK -LIBPERL5_REQD?= ${_PERL5_REQD} - .include "../../lang/perl5/buildlink3.mk" BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/lang/perl5/buildlink3.mk b/lang/perl5/buildlink3.mk index 65cfeedf499..c88133b1176 100644 --- a/lang/perl5/buildlink3.mk +++ b/lang/perl5/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.19 2005/05/12 21:01:16 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.20 2005/05/18 22:42:07 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+ @@ -13,18 +13,24 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nperl} BUILDLINK_PACKAGES+= perl .if !empty(PERL5_BUILDLINK3_MK:M+) +. if empty(_USE_NEW_TOOLS:M[yY][eE][sS]) USE_PERL5?= run PERL5_REQD+= 5.0 +. endif +USE_TOOLS+= perl -BUILDLINK_DEPENDS.perl+= {perl>=${_PERL5_REQD},perl-thread>=${_PERL5_REQD}} +BUILDLINK_DEPENDS.perl+= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}} BUILDLINK_RECOMMENDED.perl+= perl>=5.8.5nb6 -BUILDLINK_PKGSRCDIR.perl?= ${PERL5_PKGSRCDIR} +BUILDLINK_PKGSRCDIR.perl?= ../../lang/perl58 -.if !empty(USE_PERL5:M[bB][uU][iI][lL][dD]) +.if (defined(USE_PERL5) && !empty(USE_PERL5:Mbuild)) || \ + (defined(TOOLS_DEPMETHOD.perl) && !empty(TOOLS_DEPMETHOD.perl:MBUILD_DEPENDS)) BUILDLINK_DEPMETHOD.perl?= build +.else +TOOLS_DEPMETHOD.perl?= DEPENDS .endif -PERL5_OPTIONS?= # empty +PERL5_OPTIONS?= # empty .if !empty(PERL5_OPTIONS:Mthreads) USE_PKGINSTALL= yes INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install.tmpl diff --git a/lang/perl5/module.mk b/lang/perl5/module.mk index 250ec4402a6..6bd4fd18b15 100644 --- a/lang/perl5/module.mk +++ b/lang/perl5/module.mk @@ -1,4 +1,4 @@ -# $NetBSD: module.mk,v 1.44 2005/04/01 22:37:44 heinz Exp $ +# $NetBSD: module.mk,v 1.45 2005/05/18 22:42:07 jlam Exp $ # # This Makefile fragment is intended to be included by packages that build # and install perl5 modules. @@ -145,6 +145,10 @@ PERL5_MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS:S/-Wl,//g}" PERL5_MAKE_FLAGS+= OTHERLDFLAGS="${LDFLAGS}" .endif +PLIST_SUBST+= PERL5_SITELIB=${PERL5_SUB_INSTALLSITELIB} +PLIST_SUBST+= PERL5_SITEARCH=${PERL5_SUB_INSTALLSITEARCH} +PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_SUB_INSTALLARCHLIB} + # Generate the PLIST from the files listed in PERL5_PACKLIST. .if defined(PERL5_PACKLIST) PERL5_PLIST_COMMENT= \ diff --git a/lang/perl5/version.mk b/lang/perl5/version.mk new file mode 100644 index 00000000000..7fe715385b9 --- /dev/null +++ b/lang/perl5/version.mk @@ -0,0 +1,38 @@ +# $NetBSD: version.mk,v 1.1 2005/05/18 22:42:07 jlam Exp $ +# +# Distill the PERL5_REQD list into a single value that is the highest +# version of Perl required. +# + +# Default to needing Perl 5. +PERL5_REQD+= 5.0 +PERL5_REQD+= ${_OPSYS_PERL_REQD} + +.if !defined(_PERL5_REQD) +_PERL5_REQD?= none +. for _version_ in ${PERL5_REQD} +. for _pkg_ in perl-${_version_} +. if !empty(_PERL5_REQD:Mnone) +_PERL5_PKG_SATISFIES_DEP= yes +. for _dep_ in ${PERL5_REQD:S/^/perl>=/} +. if !empty(_PERL5_PKG_SATISFIES_DEP:M[yY][eE][sS]) +_PERL5_PKG_SATISFIES_DEP!= \ + if ${PKG_ADMIN} pmatch ${_dep_:Q} ${_pkg_} 2>/dev/null; then \ + ${ECHO} yes; \ + else \ + ${ECHO} no; \ + fi +. endif +. endfor +. undef _vers_ +. if !empty(_PERL5_PKG_SATISFIES_DEP:M[yY][eE][sS]) +_PERL5_REQD= ${_version_} +. endif +. endif +. endfor +. undef _pkg_ +. endfor +. undef _version_ +.endif +PERL5_REQD:= ${_PERL5_REQD} +MAKEVARS+= _PERL5_REQD |