diff options
author | jlam <jlam> | 2005-05-19 03:52:23 +0000 |
---|---|---|
committer | jlam <jlam> | 2005-05-19 03:52:23 +0000 |
commit | ae4e7aa19862b0e046af61e046ab695f1f6ad21d (patch) | |
tree | f8337cb96b0706387ff846bf53828e16932983e7 | |
parent | 327d9592ce8d05a7c70f7be5e3d4fa38167f00c7 (diff) | |
download | pkgsrc-ae4e7aa19862b0e046af61e046ab695f1f6ad21d.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.
-rw-r--r-- | mk/tools/bsd.tools.mk | 3 | ||||
-rw-r--r-- | mk/tools/perl.mk | 51 | ||||
-rw-r--r-- | mk/tools/replace.mk | 26 |
3 files changed, 40 insertions, 40 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk index 7b3807b921b..31130a7f6ad 100644 --- a/mk/tools/bsd.tools.mk +++ b/mk/tools/bsd.tools.mk @@ -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 @@ USE_TOOLS?= # empty .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 --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 diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index 43807324a83..b065a7d2b95 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -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 @@ USE_TOOLS+= ${USE_GNU_TOOLS:S/^awk$/gawk/:S/^m4$/gm4/:S/^make$/gmake/:S/^sed$/gs .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 @@ USE_TOOLS+= bison-yacc .endif .include "../../mk/tools/imake.mk" -.include "../../mk/tools/perl.mk" ###################################################################### @@ -715,6 +720,19 @@ TOOLS_${_TOOLS_VARNAME.pax}= ${TOOLS_REAL_CMD.pax} . 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= |