pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/tools Merge most of perl.mk into replace.mk and lea...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bcf5032a55dc
branches: trunk
changeset: 494089:bcf5032a55dc
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu May 19 03:52:23 2005 +0000
description:
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:
mk/tools/bsd.tools.mk | 3 ++-
mk/tools/perl.mk | 51 ++++++++++++++++-----------------------------------
mk/tools/replace.mk | 26 ++++++++++++++++++++++----
3 files changed, 40 insertions(+), 40 deletions(-)
diffs (139 lines):
diff -r 9d7c075783a9 -r bcf5032a55dc mk/tools/bsd.tools.mk
--- a/mk/tools/bsd.tools.mk Thu May 19 03:50:39 2005 +0000
+++ b/mk/tools/bsd.tools.mk Thu May 19 03:52:23 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.24 2005/05/17 18:34:45 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.25 2005/05/19 03:52:23 jlam Exp $
#
# This Makefile fragment creates tools under ${TOOLS_DIR} that are
# found before similarly-named tools in the system path.
@@ -79,6 +79,7 @@
.include "../../mk/tools/rpcgen.mk"
.include "../../mk/tools/strip.mk"
.include "../../mk/tools/replace.mk"
+.include "../../mk/tools/perl.mk"
.include "../../mk/tools/make.mk"
######################################################################
diff -r 9d7c075783a9 -r bcf5032a55dc mk/tools/perl.mk
--- a/mk/tools/perl.mk Thu May 19 03:50:39 2005 +0000
+++ b/mk/tools/perl.mk Thu May 19 03:52:23 2005 +0000
@@ -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
diff -r 9d7c075783a9 -r bcf5032a55dc mk/tools/replace.mk
--- a/mk/tools/replace.mk Thu May 19 03:50:39 2005 +0000
+++ b/mk/tools/replace.mk Thu May 19 03:52:23 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.84 2005/05/19 02:27:38 jlam Exp $
+# $NetBSD: replace.mk,v 1.85 2005/05/19 03:52:23 jlam Exp $
#
# This Makefile fragment handles "replacements" of system-supplied
# tools with pkgsrc versions.
@@ -43,8 +43,8 @@
# TOOLS_DEPMETHOD.tbl= DEPENDS
#
-# Continue to allow USE_GNU_TOOLS and USE_TBL until packages have been
-# taught to use the new syntax.
+# Continue to allow USE_GNU_TOOLS, USE_TBL, and USE_PERL5 until packages
+# have been taught to use the new syntax.
#
.if defined(USE_GNU_TOOLS) && !empty(USE_GNU_TOOLS)
USE_TOOLS+= ${USE_GNU_TOOLS:S/^awk$/gawk/:S/^m4$/gm4/:S/^make$/gmake/:S/^sed$/gsed/:S/^yacc$/bison/}
@@ -52,6 +52,12 @@
.if defined(USE_TBL) && !empty(USE_TBL:M[yY][eE][sS])
USE_TOOLS+= tbl
.endif
+.if defined(USE_PERL5)
+USE_TOOLS+= perl
+. if empty(USE_PERL5:Mbuild)
+TOOLS_DEPMETHOD.perl?= DEPENDS
+. endif
+.endif
# bison implies "bison-yacc"
.if !empty(USE_TOOLS:Mbison)
@@ -59,7 +65,6 @@
.endif
.include "../../mk/tools/imake.mk"
-.include "../../mk/tools/perl.mk"
######################################################################
@@ -715,6 +720,19 @@
. endif
.endif
+.if !defined(TOOLS_IGNORE.perl) && !empty(USE_TOOLS:Mperl)
+. if !empty(PKGPATH:Mlang/perl58)
+MAKEFLAGS+= TOOLS_IGNORE.perl=
+. elif !empty(_TOOLS_USE_PKGSRC.perl:M[yY][eE][sS])
+. include "../../lang/perl5/version.mk"
+TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lang/perl58
+TOOLS_CREATE+= perl
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.perl=perl
+TOOLS_REAL_CMD.perl= ${TOOLS_PREFIX.perl}/bin/perl
+TOOLS_${_TOOLS_VARNAME.perl}= ${TOOLS_REAL_CMD.perl}
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.pwd) && !empty(_USE_TOOLS:Mpwd)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.pwd=
Home |
Main Index |
Thread Index |
Old Index