summaryrefslogtreecommitdiff
path: root/ext/Devel
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-04-13 13:12:15 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-04-13 13:12:15 +0000
commit1d175cda9de63cbbe9590bd265087a1a9361c3c6 (patch)
treefbfabc5a6f97999f35404c24189ee3f2cbf5e572 /ext/Devel
parenta2e578dad2f237dd09854deb3a557d2eeeb56a83 (diff)
downloadperl-1d175cda9de63cbbe9590bd265087a1a9361c3c6.tar.gz
Upgrade to Devel::PPPort 3.13_02
p4raw-id: //depot/perl@33672
Diffstat (limited to 'ext/Devel')
-rwxr-xr-xext/Devel/PPPort/Changes7
-rw-r--r--ext/Devel/PPPort/PPPort_pm.PL2
-rw-r--r--ext/Devel/PPPort/devel/buildperl.pl52
-rw-r--r--ext/Devel/PPPort/parts/inc/format22
-rw-r--r--ext/Devel/PPPort/parts/inc/misc6
-rw-r--r--ext/Devel/PPPort/soak2
-rw-r--r--ext/Devel/PPPort/t/format.t55
7 files changed, 127 insertions, 19 deletions
diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes
index fb1face2b8..1aa8ab74f1 100755
--- a/ext/Devel/PPPort/Changes
+++ b/ext/Devel/PPPort/Changes
@@ -1,3 +1,10 @@
+3.13_02 - 2008-04-13
+
+ * fix NV[efg]f format string macros for perl-5.6.0 built
+ using -Duselongdouble (thanks to Zefram for figuring this
+ out and to Jarkko Hietaniemi for keeping me in sync)
+ * add --patch and --oneshot options to devel/buildperl.pl
+
3.13_01 - 2008-01-04
* fix dependency detection algorithm for functions
diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL
index ea0be6d457..583807a705 100644
--- a/ext/Devel/PPPort/PPPort_pm.PL
+++ b/ext/Devel/PPPort/PPPort_pm.PL
@@ -508,7 +508,7 @@ package Devel::PPPort;
use strict;
use vars qw($VERSION $data);
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
sub _init_data
{
diff --git a/ext/Devel/PPPort/devel/buildperl.pl b/ext/Devel/PPPort/devel/buildperl.pl
index a54f11fda1..74a168298e 100644
--- a/ext/Devel/PPPort/devel/buildperl.pl
+++ b/ext/Devel/PPPort/devel/buildperl.pl
@@ -5,9 +5,9 @@
#
################################################################################
#
-# $Revision: 13 $
+# $Revision: 14 $
# $Author: mhx $
-# $Date: 2008/01/04 10:47:39 +0100 $
+# $Date: 2008/04/13 13:49:37 +0200 $
#
################################################################################
#
@@ -27,7 +27,6 @@ use File::Find;
use File::Path;
use Data::Dumper;
use IO::File;
-use Archive::Tar;
use Cwd;
# TODO: - extra arguments to Configure
@@ -39,12 +38,14 @@ use Cwd;
#
my %opt = (
- prefix => '/tmp/perl/install/<config>/<perl>',
- build => '/tmp/perl/build/<config>',
- source => '/tmp/perl/source',
- force => 0,
- test => 0,
- install => 1,
+ prefix => '/tmp/perl/install/<config>/<perl>',
+ build => '/tmp/perl/build/<config>',
+ source => '/tmp/perl/source',
+ force => 0,
+ test => 0,
+ install => 1,
+ oneshot => 0,
+ configure => 0,
'test-archives' => 0,
);
@@ -145,8 +146,26 @@ GetOptions(\%opt, qw(
test
install!
test-archives=i
+ patch!
+ oneshot
)) or pod2usage(2);
+my %current;
+
+if ($opt{patch} || $opt{oneshot}) {
+ @{$opt{perl}} == 1 or die "Exactly one --perl must be given with --patch or --oneshot\n";
+ my $perl = $opt{perl}[0];
+ patch_source($perl) if !exists $opt{patch} || $opt{patch};
+ if (exists $opt{oneshot}) {
+ eval { require String::ShellQuote };
+ die "--oneshot requires String::ShellQuote to be installed\n" if $@;
+ %current = (config => 'oneshot', version => $perl);
+ $config{oneshot} = { config_args => String::ShellQuote::shell_quote(@ARGV) };
+ build_and_install($perl{$perl});
+ }
+ exit 0;
+}
+
if (exists $opt{config}) {
for my $cfg (@{$opt{config}}) {
exists $config{$cfg} or die "Unknown configuration: $cfg\n";
@@ -198,8 +217,6 @@ if ($opt{'test-archives'}) {
exit 0;
}
-my %current;
-
for my $cfg (@{$opt{config}}) {
for my $perl (@perls) {
my $config = $config{$cfg};
@@ -268,6 +285,9 @@ sub buildperl
sub extract_source
{
+ eval { require Archive::Tar };
+ die "Archive processing requires Archive::Tar to be installed\n" if $@;
+
my $perl = shift;
my $what = $opt{'test-archives'} ? 'test' : 'read';
@@ -467,6 +487,11 @@ buildperl.pl - build/install perl distributions
--noinstall don't install after building
+ --patch only patch the perl source in the current directory
+
+ --oneshot build from the perl source in the current directory
+ (extra arguments are passed to Configure)
+
options tagged with [MULTI] can be given multiple times
options tagged with [EXPAND] expand the following items
@@ -496,6 +521,11 @@ and don't install them, run:
buildperl.pl --perl=5.8.5 --perl=5.8.6 --test --noinstall
+To build and install a single version of perl with special configuration
+options, use:
+
+ buildperl.pl --perl=5.6.0 --prefix=/opt/p560ld --oneshot -- -des -Duselongdouble
+
=head1 COPYRIGHT
Copyright (c) 2004-2008, Marcus Holland-Moritz.
diff --git a/ext/Devel/PPPort/parts/inc/format b/ext/Devel/PPPort/parts/inc/format
index 2e1413f089..ef167f1e4e 100644
--- a/ext/Devel/PPPort/parts/inc/format
+++ b/ext/Devel/PPPort/parts/inc/format
@@ -1,8 +1,8 @@
################################################################################
##
-## $Revision: 7 $
+## $Revision: 8 $
## $Author: mhx $
-## $Date: 2008/01/04 10:47:43 +0100 $
+## $Date: 2008/04/13 13:51:18 +0200 $
##
################################################################################
##
@@ -41,7 +41,8 @@
#ifndef NVef
# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
- defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */
+ defined(PERL_PRIfldbl) && { VERSION != 5.6.0 }
+ /* Not very likely, but let's try anyway. */
# define NVef PERL_PRIeldbl
# define NVff PERL_PRIfldbl
# define NVgf PERL_PRIgldbl
@@ -52,3 +53,18 @@
# endif
#endif
+=xsubs
+
+void
+croak_NVgf(num)
+ NV num
+ PPCODE:
+ Perl_croak(aTHX_ "%.20" NVgf "\n", num);
+
+=tests plan => 1
+
+my $num = 1.12345678901234567890;
+
+eval { Devel::PPPort::croak_NVgf($num) };
+ok($@ =~ /^1.1234567890/);
+
diff --git a/ext/Devel/PPPort/parts/inc/misc b/ext/Devel/PPPort/parts/inc/misc
index 05c3ff7cc2..5a54de186b 100644
--- a/ext/Devel/PPPort/parts/inc/misc
+++ b/ext/Devel/PPPort/parts/inc/misc
@@ -1,8 +1,8 @@
################################################################################
##
-## $Revision: 44 $
+## $Revision: 45 $
## $Author: mhx $
-## $Date: 2008/01/04 14:54:43 +0100 $
+## $Date: 2008/01/04 15:50:58 +0100 $
##
################################################################################
##
@@ -352,7 +352,7 @@ prepush()
{
dXSTARG;
XSprePUSH;
- mPUSHi(42);
+ PUSHi(42);
XSRETURN(1);
}
diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak
index a239ee7ff4..ba7eec25a8 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.13_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
$| = 1;
my %OPT = (
diff --git a/ext/Devel/PPPort/t/format.t b/ext/Devel/PPPort/t/format.t
new file mode 100644
index 0000000000..66bf3f69e1
--- /dev/null
+++ b/ext/Devel/PPPort/t/format.t
@@ -0,0 +1,55 @@
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/format instead.
+#
+# This file was automatically generated from the definition files in the
+# parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+# works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+ if ($ENV{'PERL_CORE'}) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext';
+ require Config; import Config;
+ use vars '%Config';
+ if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+ print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+ exit 0;
+ }
+ }
+ else {
+ unshift @INC, 't';
+ }
+
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
+ }
+
+ if (1) {
+ load();
+ plan(tests => 1);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+my $num = 1.12345678901234567890;
+
+eval { Devel::PPPort::croak_NVgf($num) };
+ok($@ =~ /^1.1234567890/);
+