summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-18 22:42:07 +0000
committerjlam <jlam@pkgsrc.org>2005-05-18 22:42:07 +0000
commitd6f6120540eaa1315ad85806fdeb1140c6e68496 (patch)
tree67b8f74bb10335e4db27319dcdd190d485ae9da0 /mk
parentb128ce5f024d2ea08fb4743141290d580c65ebe1 (diff)
downloadpkgsrc-d6f6120540eaa1315ad85806fdeb1140c6e68496.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 'mk')
-rw-r--r--mk/bsd.pkg.use.mk55
-rw-r--r--mk/tools/perl.mk16
2 files changed, 15 insertions, 56 deletions
diff --git a/mk/bsd.pkg.use.mk b/mk/bsd.pkg.use.mk
index 9680d388e67..70ee3a2bb76 100644
--- a/mk/bsd.pkg.use.mk
+++ b/mk/bsd.pkg.use.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.use.mk,v 1.13 2005/05/18 14:41:50 tv Exp $
+# $NetBSD: bsd.pkg.use.mk,v 1.14 2005/05/18 22:42:07 jlam Exp $
#
# Turn USE_* macros into proper depedency logic. Included near the top of
# bsd.pkg.mk, after bsd.prefs.mk.
@@ -107,42 +107,12 @@ USE_MAKEINFO?= no
. include "../../mk/texinfo.mk"
.endif
-### USE_PERL5, PERL5_REQD
-
-# Distill the PERL5_REQD list into a single _PERL5_REQD value that is the
-# highest version of Perl required.
+.if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
+###
+### USE_PERL5
+###
+.include "../../lang/perl5/version.mk"
#
-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_} 2>/dev/null; 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}
-
-.if defined(USE_PERL5) || !empty(USE_TOOLS:Mperl)
-_PERL5_DEPENDS= {perl>=${_PERL5_REQD},perl-thread>=${_PERL5_REQD}}
-PERL5_PKGSRCDIR?= ../../lang/perl58
-.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.
#
@@ -153,23 +123,14 @@ _PERL5_DEPMETHOD= BUILD_DEPENDS
USE_PERL5:= run
_PERL5_DEPMETHOD= DEPENDS
. endif
-_PERL5_DEPENDS= {perl>=${_PERL5_REQD},perl-thread>=${_PERL5_REQD}}
+_PERL5_DEPENDS= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}
+PERL5_PKGSRCDIR?= ../../lang/perl58
. if !defined(BUILDLINK_DEPENDS.perl)
${_PERL5_DEPMETHOD}+= ${_PERL5_DEPENDS}:${PERL5_PKGSRCDIR}
. endif
-.endif
-
-.if empty(_USE_NEW_TOOLS:M[yY][eE][sS])
-.if defined(USE_PERL5) && (${USE_PERL5} == "run")
CONFIGURE_ENV+= PERL=${PERL5:Q}
. include "../../lang/perl5/vars.mk"
-.endif # USE_PERL5 == run
.endif
-
-.if defined(USE_PERL5)
-PLIST_SUBST+= PERL5_SITELIB=${PERL5_SUB_INSTALLSITELIB}
-PLIST_SUBST+= PERL5_SITEARCH=${PERL5_SUB_INSTALLSITEARCH}
-PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_SUB_INSTALLARCHLIB}
.endif
### USE_RMAN
diff --git a/mk/tools/perl.mk b/mk/tools/perl.mk
index 7f191665639..4bc955c98a5 100644
--- a/mk/tools/perl.mk
+++ b/mk/tools/perl.mk
@@ -1,11 +1,14 @@
-# $NetBSD: perl.mk,v 1.11 2005/05/18 03:14:01 jlam Exp $
+# $NetBSD: perl.mk,v 1.12 2005/05/18 22:42:07 jlam Exp $
# Create a symlink from ${TOOLS_DIR}/bin/perl to ${PERL5} when USE_PERL5
# is defined. This ensures that when "perl" is invoked, the pkgsrc perl
# is executed on systems that also provide a perl binary.
#
.if defined(USE_PERL5)
-USE_TOOLS+= perl
+USE_TOOLS+= perl
+. if empty(USE_PERL5:Mbuild)
+TOOLS_DEPMETHOD.perl?= DEPENDS
+. endif
.endif
# Skip the processing at the end of replace.mk. If we need to use
@@ -17,14 +20,9 @@ _TOOLS_USE_PKGSRC.perl= yes
. if !empty(PKGPATH:Mlang/perl58)
MAKEFLAGS+= TOOLS_IGNORE.perl=
. else
-. include "../../lang/perl5/buildlink3.mk"
+. include "../../lang/perl5/version.mk"
TOOLS_DEPMETHOD.perl?= BUILD_DEPENDS
-_TOOLS_DEPENDS.perl= # empty
-. for _dep_ in ${BUILDLINK_DEPENDS.perl}
-_TOOLS_DEPENDS.perl+= ${_dep_}:${BUILDLINK_PKGSRCDIR.perl}
-. endfor
-. undef _dep_
-TOOLS_DEPENDS.perl?= ${_TOOLS_DEPENDS.perl}
+TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lang/perl58
TOOLS_CREATE+= perl
FIND_PREFIX:= TOOLS_PREFIX.perl=perl
. include "../../mk/find-prefix.mk"