From: Marcus Holland-Moritz Date: Mon, 3 Jul 2006 21:40:58 +0000 (+0000) Subject: Upgrade to Devel::PPPort 3.08_07 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78b4ff7943d1beab12fcb32670f2600e84706dff;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Devel::PPPort 3.08_07 p4raw-id: //depot/perl@28474 --- diff --git a/MANIFEST b/MANIFEST index e87cb13..0541b05 100644 --- a/MANIFEST +++ b/MANIFEST @@ -448,9 +448,10 @@ ext/Devel/PPPort/parts/todo/5009001 Devel::PPPort todo file ext/Devel/PPPort/parts/todo/5009002 Devel::PPPort todo file ext/Devel/PPPort/parts/todo/5009003 Devel::PPPort todo file ext/Devel/PPPort/parts/todo/5009004 Devel::PPPort todo file +ext/Devel/PPPort/PPPort.xs Devel::PPPort dummy PPPort.xs ext/Devel/PPPort/ppport_h.PL Devel::PPPort ppport.h writer ext/Devel/PPPort/PPPort_pm.PL Devel::PPPort PPPort.pm writer -ext/Devel/PPPort/PPPort_xs.PL Devel::PPPort PPPort.xs writer +ext/Devel/PPPort/PPPort_xs.PL Devel::PPPort RealPPPort.xs writer ext/Devel/PPPort/README Devel::PPPort Readme ext/Devel/PPPort/soak Devel::PPPort Test Harness to run under various Perls ext/Devel/PPPort/t/call.t Devel::PPPort test file diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index 291b451..fa62091 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,11 @@ +3.08_07 - 2006-07-03 + + * fix cpan #20179: Licensing information for PPPort is + unclear + * only --unstrip a stripped ppport.h if an appropriate + version of Devel::PPPort is installed + * add a --version option to ppport.h + 3.08_06 - 2006-06-25 * fix breakage on MSWin32, where generating XS files on diff --git a/ext/Devel/PPPort/Makefile.PL b/ext/Devel/PPPort/Makefile.PL index bb0aeb2..a73ebcf 100644 --- a/ext/Devel/PPPort/Makefile.PL +++ b/ext/Devel/PPPort/Makefile.PL @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 24 $ +# $Revision: 25 $ # $Author: mhx $ -# $Date: 2006/06/25 06:30:56 +0200 $ +# $Date: 2006/07/03 21:48:31 +0200 $ # ################################################################################ # @@ -36,20 +36,20 @@ WriteMakefile( VERSION_FROM => 'PPPort_pm.PL', PM => { 'PPPort.pm' => '$(INST_LIBDIR)/PPPort.pm' }, H => [ qw(ppport.h) ], - OBJECT => '$(BASEEXT)$(OBJ_EXT) $(O_FILES)', + OBJECT => 'RealPPPort$(OBJ_EXT) $(O_FILES)', XSPROTOARG => '-noprototypes', CONFIGURE => \&configure, ); sub configure { - my @clean = qw{ $(H_FILES) PPPort.xs PPPort.c }; + my @clean = qw{ $(H_FILES) RealPPPort.xs RealPPPort.c }; my %depend = ('$(OBJECT)' => '$(H_FILES)'); my @C_FILES = qw{ module2.c module3.c }, my %PL_FILES = ( 'ppport_h.PL' => 'ppport.h', 'PPPort_pm.PL' => 'PPPort.pm', - 'PPPort_xs.PL' => 'PPPort.xs', + 'PPPort_xs.PL' => 'RealPPPort.xs', ); my @moreopts; @@ -84,7 +84,7 @@ sub configure return { C => \@C_FILES, - XS => { 'PPPort.xs' => 'PPPort.c' }, + XS => { 'RealPPPort.xs' => 'RealPPPort.c' }, PL_FILES => \%PL_FILES, depend => \%depend, clean => { FILES => "@clean" }, @@ -99,14 +99,22 @@ sub MY::postamble $post .= <<'POSTAMBLE'; purge_all: realclean - @$(RM_F) PPPort.pm PPPort.xs t/*.t + @$(RM_F) PPPort.pm t/*.t -regen: +regen_pm: $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) PPPort_pm.PL + +regen_xs: $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) PPPort_xs.PL + +regen_tests: $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) mktests.PL + +regen_h: $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) ppport_h.PL +regen: regen_pm regen_xs regen_tests regen_h + POSTAMBLE return $post; } diff --git a/ext/Devel/PPPort/PPPort.xs b/ext/Devel/PPPort/PPPort.xs new file mode 100644 index 0000000..2586824 --- /dev/null +++ b/ext/Devel/PPPort/PPPort.xs @@ -0,0 +1,3 @@ +This is just a dummy file to let Configure know that Devel::PPPort +is an XS module. The real XS code is autogenerated from PPPort_xs.PL +when this module is built and will go to RealPPPort.xs. diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index 8054667..15f9697 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -498,7 +498,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_07 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { diff --git a/ext/Devel/PPPort/PPPort_xs.PL b/ext/Devel/PPPort/PPPort_xs.PL index d5ad6c3..3ea1ee5 100644 --- a/ext/Devel/PPPort/PPPort_xs.PL +++ b/ext/Devel/PPPort/PPPort_xs.PL @@ -1,12 +1,12 @@ ################################################################################ # -# PPPort_xs.PL -- generate PPPort.xs +# PPPort_xs.PL -- generate RealPPPort.xs # ################################################################################ # -# $Revision: 9 $ +# $Revision: 10 $ # $Author: mhx $ -# $Date: 2006/01/14 18:07:55 +0100 $ +# $Date: 2006/07/03 21:48:33 +0200 $ # ################################################################################ # @@ -68,7 +68,7 @@ for $sec (keys %SECTION) { $data =~ s/^__\U$sec\E__$/$code/m; } -open FH, ">PPPort.xs" or die "PPPort.xs: $!\n"; +open FH, ">RealPPPort.xs" or die "RealPPPort.xs: $!\n"; print FH $data; close FH; @@ -85,9 +85,9 @@ __DATA__ * ******************************************************************************** * -* $Revision: 9 $ +* $Revision: 10 $ * $Author: mhx $ -* $Date: 2006/01/14 18:07:55 +0100 $ +* $Date: 2006/07/03 21:48:33 +0200 $ * ******************************************************************************** * diff --git a/ext/Devel/PPPort/parts/inc/ppphbin b/ext/Devel/PPPort/parts/inc/ppphbin index 62dac9b..4cab9f7 100644 --- a/ext/Devel/PPPort/parts/inc/ppphbin +++ b/ext/Devel/PPPort/parts/inc/ppphbin @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 32 $ +## $Revision: 34 $ ## $Author: mhx $ -## $Date: 2006/05/21 23:14:16 +0200 $ +## $Date: 2006/07/03 10:21:54 +0200 $ ## ################################################################################ ## @@ -21,6 +21,8 @@ use strict; +my $VERSION = __VERSION__; + my %opt = ( quiet => 0, diag => 1, @@ -29,6 +31,7 @@ my %opt = ( cplusplus => 0, filter => 1, strip => 0, + version => 0, ); my($ppport) = $0 =~ /([\w.]+)$/; @@ -38,7 +41,7 @@ my $HS = "[ \t]"; # horizontal whitespace eval { require Getopt::Long; Getopt::Long::GetOptions(\%opt, qw( - help quiet diag! filter! hints! changes! cplusplus strip + help quiet diag! filter! hints! changes! cplusplus strip version patch=s copy=s diff=s compat-version=s list-provided list-unsupported api-info=s )) or usage(); @@ -49,6 +52,11 @@ if ($@ and grep /^-/, @ARGV) { die "Getopt::Long not found. Please don't use any options.\n"; } +if ($opt{version}) { + print "This is $0 $VERSION.\n"; + exit 0; +} + usage() if $opt{help}; strip() if $opt{strip}; @@ -714,11 +722,18 @@ ENDUSAGE sub strip { my $self = do { local(@ARGV,$/)=($0); <> }; - $self =~ s/^$HS+Do NOT edit.*?(?=^-)//ms; + my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms; + $copy =~ s/^(?=\S+)/ /gms; + $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms; $self =~ s/^SKIP.*(?=^__DATA__)/SKIP if (\@ARGV && \$ARGV[0] eq '--unstrip') { eval { require Devel::PPPort }; \$@ and die "Cannot require Devel::PPPort, please install.\\n"; + if (\$Devel::PPPort::VERSION < $VERSION) { + die "$0 was originally generated with Devel::PPPort $VERSION.\\n" + . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n" + . "Please install a newer version, or --unstrip will not work.\\n"; + } Devel::PPPort::WriteFile(\$0); exit 0; } diff --git a/ext/Devel/PPPort/parts/inc/ppphdoc b/ext/Devel/PPPort/parts/inc/ppphdoc index 0b79cc0..e7321f2 100644 --- a/ext/Devel/PPPort/parts/inc/ppphdoc +++ b/ext/Devel/PPPort/parts/inc/ppphdoc @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 26 $ +## $Revision: 27 $ ## $Author: mhx $ -## $Date: 2006/05/21 23:14:18 +0200 $ +## $Date: 2006/07/03 10:21:55 +0200 $ ## ################################################################################ ## @@ -41,6 +41,8 @@ ppport.h - Perl/Pollution/Portability version __VERSION__ --help show short help + --version show version + --patch=file write one patch file with changes --copy=suffix write changed copies with suffix --diff=program use diff program and options @@ -55,7 +57,7 @@ ppport.h - Perl/Pollution/Portability version __VERSION__ --nofilter don't filter input files --strip strip all script and doc functionality from - ppport.h (this, obviously, cannot be undone) + ppport.h --list-provided list provided API --list-unsupported list unsupported API @@ -72,6 +74,10 @@ installations back to __MIN_PERL__, and has been tested up to __MAX_PERL__. Display a brief usage summary. +=head2 --version + +Display the version of F. + =head2 --patch=I If this option is given, a single patch file will be created if @@ -140,6 +146,10 @@ This reduces the size of F dramatically and may be useful if you want to include F in smaller modules without increasing their distribution size too much. +The stripped F will have a C<--unstrip> option that allows +you to undo the stripping, but only if an appropriate C +module is installed. + =head2 --list-provided Lists the API elements for which compatibility is provided by diff --git a/ext/Devel/PPPort/parts/inc/ppphtest b/ext/Devel/PPPort/parts/inc/ppphtest index 41beb7a..80389a5 100644 --- a/ext/Devel/PPPort/parts/inc/ppphtest +++ b/ext/Devel/PPPort/parts/inc/ppphtest @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 31 $ +## $Revision: 33 $ ## $Author: mhx $ -## $Date: 2006/05/24 09:25:00 +0200 $ +## $Date: 2006/07/03 22:54:26 +0200 $ ## ################################################################################ ## @@ -15,11 +15,11 @@ ## ################################################################################ -=tests plan => 202 +=tests plan => 203 BEGIN { if ($ENV{'SKIP_SLOW_TESTS'}) { - for (1 .. 202) { + for (1 .. 203) { skip("skip: SKIP_SLOW_TESTS", 0); } exit 0; @@ -195,6 +195,9 @@ my $o = ppport(qw(--help)); ok($o =~ /^Usage:.*ppport\.h/m); ok($o =~ /--help/m); +$o = ppport(qw(--version)); +ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/); + $o = ppport(qw(--nochanges)); ok($o =~ /^Scanning.*test\.xs/mi); ok($o =~ /Analyzing.*test\.xs/mi); diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak index e4ccd3e..02c631b 100644 --- a/ext/Devel/PPPort/soak +++ b/ext/Devel/PPPort/soak @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_07 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my $verbose = 0; diff --git a/ext/Devel/PPPort/t/ppphtest.t b/ext/Devel/PPPort/t/ppphtest.t index 6148195..9a43c5d 100644 --- a/ext/Devel/PPPort/t/ppphtest.t +++ b/ext/Devel/PPPort/t/ppphtest.t @@ -26,9 +26,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (202) { + if (203) { load(); - plan(tests => 202); + plan(tests => 203); } } @@ -46,7 +46,7 @@ package main; BEGIN { if ($ENV{'SKIP_SLOW_TESTS'}) { - for (1 .. 202) { + for (1 .. 203) { skip("skip: SKIP_SLOW_TESTS", 0); } exit 0; @@ -222,6 +222,9 @@ my $o = ppport(qw(--help)); ok($o =~ /^Usage:.*ppport\.h/m); ok($o =~ /--help/m); +$o = ppport(qw(--version)); +ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/); + $o = ppport(qw(--nochanges)); ok($o =~ /^Scanning.*test\.xs/mi); ok($o =~ /Analyzing.*test\.xs/mi);