r3309 - in /packages/libversion-perl/branches/upstream/current: ./ lib/ lib/version/ t/ vperl/ vutil/ vutil/lib/ vutil/lib/version/

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Fri Jul 21 12:20:06 UTC 2006


Author: gregoa-guest
Date: Fri Jul 21 12:20:05 2006
New Revision: 3309

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=3309
Log:
Load /tmp/tmp.RzhXF22695/libversion-perl-0.652 into
packages/libversion-perl/branches/upstream/current.

Added:
    packages/libversion-perl/branches/upstream/current/vutil/Makefile.PLz
    packages/libversion-perl/branches/upstream/current/vutil/lib/
    packages/libversion-perl/branches/upstream/current/vutil/lib/version/
    packages/libversion-perl/branches/upstream/current/vutil/lib/version/vxs.pm
Removed:
    packages/libversion-perl/branches/upstream/current/vutil/vxs.pm
Modified:
    packages/libversion-perl/branches/upstream/current/Build.PL
    packages/libversion-perl/branches/upstream/current/MANIFEST
    packages/libversion-perl/branches/upstream/current/META.yml
    packages/libversion-perl/branches/upstream/current/Makefile.PL
    packages/libversion-perl/branches/upstream/current/README
    packages/libversion-perl/branches/upstream/current/lib/version.pm
    packages/libversion-perl/branches/upstream/current/lib/version.pod
    packages/libversion-perl/branches/upstream/current/lib/version/typemap   (props changed)
    packages/libversion-perl/branches/upstream/current/t/02derived.t   (props changed)
    packages/libversion-perl/branches/upstream/current/t/coretests.pm   (props changed)
    packages/libversion-perl/branches/upstream/current/vperl/vpp.pm

Modified: packages/libversion-perl/branches/upstream/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/Build.PL?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/Build.PL (original)
+++ packages/libversion-perl/branches/upstream/current/Build.PL Fri Jul 21 12:20:05 2006
@@ -54,7 +54,7 @@
     }
     $build_arguments{pm_files} = {
 	'./lib/version.pm' => './lib/version.pm',
-	'./vperl/vpp.pm' => 'lib/version/vpp.pm',
+	'./vperl/vpp.pm' => './lib/version/vpp.pm',
     };
 }
 else {
@@ -62,10 +62,10 @@
     $build_arguments{module_name} = 'version::vxs';
     $build_arguments{pm_files} = {
 	'./lib/version.pm' => './lib/version.pm',
-	'./vutil/vxs.pm' => 'lib/version/vxs.pm'
+	'./vutil/lib/version/vxs.pm' => './lib/version/vxs.pm'
     };
     $build_arguments{xs_files} = {
-	'./vutil/vxs.xs' => 'lib/version/vxs.xs'
+	'./vutil/vxs.xs' => './lib/version/vxs.xs'
     };
     $build_arguments{add_to_cleanup} = 
     	['lib/version/vxs.*'];

Modified: packages/libversion-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/MANIFEST?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libversion-perl/branches/upstream/current/MANIFEST Fri Jul 21 12:20:05 2006
@@ -15,5 +15,6 @@
 vutil/vutil.c
 vutil/vutil.h
 vutil/ppport.h
-vutil/vxs.pm
 vutil/vxs.xs
+vutil/lib/version/vxs.pm
+vutil/Makefile.PLz

Modified: packages/libversion-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/META.yml?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/META.yml (original)
+++ packages/libversion-perl/branches/upstream/current/META.yml Fri Jul 21 12:20:05 2006
@@ -1,17 +1,11 @@
----
-name: version
-version: 0.64
-author: ~
-abstract: ~
-license: perl
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
+name:         version
+version:      0.652
+version_from: lib/version.pm
+installdirs:  site
 requires:
-  perl: '> 5.005, < 5.009'
-dynamic_config: 1
-provides:
-  version:
-    file: lib/version.pm
-    version: 0.64
-  version::vxs:
-    file: vutil/vxs.pm
-    version: 0.64
-generated_by: Module::Build version 0.2611
+    Test::More:                    0
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30

Modified: packages/libversion-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/Makefile.PL?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/libversion-perl/branches/upstream/current/Makefile.PL Fri Jul 21 12:20:05 2006
@@ -1,27 +1,132 @@
-unless (eval "use Module::Build::Compat 0.02; 1" ) {
-  print "This module requires Module::Build to install itself.\n";
+# This Makefile.PL stolen from Params::Validate
+#
+# The perl/C checking voodoo is stolen from Graham Barr's
+# Scalar-List-Utils distribution.
 
-  require ExtUtils::MakeMaker;
-  my $yn = ExtUtils::MakeMaker::prompt
-    ('  Install Module::Build from CPAN?', 'y');
+use strict;
 
-  if ($yn =~ /^y/i) {
-    require Cwd;
-    require File::Spec;
-    require CPAN;
+use ExtUtils::MakeMaker;
+use Config qw(%Config);
+use File::Spec;
 
-    # Save this 'cause CPAN will chdir all over the place.
-    my $cwd = Cwd::cwd();
-    my $makefile = File::Spec->rel2abs($0);
+my $no_xs;
+my $force_xs;
+for (@ARGV)
+{
+    /^--perl_only/ and $no_xs = 1;
+    /^--xs/ and $no_xs = 0;
+}
 
-    CPAN::Shell->install('Module::Build::Compat');
+if ($no_xs)
+{
+    write_makefile();
+    exit;
+}
 
-    chdir $cwd or die "Cannot chdir() back to $cwd: $!";
-    exec $^X, $makefile, @ARGV;  # Redo now that we have Module::Build
-  } else {
-    warn " *** Cannot install without Module::Build.  Exiting ...\n";
-    exit 1;
-  }
+unless (defined $no_xs)
+{
+    check_for_compiler()
+        or no_cc();
+
+    map { unlink $_ if -f $_ } ('test.c','test.o');
+
 }
-Module::Build::Compat->run_build_pl(args => \@ARGV);
-Module::Build::Compat->write_makefile();
+
+write_makefile();
+
+sub write_makefile
+{
+    my %prereq = ( 'Test::More' => 0 );
+
+    WriteMakefile( VERSION_FROM    => "lib/version.pm",
+                   NAME            => "version",
+                   PREREQ_PM       => \%prereq,
+                   CONFIGURE       => \&init,
+                   ( $] >= 5.005 ?
+                     ( ABSTRACT    => 'Structured version objects',
+                       AUTHOR      => 'John Peacock <jpeacock at cpan.org>') :
+                     ()
+                   ), 
+		   PM              => 
+		       {'lib/version.pm' => '$(INST_LIBDIR)/version.pm'},
+		   PL_FILES        => {},
+
+		   clean           => { FILES => 'vutil/Makefile.PL' },
+                 );
+}
+
+sub init
+{
+    my $hash = $_[1];
+
+    if ($no_xs) {
+	$hash->{'PM'}->{'vperl/vpp.pm'} = '$(INST_LIBDIR)/version/vpp.pm';
+	$hash->{'PREREQ_PM'}->{'Scalar::Util'} = 1.08;
+    }
+    else {
+	require File::Copy;
+	File::Copy::copy('vutil/Makefile.PLz','vutil/Makefile.PL');
+        @{ $hash }{ 'DIR' } = ['vutil'];
+    }
+
+    $hash;
+}
+
+sub no_cc
+{
+    $no_xs = 1;
+    print <<'EOF';
+
+ I cannot determine if you have a C compiler
+ so I will install a perl-only implementation
+
+ You can force installation of the XS version with
+
+    perl Makefile.PL --xs
+
+EOF
+
+    write_makefile();
+    exit;
+}
+
+sub check_for_compiler
+{
+    print "Testing if you have a C compiler\n";
+
+    eval { require ExtUtils::CBuilder };
+    if ($@)
+    {
+        return _check_for_compiler_manually();
+    }
+    else
+    {
+        return _check_for_compiler_with_cbuilder();
+    }
+}
+
+sub _check_for_compiler_with_cbuilder
+{
+    my $cb = ExtUtils::CBuilder->new( quiet => 1 );
+
+    return $cb->have_compiler;
+}
+
+sub _check_for_compiler_manually
+{
+    unless ( open F, ">test.c" )
+    {
+        warn "Cannot write test.c, skipping test compilation and installing pure Perl version.\n";
+        return 0;
+    }
+
+    print F <<'EOF';
+int main() { return 0; }
+EOF
+
+    close F or return 0;
+
+    system( "$Config{cc} -o test$Config{obj_ext} test.c" ) and return 0;
+
+    return 1;
+}

Modified: packages/libversion-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/README?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/README (original)
+++ packages/libversion-perl/branches/upstream/current/README Fri Jul 21 12:20:05 2006
@@ -1,4 +1,4 @@
-version 0.64
+version 0.652
 ==================================
 
 Provides the same version objects as included in Perl v5.9.x (and hopefully in
@@ -10,17 +10,13 @@
 order to get the current changes (the CPAN release has no effect in
 bleadperl).
 
-Major changes in 0.64 - 2006-06-08
+Major changes in 0.652 - 2006-07-19
 =====================================
-Change test for already-exported qv() to work better under inheritance.
-Test and document that import() can be inherited by subclasses of version
-and still export qv() to the caller appropriately.
-
-Major changes in 0.63 - 2006-05-27
-=====================================
-Fix RT#19517 - need to special case the string 'undef' as being equivalent
-to an undef version (0.000), so that EU::MM doesn't freak out.  Prevent
-warnings when initializing with undef or no initializer at all.
+Reorganize structure and provide a fully EU::MM compatible Makefile.PL for, 
+among other cases, bootstrap installing of Module::Build (which now depends 
+on version.pm).  No new tests, no change to core code.  Resolves RT#20493.
+Now works if ExtUtils::CBuilder isn't installed.  Slight tweak of
+Makefile.PL to deal with Perl < v5.6.0.
 
 Please read the POD documentation for usage/details.  See the CHANGES file
 for full details of all changes to the module behavior.
@@ -42,6 +38,22 @@
 
 and it will install the Perl only version.
 
+OR
+
+To install with ExtUtils::MakeMaker:
+
+   $ perl Makefile.PL
+   $ make
+   $ make test
+   # make install
+
+and 
+
+   $ perl Makefile.PL --perl_only
+
+and it will install the Perl only version.
+  
+
 DEPENDENCIES
 
 The same C compiler used to build Perl (or not).  Module::Build 0.2611

Modified: packages/libversion-perl/branches/upstream/current/lib/version.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/lib/version.pm?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/lib/version.pm (original)
+++ packages/libversion-perl/branches/upstream/current/lib/version.pm Fri Jul 21 12:20:05 2006
@@ -6,7 +6,7 @@
 
 use vars qw(@ISA $VERSION $CLASS *qv);
 
-$VERSION = 0.64;
+$VERSION = 0.652;
 
 $CLASS = 'version';
 

Modified: packages/libversion-perl/branches/upstream/current/lib/version.pod
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/lib/version.pod?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/lib/version.pod (original)
+++ packages/libversion-perl/branches/upstream/current/lib/version.pod Fri Jul 21 12:20:05 2006
@@ -248,7 +248,10 @@
 
 Overloading has been used with version objects to provide a natural
 interface for their use.  All mathematical operations are forbidden,
-since they don't make any sense for base version objects.
+since they don't make any sense for base version objects.  Consequently,
+there is no overloaded numification available.  If you want to use a
+version object in a numeric context for some reason, see the L<numify>
+object method.
 
 =over 4
 

Propchange: packages/libversion-perl/branches/upstream/current/lib/version/typemap
------------------------------------------------------------------------------
    svn:executable = *

Propchange: packages/libversion-perl/branches/upstream/current/t/02derived.t
------------------------------------------------------------------------------
    svn:executable = *

Propchange: packages/libversion-perl/branches/upstream/current/t/coretests.pm
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/libversion-perl/branches/upstream/current/vperl/vpp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/vperl/vpp.pm?rev=3309&op=diff
==============================================================================
--- packages/libversion-perl/branches/upstream/current/vperl/vpp.pm (original)
+++ packages/libversion-perl/branches/upstream/current/vperl/vpp.pm Fri Jul 21 12:20:05 2006
@@ -4,7 +4,7 @@
 
 use Scalar::Util;
 use vars qw ($VERSION @ISA @REGEXS);
-$VERSION = 0.64;
+$VERSION = 0.652;
 
 push @REGEXS, qr/
 	^v?	# optional leading 'v'
@@ -14,7 +14,6 @@
 	/x;
 
 use overload (
-    '+0'   => \&numify,
     '""'   => \&stringify,
     'cmp'  => \&vcmp,
     '<=>'  => \&vcmp,

Added: packages/libversion-perl/branches/upstream/current/vutil/Makefile.PLz
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/vutil/Makefile.PLz?rev=3309&op=file
==============================================================================
--- packages/libversion-perl/branches/upstream/current/vutil/Makefile.PLz (added)
+++ packages/libversion-perl/branches/upstream/current/vutil/Makefile.PLz Fri Jul 21 12:20:05 2006
@@ -1,0 +1,11 @@
+#!/usr/bin/perl -w
+use strict;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME                => 'version::vxs',
+    AUTHOR              => 'John Peacock <jpeacock at cpan.org>',
+    VERSION_FROM        => 'lib/version/vxs.pm',
+    OBJECT              => q/$(O_FILES)/,
+    TYPEMAPS            => ['../lib/version/typemap'],
+);

Added: packages/libversion-perl/branches/upstream/current/vutil/lib/version/vxs.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libversion-perl/branches/upstream/current/vutil/lib/version/vxs.pm?rev=3309&op=file
==============================================================================
--- packages/libversion-perl/branches/upstream/current/vutil/lib/version/vxs.pm (added)
+++ packages/libversion-perl/branches/upstream/current/vutil/lib/version/vxs.pm Fri Jul 21 12:20:05 2006
@@ -1,0 +1,21 @@
+#!perl -w
+package version::vxs;
+
+use 5.005_03;
+use strict;
+
+require DynaLoader;
+use vars qw(@ISA $VERSION $CLASS );
+
+ at ISA = qw(DynaLoader);
+
+$VERSION = 0.652;
+
+$CLASS = 'version::vxs';
+
+local $^W; # shut up the 'redefined' warning for UNIVERSAL::VERSION
+bootstrap version::vxs if $] < 5.009;
+
+# Preloaded methods go here.
+
+1;




More information about the Pkg-perl-cvs-commits mailing list