summaryrefslogtreecommitdiff
path: root/mk/tools/perl.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-19 03:52:23 +0000
committerjlam <jlam@pkgsrc.org>2005-05-19 03:52:23 +0000
commit0e05f466393128b57832ef7658477afc529c66a5 (patch)
treef8337cb96b0706387ff846bf53828e16932983e7 /mk/tools/perl.mk
parent6d38639554a8c3a4f019b7ba3edab068f24720ca (diff)
downloadpkgsrc-0e05f466393128b57832ef7658477afc529c66a5.tar.gz
Merge most of perl.mk into replace.mk and leave perl.mk to contain
the extra bits required by packages that use perl. This causes PKGSRC_USE_TOOLS+=perl to work properly.
Diffstat (limited to 'mk/tools/perl.mk')
-rw-r--r--mk/tools/perl.mk51
1 files changed, 16 insertions, 35 deletions
diff --git a/mk/tools/perl.mk b/mk/tools/perl.mk
index 4bc955c98a5..fa492ef317f 100644
--- a/mk/tools/perl.mk
+++ b/mk/tools/perl.mk
@@ -1,41 +1,22 @@
-# $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.
+# $NetBSD: perl.mk,v 1.13 2005/05/19 03:52:23 jlam Exp $
#
-.if defined(USE_PERL5)
-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
-# perl, then we always want the clause below to trigger.
+# This Makefile fragment defines additional variables that are used by
+# packages that use the perl tool.
#
-_TOOLS_USE_PKGSRC.perl= yes
-
-.if !defined(TOOLS_IGNORE.perl) && !empty(USE_TOOLS:Mperl)
-. if !empty(PKGPATH:Mlang/perl58)
-MAKEFLAGS+= TOOLS_IGNORE.perl=
-. else
-. include "../../lang/perl5/version.mk"
-TOOLS_DEPMETHOD.perl?= BUILD_DEPENDS
-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"
-TOOLS_REAL_CMD.perl= ${TOOLS_PREFIX.perl}/bin/perl
-TOOLS_${_TOOLS_VARNAME.perl}= ${TOOLS_REAL_CMD.perl}
-${_TOOLS_VARNAME.perl}?= ${TOOLS_${_TOOLS_VARNAME.perl}}
-CONFIGURE_ENV+= PERL=${TOOLS_${_TOOLS_VARNAME.perl}:Q}
-. endif
-# Define PERL5_* variables that locate the site directories for ${PERL5}.
-# These variables depend on PERL5 being properly defined and existing
-# on the filesystem.
+.if defined(_USE_TOOLS) && !empty(_USE_TOOLS:Mperl)
+#
+# GNU configure scripts need to be told where to the real Perl
+# interpreter can be found. This value is typically hardcoded into
+# Perl shebang scripts.
+#
+CONFIGURE_ENV+= PERL=${TOOLS_${_TOOLS_VARNAME.perl}:Q}
+#
+# Define PERL5_* variables that locate the site directories for
+# ${PERL5}. These variables depend on PERL5 being properly defined
+# and existing on the filesystem. This needs to be done _after_
+# ${PERL5} is fully resolved, which happens after mk/tools/replace.mk
+# includes find-prefix.mk.
#
. include "../../lang/perl5/vars.mk"
-
.endif