[libpar-packer-perl] 01/09: Imported Upstream version 1.021
gregor herrmann
gregoa at debian.org
Tue Sep 16 16:01:32 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libpar-packer-perl.
commit 4bc1b1af518fe77fd214ccfc30498a2238269460
Author: gregor herrmann <gregoa at debian.org>
Date: Tue Sep 16 17:20:38 2014 +0200
Imported Upstream version 1.021
---
ChangeLog | 17 +++++++
META.yml | 20 ++++----
Makefile.PL | 32 +++++++------
inc/Module/Install.pm | 23 +++++----
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 2 +-
inc/Module/Install/Fetch.pm | 6 ++-
inc/Module/Install/Include.pm | 6 ++-
inc/Module/Install/Makefile.pm | 4 +-
inc/Module/Install/Metadata.pm | 106 +++++++++++++++++++++++++++--------------
inc/Module/Install/PAR.pm | 4 +-
inc/Module/Install/Win32.pm | 6 ++-
inc/Module/Install/WriteAll.pm | 6 ++-
lib/PAR/Packer.pm | 14 ++++--
lib/pp.pm | 13 ++++-
myldr/Makefile.PL | 30 +++++++++---
myldr/encode_append.pl | 2 +
myldr/file2c.pl | 3 +-
myldr/par_pl2c.pl | 2 +
myldr/run_with_inc.pl | 3 ++
myldr/sha1.c.PL | 2 +
21 files changed, 209 insertions(+), 94 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ed49426..05b84a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+[Changes for 1.021 - Sep 14, 2014]
+
+Fix #98791: PAR-Packer fails to build with DWIMPerl/Strawberry Perl due to unquoted path name
+
+ - quote the list of embedded file wrt OS native shell
+ - require Win32::ShellQuote on Windows and String::ShellQuote otherwise
+
+[Changes for 1.020 - Aug 24, 2014]
+
+Implement option --xargs for pp:
+
+- splits value of --xargs using Text::ParseWords::shellquote
+- passes result as @ARGV when running script for -x
+- bump required version of Module::ScanDeps to the first to implement this
+
+Update to Module::Install 1.10
+
[Changes for 1.019 - July 7, 2014]
Fix RT #96288: PAR::Packer unable to build under Win32/ActivePerl v5.14.2
diff --git a/META.yml b/META.yml
index 340c480..7d13dd3 100644
--- a/META.yml
+++ b/META.yml
@@ -4,12 +4,13 @@ author:
- 'Audrey Tang <cpan at audreyt.org>'
build_requires:
ExtUtils::MakeMaker: 6.59
+ String::ShellQuote: 0
configure_requires:
ExtUtils::Embed: 0
ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.08'
+generated_by: 'Module::Install version 1.10'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -39,7 +40,7 @@ provides:
file: lib/PAR/Filter/PodStrip.pm
PAR::Packer:
file: lib/PAR/Packer.pm
- version: '1.019'
+ version: '1.021'
PAR::StrippedPARL::Base:
file: lib/PAR/StrippedPARL/Base.pm
version: '0.975'
@@ -53,16 +54,17 @@ recommends:
Tk::EntryCheck: 0
Tk::Getopt: 0
requires:
- Archive::Zip: 1
- Compress::Zlib: 1.3
- File::Temp: 0.05
- Getopt::ArgvFile: 1.07
+ Archive::Zip: '1.00'
+ Compress::Zlib: '1.30'
+ File::Temp: '0.05'
+ Getopt::ArgvFile: '1.07'
IO::Compress::Gzip: 0
- Module::ScanDeps: 1.09
+ Module::ScanDeps: '1.15'
PAR: '1.005'
- PAR::Dist: 0.22
+ PAR::Dist: '0.22'
+ Text::ParseWords: 0
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
repository: http://svn.openfoundry.org/par/PAR-Packer/trunk
-version: '1.019'
+version: '1.021'
diff --git a/Makefile.PL b/Makefile.PL
index 634e4f6..d1e93f4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,26 +9,30 @@ all_from 'lib/PAR/Packer.pm';
perl_version '5.008001';
configure_requires 'ExtUtils::Embed';
-requires 'File::Temp' => 0.05;
-requires 'Compress::Zlib' => ($^O eq 'MSWin32') ? 1.16 : 1.30;
+build_requires $^O eq 'MSWin32'
+ ? ('Win32::ShellQuote' => 0)
+ : ('String::ShellQuote' => 0);
+requires 'File::Temp' => '0.05';
+requires 'Compress::Zlib' => ($^O eq 'MSWin32') ? '1.16' : '1.30';
requires 'IO::Compress::Gzip' => 0;
-requires 'Archive::Zip' => 1.00;
-requires 'Module::ScanDeps' => 1.09;
-requires 'PAR::Dist' => 0.22;
-requires 'PAR' => '1.005';
-requires 'Getopt::ArgvFile' => 1.07;
+requires 'Archive::Zip' => '1.00';
+requires 'Module::ScanDeps' => '1.15';
+requires 'PAR::Dist' => '0.22';
+requires 'PAR' => '1.005';
+requires 'Text::ParseWords' => 0;
+requires 'Getopt::ArgvFile' => '1.07';
if ($^O eq 'MSWin32') {
- requires 'Parse::Binary' => 0.04;
- requires 'Win32::Exe' => 0.17;
- requires 'Win32::Process';
+ requires 'Parse::Binary' => '0.04';
+ requires 'Win32::Exe' => '0.17';
+ requires 'Win32::Process' => 0;
}
# for tkpp only
-recommends 'Tk' => 0;
-recommends 'Tk::ColoredButton' => 0;
-recommends 'Tk::EntryCheck' => 0;
-recommends 'Tk::Getopt' => 0;
+recommends 'Tk' => 0;
+recommends 'Tk::ColoredButton' => 0;
+recommends 'Tk::EntryCheck' => 0;
+recommends 'Tk::Getopt' => 0;
if (can_use('Crypt::OpenPGP') or can_run('gpg')) {
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 7680c84..99f677c 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -17,7 +17,7 @@ package Module::Install;
# 3. The ./inc/ version of Module::Install loads
# }
-use 5.005;
+use 5.006;
use strict 'vars';
use Cwd ();
use File::Find ();
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.08';
+ $VERSION = '1.10';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -156,10 +156,10 @@ END_DIE
sub autoload {
my $self = shift;
my $who = $self->_caller;
- my $cwd = Cwd::cwd();
+ my $cwd = Cwd::getcwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
- my $pwd = Cwd::cwd();
+ my $pwd = Cwd::getcwd();
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
@@ -239,7 +239,7 @@ sub new {
# ignore the prefix on extension modules built from top level.
my $base_path = Cwd::abs_path($FindBin::Bin);
- unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) {
+ unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) {
delete $args{prefix};
}
return $args{_self} if $args{_self};
@@ -338,7 +338,7 @@ sub find_extensions {
if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) {
my $content = Module::Install::_read($subpath . '.pm');
my $in_pod = 0;
- foreach ( split //, $content ) {
+ foreach ( split /\n/, $content ) {
$in_pod = 1 if /^=\w/;
$in_pod = 0 if /^=cut/;
next if ($in_pod || /^=cut/); # skip pod text
@@ -434,7 +434,7 @@ END_OLD
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
-sub _version ($) {
+sub _version {
my $s = shift || 0;
my $d =()= $s =~ /(\.)/g;
if ( $d >= 2 ) {
@@ -450,12 +450,12 @@ sub _version ($) {
return $l + 0;
}
-sub _cmp ($$) {
+sub _cmp {
_version($_[1]) <=> _version($_[2]);
}
# Cloned from Params::Util::_CLASS
-sub _CLASS ($) {
+sub _CLASS {
(
defined $_[0]
and
@@ -467,4 +467,7 @@ sub _CLASS ($) {
1;
-# Copyright 2008 - 2012 Adam Kennedy.
+
+__END__
+
+#line 485
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 3e63345..5e25388 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 93f248d..d49f8d6 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index ecc0d53..648b569 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -91,3 +91,7 @@ END_FTP
}
1;
+
+__END__
+
+#line 109
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index fc86e23..cd5ca72 100644
--- a/inc/Module/Install/Include.pm
+++ b/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -32,3 +32,7 @@ sub auto_include_dependent_dists {
}
1;
+
+__END__
+
+#line 50
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index c0978a4..170c3fa 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -133,7 +133,7 @@ sub makemaker_args {
return $args;
}
-# For mm args that take multiple space-seperated args,
+# For mm args that take multiple space-separated args,
# append an argument to the current list.
sub makemaker_append {
my $self = shift;
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index e4112f8..1f48315 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -347,7 +347,7 @@ sub name_from {
^ \s*
package \s*
([\w:]+)
- \s* ;
+ [\s|;]*
/ixms
) {
my ($name, $module_name) = ($1, $1);
@@ -453,24 +453,40 @@ sub author_from {
#Stolen from M::B
my %license_urls = (
- perl => 'http://dev.perl.org/licenses/',
- apache => 'http://apache.org/licenses/LICENSE-2.0',
- apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1',
- artistic => 'http://opensource.org/licenses/artistic-license.php',
- artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php',
- lgpl => 'http://opensource.org/licenses/lgpl-license.php',
- lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php',
- lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html',
- bsd => 'http://opensource.org/licenses/bsd-license.php',
- gpl => 'http://opensource.org/licenses/gpl-license.php',
- gpl2 => 'http://opensource.org/licenses/gpl-2.0.php',
- gpl3 => 'http://opensource.org/licenses/gpl-3.0.html',
- mit => 'http://opensource.org/licenses/mit-license.php',
- mozilla => 'http://opensource.org/licenses/mozilla1.1.php',
open_source => undef,
unrestricted => undef,
restrictive => undef,
unknown => undef,
+
+## from Software-License - should we be using S-L instead ?
+# duplicates commeted out, see hack above ^^
+# open_source => 'http://www.gnu.org/licenses/agpl-3.0.txt',
+# apache => 'http://www.apache.org/licenses/LICENSE-1.1',
+ apache => 'http://www.apache.org/licenses/LICENSE-2.0.txt',
+ artistic => 'http://www.perlfoundation.org/artistic_license_1_0',
+ artistic_2 => 'http://www.perlfoundation.org/artistic_license_2_0',
+ bsd => 'http://opensource.org/licenses/BSD-3-Clause',
+# unrestricted => 'http://creativecommons.org/publicdomain/zero/1.0/',
+# open_source => 'http://www.freebsd.org/copyright/freebsd-license.html',
+# open_source => 'http://www.gnu.org/licenses/fdl-1.2.txt',
+# open_source => 'http://www.gnu.org/licenses/fdl-1.3.txt',
+# gpl => 'http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt',
+# gpl => 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt',
+ gpl => 'http://www.gnu.org/licenses/gpl-3.0.txt',
+# lgpl => 'http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt',
+ lgpl => 'http://www.gnu.org/licenses/lgpl-3.0.txt',
+ mit => 'http://www.opensource.org/licenses/mit-license.php',
+# mozilla => 'http://www.mozilla.org/MPL/MPL-1.0.txt',
+# mozilla => 'http://www.mozilla.org/MPL/MPL-1.1.txt',
+ mozilla => 'http://www.mozilla.org/MPL/2.0/index.txt',
+# restrictive => '',
+# open_source => 'http://www.openssl.org/source/license.html',
+ perl => 'http://dev.perl.org/licenses/',
+# open_source => 'http://www.opensource.org/licenses/postgresql',
+# open_source => 'http://trolltech.com/products/qt/licenses/licensing/qpl',
+# unrestricted => 'http://h71000.www7.hp.com/doc/83final/BA554_90007/apcs02.html',
+# open_source => 'http://www.openoffice.org/licenses/sissl_license.html',
+# open_source => 'http://www.zlib.net/zlib_license.html',
);
sub license {
@@ -511,31 +527,43 @@ sub __extract_license {
my @phrases = (
'(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1,
'(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
- 'Artistic and GPL' => 'perl', 1,
- 'GNU general public license' => 'gpl', 1,
- 'GNU public license' => 'gpl', 1,
- 'GNU lesser general public license' => 'lgpl', 1,
- 'GNU lesser public license' => 'lgpl', 1,
- 'GNU library general public license' => 'lgpl', 1,
- 'GNU library public license' => 'lgpl', 1,
- 'GNU Free Documentation license' => 'unrestricted', 1,
- 'GNU Affero General Public License' => 'open_source', 1,
+
+ # the following are relied on by the test system even if they are wrong :(
'(?:Free)?BSD license' => 'bsd', 1,
'Artistic license 2\.0' => 'artistic_2', 1,
- 'Artistic license' => 'artistic', 1,
- 'Apache (?:Software )?license' => 'apache', 1,
- 'GPL' => 'gpl', 1,
'LGPL' => 'lgpl', 1,
- 'BSD' => 'bsd', 1,
- 'Artistic' => 'artistic', 1,
'MIT' => 'mit', 1,
- 'Mozilla Public License' => 'mozilla', 1,
- 'Q Public License' => 'open_source', 1,
- 'OpenSSL License' => 'unrestricted', 1,
- 'SSLeay License' => 'unrestricted', 1,
- 'zlib License' => 'open_source', 1,
- 'proprietary' => 'proprietary', 0,
+
+## from Software-License
+ 'The GNU Affero General Public License, Version 3, November 2007' => 'open_source', 1,
+ 'The Apache Software License, Version 1.1' => 'apache', 1,
+ 'The Apache License, Version 2.0, January 2004' => 'apache', 1,
+ 'The Artistic License 1.0' => 'artistic', 1,
+ 'The Artistic License 2.0 (GPL Compatible)' => 'artistic_2', 1,
+ 'The (three-clause) BSD License' => 'bsd', 1,
+ 'CC0 License' => 'unrestricted', 1,
+ 'The (two-clause) FreeBSD License' => 'open_source', 1,
+ 'GNU Free Documentation License v1.2' => 'open_source', 1,
+ 'GNU Free Documentation License v1.3' => 'open_source', 1,
+ 'The GNU General Public License, Version 1, February 1989' => 'gpl', 1,
+ 'The GNU General Public License, Version 2, June 1991' => 'gpl', 1,
+ 'The GNU General Public License, Version 3, June 2007' => 'gpl', 1,
+ 'The GNU Lesser General Public License, Version 2.1, February 1999' => 'lgpl', 1,
+ 'The GNU Lesser General Public License, Version 3, June 2007' => 'lgpl', 1,
+ 'The MIT (X11) License' => 'mit', 1,
+ 'The Mozilla Public License 1.0' => 'mozilla', 1,
+ 'The Mozilla Public License 1.1' => 'mozilla', 1,
+ 'Mozilla Public License Version 2.0' => 'mozilla', 1,
+ '"No License" License' => 'restrictive', 1,
+ 'OpenSSL License' => 'open_source', 1,
+ 'the same terms as the perl 5 programming language system itself' => 'perl', 1,
+ 'The PostgreSQL License' => 'open_source', 1,
+ 'The Q Public License, Version 1.0' => 'open_source', 1,
+ 'Original SSLeay License' => 'unrestricted', 1,
+ 'Sun Internet Standards Source License (SISSL)' => 'open_source', 1,
+ 'The zlib License' => 'open_source', 1,
);
+
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
$pattern =~ s#\s+#\\s+#gs;
if ( $license_text =~ /\b$pattern\b/i ) {
@@ -705,7 +733,7 @@ sub _write_mymeta_data {
my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
my $meta = $yaml[0];
- # Overwrite the non-configure dependency hashs
+ # Overwrite the non-configure dependency hashes
delete $meta->{requires};
delete $meta->{build_requires};
delete $meta->{recommends};
@@ -720,3 +748,7 @@ sub _write_mymeta_data {
}
1;
+
+__END__
+
+#line 766
diff --git a/inc/Module/Install/PAR.pm b/inc/Module/Install/PAR.pm
index 94e42b6..a6053e7 100644
--- a/inc/Module/Install/PAR.pm
+++ b/inc/Module/Install/PAR.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -135,7 +135,7 @@ sub make_par {
my ($self, $file) = @_;
unlink $file if -f $file;
- unless ( eval { require PAR::Dist; PAR::Dist->VERSION >= 0.03 } ) {
+ unless ( eval { require PAR::Dist; PAR::Dist->VERSION(0.03) } ) {
warn "Please install PAR::Dist 0.03 or above first.";
return;
}
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index e529382..0b7cd38 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -62,3 +62,7 @@ END_MESSAGE
}
1;
+
+__END__
+
+#line 80
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 2c74308..53af6d2 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.08';
+ $VERSION = '1.10';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
@@ -61,3 +61,7 @@ sub WriteAll {
}
1;
+
+__END__
+
+#line 79
diff --git a/lib/PAR/Packer.pm b/lib/PAR/Packer.pm
index c42c3f1..9f8a9c7 100644
--- a/lib/PAR/Packer.pm
+++ b/lib/PAR/Packer.pm
@@ -3,7 +3,7 @@ use 5.008001;
use strict;
use warnings;
-our $VERSION = '1.019';
+our $VERSION = '1.021';
=head1 NAME
@@ -46,6 +46,7 @@ use constant OPTIONS => {
'e|eval:s' => 'Packing one-liner',
'E|evalfeature:s'=> 'Packing one-liner with new syntactic features',
'x|execute' => 'Execute code to get dependencies',
+ 'xargs:s' => 'Args to pass when executing code',
'X|exclude:s@' => 'Exclude modules',
'f|filter:s@' => 'Input filters for scripts',
'g|gui' => 'No console window',
@@ -355,7 +356,7 @@ sub _create_valid_hash {
return () if (%$hashout);
foreach my $key (keys(%$hashin)) {
- my (@keys) = ($key =~ /\|/) ? ($key =~ /(?<!:)(\w+)/g) : ($key);
+ my (@keys) = $key =~ /(?<!:)(\w+)/g;
@{$hashout}{@keys} = ($hashin->{$key}) x @keys;
}
}
@@ -732,6 +733,11 @@ sub pack_manifest_hash {
# Search for scannable code in all -I'd paths
push @Module::ScanDeps::IncludeLibs, @{$opt->{I}} if $opt->{I};
+ if ($opt->{x} && defined $opt->{xargs}) {
+ require Text::ParseWords;
+ $opt->{x} = [ Text::ParseWords::shellwords($opt->{xargs}) ];
+ }
+
my $scan_dispatch =
$opt->{n}
? $self->_obj_function($fe, 'scan_deps_runtime')
@@ -754,7 +760,7 @@ sub pack_manifest_hash {
%skip = map { $_, 1 } map &$inc_find($_), @exclude;
%skip = (%skip, map { $_, 1 } @SharedLibs);
- &$add_deps(
+ $add_deps->(
rv => \%map,
modules => \@modules,
skip => \%skip,
@@ -772,7 +778,7 @@ sub pack_manifest_hash {
my $size = 0;
my $old_member;
- if ($opt->{'m'} and -e $par_file) {
+ if ($opt->{m} and -e $par_file) {
my $tmpzip = Archive::Zip->new();
$tmpzip->read($par_file);
diff --git a/lib/pp.pm b/lib/pp.pm
index ea7f9f0..602c558 100644
--- a/lib/pp.pm
+++ b/lib/pp.pm
@@ -21,13 +21,16 @@ use Getopt::Long qw(:config no_ignore_case);
sub go {
my $class = shift;
- unshift(@ARGV, split / +/, $ENV{PP_OPTS}) if $ENV{PP_OPTS};
+ if ($ENV{PP_OPTS}) {
+ require Text::ParseWords;
+ unshift @ARGV, Text::ParseWords::shellwords($ENV{PP_OPTS});
+ }
my %opt;
GetOptions( \%opt, PAR::Packer->options, 'h|help', 'V|version' );
help() if $opt{h};
version() if $opt{V};
-
+
local $Module::ScanDeps::ScanFileRE = qr/./;
App::Packer::PAR->new(
@@ -247,6 +250,12 @@ Behaves just like C<-e>, except that it implicitly enables all optional features
Run C<perl inputfile> to determine additonal run-time dependencies.
+=item B<--xargs>=I<STRING>
+
+If B<-x> is given, splits the C<STRING> using the function
+C<shellwords> from L<Text::ParseWords> and passes the result
+as C<@ARGV> when running C<perl inputfile>.
+
=item B<-X>, B<--exclude>=I<MODULE>
Exclude the given module from the dependency search path and from the
diff --git a/myldr/Makefile.PL b/myldr/Makefile.PL
index b210e96..85e18ff 100644
--- a/myldr/Makefile.PL
+++ b/myldr/Makefile.PL
@@ -1,10 +1,11 @@
-#!/usr/bin/perl -w
+#!perl
# Copyright 2002-2009 by Audrey Tang.
# Copyright (c) 2002 Mattia Barbon.
# This package is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
use strict;
+use warnings;
use Config;
use File::Spec::Functions ':ALL';
use ExtUtils::Embed;
@@ -78,6 +79,17 @@ my $boot_exe_link = catfile('.', "boot$link_exe");
my $parl_exe = "parl$exe";
my $parldyn_exe = "parldyn$exe";
+# quote(): quotes a list of strings to be passed to a native shell
+if ($^O eq 'MSWin32')
+{
+ require Win32::ShellQuote;
+ *quote = sub { join(" ", Win32::ShellQuote::quote_system(@_)) };
+}
+else
+{
+ require String::ShellQuote;
+ *quote = \&String::ShellQuote::shell_quote;
+}
my( $out, $ccdebug, $lddebug, $warn, $rm, $mv, $mt_cmd );
@@ -243,16 +255,20 @@ sub find_dll
my ($libgcc, $libstdcpp);
if ($dynperl and $^O eq 'MSWin32'
- and defined $Config{gccversion} # gcc version 4.x or above was used
+ and defined $Config{gccversion} # gcc version >= 4.x was used
and $Config{gccversion} =~ m{\A(\d+)}ms && $1 >= 4) {
$libgcc = find_dll("libgcc_*.$Config{so}");
+}
+if ($ld =~ /(\b|-)g\+\+(-.*)?(\.exe)?$/) { # g++ was used to link
$libstdcpp = find_dll("libstdc++*.$Config{so}");
}
-my @embedded_files = ($par_exe); # must come first
-push @embedded_files, $libperl;
-push @embedded_files, $libgcc if defined $libgcc;
-push @embedded_files, $libstdcpp if defined $libstdcpp;
+my $embedded_files = quote(grep { defined }
+ $par_exe, # must come first
+ $libperl,
+ $libgcc,
+ $libstdcpp
+);
my @strippedparl = qw( Static.pm );
push @strippedparl, qw( Dynamic.pm ) if $dynperl;
@@ -359,7 +375,7 @@ $boot_exe: boot$o
$mt_cmd
boot_embedded_files.c: $par_exe
- \$(PERLRUN) $f2c -c $chunk_size @embedded_files > \$@
+ \$(PERLRUN) $f2c -c $chunk_size $embedded_files > \$@
Dynamic.pm: Dynamic.in $par_exe
\$(PERLRUN) encode_append.pl Dynamic.in $par_exe Dynamic.pm
diff --git a/myldr/encode_append.pl b/myldr/encode_append.pl
index d803936..bc9ed86 100644
--- a/myldr/encode_append.pl
+++ b/myldr/encode_append.pl
@@ -1,3 +1,5 @@
+#!perl
+
use strict;
use warnings;
# Used in myldr/Makefile.PL / myldr/Makefile.
diff --git a/myldr/file2c.pl b/myldr/file2c.pl
index dbfd548..ed9efd8 100644
--- a/myldr/file2c.pl
+++ b/myldr/file2c.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!perl
# Copyright (c) 2002 Mattia Barbon.
# Copyright (c) 2002 Audrey Tang.
@@ -6,6 +6,7 @@
# modify it under the same terms as Perl itself.
use strict;
+use warnings;
use FindBin;
use lib "$FindBin::Bin/../lib";
use File::Basename;
diff --git a/myldr/par_pl2c.pl b/myldr/par_pl2c.pl
index b17fa01..9ef68f9 100644
--- a/myldr/par_pl2c.pl
+++ b/myldr/par_pl2c.pl
@@ -1,3 +1,5 @@
+#!perl
+
use strict;
use warnings;
diff --git a/myldr/run_with_inc.pl b/myldr/run_with_inc.pl
index 46672de..aeb5272 100644
--- a/myldr/run_with_inc.pl
+++ b/myldr/run_with_inc.pl
@@ -1,5 +1,8 @@
#!perl
+use strict;
+use warnings;
+
use File::Temp;
$ENV{PAR_TMPDIR} = File::Temp::tempdir(TMPDIR => 1, CLEANUP => 1);
diff --git a/myldr/sha1.c.PL b/myldr/sha1.c.PL
index 2bf0e26..e108860 100644
--- a/myldr/sha1.c.PL
+++ b/myldr/sha1.c.PL
@@ -1,3 +1,5 @@
+#!perl
+
use strict;
use warnings;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpar-packer-perl.git
More information about the Pkg-perl-cvs-commits
mailing list