r13232 - in /branches/upstream/libalien-wxwidgets-perl/current: Changes MANIFEST META.yml Makefile.PL inc/version.pm inc/version/ inc/version/vpp.pm lib/Alien/wxWidgets.pm patches/data

roberto at users.alioth.debian.org roberto at users.alioth.debian.org
Tue Jan 22 01:29:41 UTC 2008


Author: roberto
Date: Tue Jan 22 01:29:41 2008
New Revision: 13232

URL: http://svn.debian.org/wsvn/?sc=1&rev=13232
Log:
[svn-upgrade] Integrating new upstream version, libalien-wxwidgets-perl (0.33)

Added:
    branches/upstream/libalien-wxwidgets-perl/current/inc/version/
    branches/upstream/libalien-wxwidgets-perl/current/inc/version.pm
    branches/upstream/libalien-wxwidgets-perl/current/inc/version/vpp.pm
Modified:
    branches/upstream/libalien-wxwidgets-perl/current/Changes
    branches/upstream/libalien-wxwidgets-perl/current/MANIFEST
    branches/upstream/libalien-wxwidgets-perl/current/META.yml
    branches/upstream/libalien-wxwidgets-perl/current/Makefile.PL
    branches/upstream/libalien-wxwidgets-perl/current/lib/Alien/wxWidgets.pm
    branches/upstream/libalien-wxwidgets-perl/current/patches/data

Modified: branches/upstream/libalien-wxwidgets-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/Changes?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/Changes (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/Changes Tue Jan 22 01:29:41 2008
@@ -1,4 +1,7 @@
 Revision history for Perl extension Alien::wxWidgets.
+
+0.33  Sat Jan 19 17:35:57 CET 2008
+	- Patch and build wxWidgets 2.8.7.
 
 0.32  Thu Aug 16 00:11:40 CEST 2007
 	- Patch and build wxWidgets 2.8.4.

Modified: branches/upstream/libalien-wxwidgets-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/MANIFEST?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/MANIFEST (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/MANIFEST Tue Jan 22 01:29:41 2008
@@ -28,6 +28,8 @@
 inc/My/Build/Win32_MinGW_Tmake.pm
 inc/My/Build/gmake.mak
 inc/My/Build/nmake.mak
+inc/version.pm
+inc/version/vpp.pm
 inc/Params/Check.pm
 inc/Text/Patch.pm
 inc/bin/patch

Modified: branches/upstream/libalien-wxwidgets-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/META.yml?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/META.yml (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/META.yml Tue Jan 22 01:29:41 2008
@@ -1,6 +1,6 @@
 ---
 name: Alien-wxWidgets
-version: 0.32
+version: 0.33
 author:
   - 'Mattia Barbon <mbarbon at cpan.org>'
 abstract: 'building, finding and using wxWidgets binaries'
@@ -15,10 +15,10 @@
 provides:
   Alien::wxWidgets:
     file: lib/Alien/wxWidgets.pm
-    version: 0.32
+    version: 0.33
   Alien::wxWidgets::Utility:
     file: lib/Alien/wxWidgets/Utility.pm
-generated_by: Module::Build version 0.2808
+generated_by: Module::Build version 0.280801
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.2.html
   version: 1.2

Modified: branches/upstream/libalien-wxwidgets-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/Makefile.PL?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/Makefile.PL (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/Makefile.PL Tue Jan 22 01:29:41 2008
@@ -1,4 +1,5 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+require 5.006;
     
     unless (eval "use Module::Build::Compat 0.02; 1" ) {
       print "This module requires Module::Build to install itself.\n";

Added: branches/upstream/libalien-wxwidgets-perl/current/inc/version.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/inc/version.pm?rev=13232&op=file
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/inc/version.pm (added)
+++ branches/upstream/libalien-wxwidgets-perl/current/inc/version.pm Tue Jan 22 01:29:41 2008
@@ -1,0 +1,45 @@
+#!perl -w
+package version;
+
+use 5.005_04;
+use strict;
+
+use vars qw(@ISA $VERSION $CLASS *qv);
+
+$VERSION = 0.74;
+
+$CLASS = 'version';
+
+eval "use version::vxs $VERSION";
+if ( $@ ) { # don't have the XS version installed
+    eval "use version::vpp $VERSION"; # don't tempt fate
+    die "$@" if ( $@ );
+    push @ISA, "version::vpp";
+    *version::qv = \&version::vpp::qv;
+}
+else { # use XS module
+    push @ISA, "version::vxs";
+    *version::qv = \&version::vxs::qv;
+}
+
+# Preloaded methods go here.
+sub import {
+    my ($class) = shift;
+    my $callpkg = caller();
+    no strict 'refs';
+    
+    *{$callpkg."::qv"} = 
+	    sub {return bless version::qv(shift), $class }
+	unless defined(&{"$callpkg\::qv"});
+
+#    if (@_) { # must have initialization on the use line
+#	if ( defined $_[2] ) { # CVS style
+#	    $_[0] = version::qv($_[2]);
+#	}
+#	else {
+#	    $_[0] = version->new($_[1]);
+#	}
+#    }
+}
+
+1;

Added: branches/upstream/libalien-wxwidgets-perl/current/inc/version/vpp.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/inc/version/vpp.pm?rev=13232&op=file
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/inc/version/vpp.pm (added)
+++ branches/upstream/libalien-wxwidgets-perl/current/inc/version/vpp.pm Tue Jan 22 01:29:41 2008
@@ -1,0 +1,550 @@
+package version::vpp;
+use strict;
+
+use locale;
+use vars qw ($VERSION @ISA @REGEXS);
+$VERSION = 0.74;
+
+push @REGEXS, qr/
+	^v?	# optional leading 'v'
+	(\d*)	# major revision not required
+	\.	# requires at least one decimal
+	(?:(\d+)\.?){1,}
+	/x;
+
+use overload (
+    '""'       => \&stringify,
+    '0+'       => \&numify,
+    'cmp'      => \&vcmp,
+    '<=>'      => \&vcmp,
+    'bool'     => \&vbool,
+    'nomethod' => \&vnoop,
+);
+
+my $VERSION_MAX = 0x7FFFFFFF;
+
+eval "use warnings";
+if ($@) {
+    eval '
+	package warnings;
+	sub enabled {return $^W;}
+	1;
+    ';
+}
+
+sub new
+{
+	my ($class, $value) = @_;
+	my $self = bless ({}, ref ($class) || $class);
+	
+	if ( ref($value) && eval("$value->isa('version')") ) {
+	    # Can copy the elements directly
+	    $self->{version} = [ @{$value->{version} } ];
+	    $self->{qv} = 1 if $value->{qv};
+	    $self->{alpha} = 1 if $value->{alpha};
+	    $self->{original} = ''.$value->{original};
+	    return $self;
+	}
+
+	require POSIX;
+	my $currlocale = POSIX::setlocale(&POSIX::LC_ALL);
+	my $radix_comma = ( POSIX::localeconv()->{decimal_point} eq ',' );
+
+	if ( not defined $value or $value =~ /^undef$/ ) {
+	    # RT #19517 - special case for undef comparison
+	    # or someone forgot to pass a value
+	    push @{$self->{version}}, 0;
+	    $self->{original} = "0";
+	    return ($self);
+	}
+
+	if ( $#_ == 2 ) { # must be CVS-style
+	    $value = 'v'.$_[2];
+	}
+
+	$value = _un_vstring($value);
+
+	# exponential notation
+	if ( $value =~ /\d+.?\d*e-?\d+/ ) {
+	    $value = sprintf("%.9f",$value);
+	    $value =~ s/(0+)$//;
+	}
+	
+	# if the original locale used commas for decimal points, we
+	# just replace commas with decimal places, rather than changing
+	# locales
+	if ( $radix_comma ) {
+	    $value =~ tr/,/./;
+	}
+
+	# This is not very efficient, but it is morally equivalent
+	# to the XS code (as that is the reference implementation).
+	# See vutil/vutil.c for details
+	my $qv = 0;
+	my $alpha = 0;
+	my $width = 3;
+	my $saw_period = 0;
+	my $vinf = 0;
+	my ($start, $last, $pos, $s);
+	$s = 0;
+
+	while ( substr($value,$s,1) =~ /\s/ ) { # leading whitespace is OK
+	    $s++;
+	}
+
+	if (substr($value,$s,1) eq 'v') {
+	    $s++;    # get past 'v'
+	    $qv = 1; # force quoted version processing
+	}
+
+	$start = $last = $pos = $s;
+		
+	# pre-scan the input string to check for decimals/underbars
+	while ( substr($value,$pos,1) =~ /[._\d]/ ) {
+	    if ( substr($value,$pos,1) eq '.' ) {
+		if ($alpha) {
+		    Carp::croak("Invalid version format ".
+		      "(underscores before decimal)");
+		}
+		$saw_period++;
+		$last = $pos;
+	    }
+	    elsif ( substr($value,$pos,1) eq '_' ) {
+		if ($alpha) {
+		    require Carp;
+		    Carp::croak("Invalid version format ".
+			"(multiple underscores)");
+		}
+		$alpha = 1;
+		$width = $pos - $last - 1; # natural width of sub-version
+	    }
+	    $pos++;
+	}
+
+	if ( $alpha && !$saw_period ) {
+	    require Carp;
+	    Carp::croak("Invalid version format ".
+		"(alpha without decimal)");
+	}
+
+	if ( $alpha && $saw_period && $width == 0 ) {
+	    require Carp;
+	    Carp::croak("Invalid version format ".
+		"(misplaced _ in number)");
+	}
+
+	if ( $saw_period > 1 ) {
+	    $qv = 1; # force quoted version processing
+	}
+
+	$last = $pos;
+	$pos = $s;
+
+	if ( $qv ) {
+	    $self->{qv} = 1;
+	}
+
+	if ( $alpha ) {
+	    $self->{alpha} = 1;
+	}
+
+	if ( !$qv && $width < 3 ) {
+	    $self->{width} = $width;
+	}
+
+	while ( substr($value,$pos,1) =~ /\d/ ) {
+	    $pos++;
+	}
+
+	if ( substr($value,$pos,1) !~ /[a-z]/ ) { ### FIX THIS ###
+	    my $rev;
+
+	    while (1) {
+		$rev = 0;
+		{
+
+		    # this is atoi() that delimits on underscores
+		    my $end = $pos;
+		    my $mult = 1;
+		    my $orev;
+
+		    # the following if() will only be true after the decimal
+		    # point of a version originally created with a bare
+		    # floating point number, i.e. not quoted in any way
+		    if ( !$qv && $s > $start && $saw_period == 1 ) {
+			$mult *= 100;
+			while ( $s < $end ) {
+			    $orev = $rev;
+			    $rev += substr($value,$s,1) * $mult;
+			    $mult /= 10;
+			    if (   abs($orev) > abs($rev) 
+				|| abs($rev) > abs($VERSION_MAX) ) {
+				if ( warnings::enabled("overflow") ) {
+				    require Carp;
+				    Carp::carp("Integer overflow in version");
+				}
+				$s = $end - 1;
+				$rev = $VERSION_MAX;
+			    }
+			    $s++;
+			    if ( substr($value,$s,1) eq '_' ) {
+				$s++;
+			    }
+			}
+		    }
+		    else {
+			while (--$end >= $s) {
+			    $orev = $rev;
+			    $rev += substr($value,$end,1) * $mult;
+			    $mult *= 10;
+			    if (   abs($orev) > abs($rev) 
+				|| abs($rev) > abs($VERSION_MAX) ) {
+				if ( warnings::enabled("overflow") ) {
+				    require Carp;
+				    Carp::carp("Integer overflow in version");
+				}
+				$end = $s - 1;
+				$rev = $VERSION_MAX;
+			    }
+			}
+		    }
+		}
+
+		# Append revision
+		push @{$self->{version}}, $rev;
+		if ( substr($value,$pos,1) eq '.' 
+		    && substr($value,$pos+1,1) =~ /\d/ ) {
+		    $s = ++$pos;
+		}
+		elsif ( substr($value,$pos,1) eq '_' 
+		    && substr($value,$pos+1,1) =~ /\d/ ) {
+		    $s = ++$pos;
+		}
+		elsif ( substr($value,$pos,1) =~ /\d/ ) {
+		    $s = $pos;
+		}
+		else {
+		    $s = $pos;
+		    last;
+		}
+		if ( $qv ) {
+		    while ( substr($value,$pos,1) =~ /\d/ ) {
+			$pos++;
+		    }
+		}
+		else {
+		    my $digits = 0;
+		    while (substr($value,$pos,1) =~ /[\d_]/ && $digits < 3) {
+			if ( substr($value,$pos,1) ne '_' ) {
+			    $digits++;
+			}
+			$pos++;
+		    }
+		}
+	    }
+	}
+	if ( $qv ) { # quoted versions always get at least three terms
+	    my $len = scalar @{$self->{version}};
+	    $len = 3 - $len;
+	    while ($len-- > 0) {
+		push @{$self->{version}}, 0;
+	    }
+	}
+
+	if ( substr($value,$pos) ) { # any remaining text
+	    if ( warnings::enabled("misc") ) {
+		require Carp;
+		Carp::carp("Version string '$value' contains invalid data; ".
+		     "ignoring: '".substr($value,$pos)."'");
+	    }
+	}
+
+	# cache the original value for use when stringification
+	if ( $vinf ) {
+	    $self->{vinf} = 1;
+	    $self->{original} = 'v.Inf';
+	}
+	else {
+	    $self->{original} = substr($value,0,$pos);
+	}
+
+	return ($self);
+}
+
+sub numify 
+{
+    my ($self) = @_;
+    unless (_verify($self)) {
+	require Carp;
+	Carp::croak("Invalid version object");
+    }
+    my $width = $self->{width} || 3;
+    my $alpha = $self->{alpha} || "";
+    my $len = $#{$self->{version}};
+    my $digit = $self->{version}[0];
+    my $string = sprintf("%d.", $digit );
+
+    for ( my $i = 1 ; $i < $len ; $i++ ) {
+	$digit = $self->{version}[$i];
+	if ( $width < 3 ) {
+	    my $denom = 10**(3-$width);
+	    my $quot = int($digit/$denom);
+	    my $rem = $digit - ($quot * $denom);
+	    $string .= sprintf("%0".$width."d_%d", $quot, $rem);
+	}
+	else {
+	    $string .= sprintf("%03d", $digit);
+	}
+    }
+
+    if ( $len > 0 ) {
+	$digit = $self->{version}[$len];
+	if ( $alpha && $width == 3 ) {
+	    $string .= "_";
+	}
+	$string .= sprintf("%0".$width."d", $digit);
+    }
+    else # $len = 0
+    {
+	$string .= sprintf("000");
+    }
+
+    return $string;
+}
+
+sub normal 
+{
+    my ($self) = @_;
+    unless (_verify($self)) {
+	require Carp;
+	Carp::croak("Invalid version object");
+    }
+    my $alpha = $self->{alpha} || "";
+    my $len = $#{$self->{version}};
+    my $digit = $self->{version}[0];
+    my $string = sprintf("v%d", $digit );
+
+    for ( my $i = 1 ; $i < $len ; $i++ ) {
+	$digit = $self->{version}[$i];
+	$string .= sprintf(".%d", $digit);
+    }
+
+    if ( $len > 0 ) {
+	$digit = $self->{version}[$len];
+	if ( $alpha ) {
+	    $string .= sprintf("_%0d", $digit);
+	}
+	else {
+	    $string .= sprintf(".%0d", $digit);
+	}
+    }
+
+    if ( $len <= 2 ) {
+	for ( $len = 2 - $len; $len != 0; $len-- ) {
+	    $string .= sprintf(".%0d", 0);
+	}
+    }
+
+    return $string;
+}
+
+sub stringify
+{
+    my ($self) = @_;
+    unless (_verify($self)) {
+	require Carp;
+	Carp::croak("Invalid version object");
+    }
+    return $self->{original};
+}
+
+sub vcmp
+{
+    require UNIVERSAL;
+    my ($left,$right,$swap) = @_;
+    my $class = ref($left);
+    unless ( UNIVERSAL::isa($right, $class) ) {
+	$right = $class->new($right);
+    }
+
+    if ( $swap ) {
+	($left, $right) = ($right, $left);
+    }
+    unless (_verify($left)) {
+	require Carp;
+	Carp::croak("Invalid version object");
+    }
+    unless (_verify($right)) {
+	require Carp;
+	Carp::croak("Invalid version object");
+    }
+    my $l = $#{$left->{version}};
+    my $r = $#{$right->{version}};
+    my $m = $l < $r ? $l : $r;
+    my $lalpha = $left->is_alpha;
+    my $ralpha = $right->is_alpha;
+    my $retval = 0;
+    my $i = 0;
+    while ( $i <= $m && $retval == 0 ) {
+	$retval = $left->{version}[$i] <=> $right->{version}[$i];
+	$i++;
+    }
+
+    # tiebreaker for alpha with identical terms
+    if ( $retval == 0 
+	&& $l == $r 
+	&& $left->{version}[$m] == $right->{version}[$m]
+	&& ( $lalpha || $ralpha ) ) {
+
+	if ( $lalpha && !$ralpha ) {
+	    $retval = -1;
+	}
+	elsif ( $ralpha && !$lalpha) {
+	    $retval = +1;
+	}
+    }
+
+    # possible match except for trailing 0's
+    if ( $retval == 0 && $l != $r ) {
+	if ( $l < $r ) {
+	    while ( $i <= $r && $retval == 0 ) {
+		if ( $right->{version}[$i] != 0 ) {
+		    $retval = -1; # not a match after all
+		}
+		$i++;
+	    }
+	}
+	else {
+	    while ( $i <= $l && $retval == 0 ) {
+		if ( $left->{version}[$i] != 0 ) {
+		    $retval = +1; # not a match after all
+		}
+		$i++;
+	    }
+	}
+    }
+
+    return $retval;  
+}
+
+sub vbool {
+    my ($self) = @_;
+    return vcmp($self,$self->new("0"),1);
+}
+
+sub vnoop { 
+    require Carp; 
+    Carp::croak("operation not supported with version object");
+}
+
+sub is_alpha {
+    my ($self) = @_;
+    return (exists $self->{alpha});
+}
+
+sub qv {
+    my ($value) = @_;
+
+    $value = _un_vstring($value);
+    $value = 'v'.$value unless $value =~ /(^v|\d+\.\d+\.\d)/;
+    my $version = version->new($value); # always use base class
+    return $version;
+}
+
+sub is_qv {
+    my ($self) = @_;
+    return (exists $self->{qv});
+}
+
+
+sub _verify {
+    my ($self) = @_;
+    if ( ref($self)
+	&& eval { exists $self->{version} }
+	&& ref($self->{version}) eq 'ARRAY'
+	) {
+	return 1;
+    }
+    else {
+	return 0;
+    }
+}
+
+sub _un_vstring {
+    my $value = shift;
+    # may be a v-string
+    if ( $] >= 5.006_000 && length($value) >= 3 && $value !~ /[._]/ ) {
+	my $tvalue = sprintf("v%vd",$value);
+	if ( $tvalue =~ /^v\d+\.\d+\.\d+$/ ) {
+	    # must be a v-string
+	    $value = $tvalue;
+	}
+    }
+    return $value;
+}
+
+# Thanks to Yitzchak Scott-Thoennes for this mode of operation
+{
+    local $^W;
+    *UNIVERSAL::VERSION = sub {
+	my ($obj, $req) = @_;
+	my $class = ref($obj) || $obj;
+
+	no strict 'refs';
+	eval "require $class" unless %{"$class\::"}; # already existing
+	return undef if $@ =~ /Can't locate/ and not defined $req;
+	
+	if ( not %{"$class\::"} and $] >= 5.008) { # file but no package
+	    require Carp;
+	    Carp::croak( "$class defines neither package nor VERSION"
+		."--version check failed");
+	}
+	
+	my $version = eval "\$$class\::VERSION";
+	if ( defined $version ) {
+	    local $^W if $] <= 5.008;
+	    $version = version::vpp->new($version);
+	}
+
+	if ( defined $req ) {
+	    unless ( defined $version ) {
+		require Carp;
+		my $msg =  $] < 5.006 
+		? "$class version $req required--this is only version "
+		: "$class does not define \$$class\::VERSION"
+		  ."--version check failed";
+
+		if ( $ENV{VERSION_DEBUG} ) {
+		    Carp::confess($msg);
+		}
+		else {
+		    Carp::croak($msg);
+		}
+	    }
+
+	    $req = version::vpp->new($req);
+
+	    if ( $req > $version ) {
+		require Carp;
+		if ( $req->is_qv ) {
+		    Carp::croak( 
+			sprintf ("%s version %s required--".
+			    "this is only version %s", $class,
+			    $req->normal, $version->normal)
+		    );
+		}
+		else {
+		    Carp::croak( 
+			sprintf ("%s version %s required--".
+			    "this is only version %s", $class,
+			    $req->stringify, $version->stringify)
+		    );
+		}
+	    }
+	}
+
+	return defined $version ? $version->stringify : undef;
+    };
+}
+
+1; #this line is important and will help the module return a true value

Modified: branches/upstream/libalien-wxwidgets-perl/current/lib/Alien/wxWidgets.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/lib/Alien/wxWidgets.pm?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/lib/Alien/wxWidgets.pm (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/lib/Alien/wxWidgets.pm Tue Jan 22 01:29:41 2008
@@ -43,7 +43,7 @@
                       instantiate   => 'config';
 
 our $AUTOLOAD;
-our $VERSION = '0.32';
+our $VERSION = '0.33';
 our %VALUES;
 our $dont_remap;
 

Modified: branches/upstream/libalien-wxwidgets-perl/current/patches/data
URL: http://svn.debian.org/wsvn/branches/upstream/libalien-wxwidgets-perl/current/patches/data?rev=13232&op=diff
==============================================================================
--- branches/upstream/libalien-wxwidgets-perl/current/patches/data (original)
+++ branches/upstream/libalien-wxwidgets-perl/current/patches/data Tue Jan 22 01:29:41 2008
@@ -1,4 +1,4 @@
-my $VERSION = '2.8.4';
+my $VERSION = '2.8.7';
 my $URL     = "ftp://biolpc22.york.ac.uk/pub/$VERSION";
 my $BASE    = 'wxWidgets';
 # $TYPE from Build.PL
@@ -16,8 +16,12 @@
 wxMSW-2.8.0-makefiles.patch
                                ), @common ],
                },
-  mac     => { unicode => [ @common ],
-               ansi    => [ @common ],
+  mac     => { unicode => [ qw(
+wxMac-2.8.3-brokengcc.patch
+                               ), @common ],
+               ansi    => [ qw(
+wxMac-2.8.3-brokengcc.patch
+                               ), @common ],
                },
   unix    => { unicode => [ @common ],
                ansi    => [ @common ],




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