Commit 6014cc8b authored by Alessandro Ghedini's avatar Alessandro Ghedini

[svn-upgrade] new version libaudio-musepack-perl (1.0.1)

parent c5dc8ddc
Revision history for Perl extension Audio::Musepack.
0.7 Fri Jan 5 20:13:36 PST 2007
1.0.1 Sat Dec 25 21:05:30 PST 2010
- Fix version.
- Skip tests if Test::Pod::Coverage isn't installed.
1.0 Fri Dec 24 19:55:53 PST 2010
- Implement as a wrapper to Audio::Scan
0.6 Fri Jan 5 19:50:25 PST 2007
- Fix MANIFEST to include data files.
- Fix MANIFEST to include data files.
0.5 Fri Jan 5 19:08:13 PST 2007
- Added POD & Coverage
- Fixed META.yml
- Fixed tag reading for APE files.
- Fixed skipping over ID3 tags.
- Added POD & Coverage
- Fixed META.yml
- Fixed tag reading for APE files.
- Fixed skipping over ID3 tags.
0.03 Sat Nov 26 00:12:09 PST 2005
- Sync up with SlimServer changes.
- Sync up with SlimServer changes.
- Add APE.pm from kdf.
- Add APE.pm from kdf.
0.01 Sun May 9 17:04:14 PDT 2004
- Import from Erik
- Import from Erik
abstract: An object-oriented interface to Musepack file information
author: 'Dan Sully, <daniel@cpan.org>'
---
abstract: 'An object-oriented interface to Musepack file information and APE tag fields.'
author:
- 'Dan Sully, <daniel@cpan.org>'
build_requires:
ExtUtils::MakeMaker: 6.42
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
generated_by: Module::Install version 0.64
generated_by: 'Module::Install version 1.00'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Audio-Musepack
no_index:
directory:
- inc
- t
requires:
MP3::Info: 1.20
Audio::Scan: 0.85
perl: 5.005
version: 0.7
resources:
license: http://dev.perl.org/licenses/
version: 1.0.1
# $Id: Makefile.PL 10 1998-12-16 23:02:45Z daniel $
use inc::Module::Install;
name('Audio-Musepack');
......@@ -7,7 +5,7 @@ license('perl');
perl_version('5.005');
all_from('lib/Audio/Musepack.pm');
requires('MP3::Info' => '1.20');
requires('Audio::Scan' => '0.85');
auto_install();
WriteAll();
Audio::Musepack version 0.7
Audio::Musepack version 1.0
=======================
The README is used to introduce the module and provide instructions on
......@@ -25,12 +25,12 @@ COPYRIGHT AND LICENCE
Put the correct copyright and licence information here.
Copyright (C) 2003 by Erik Reckase
Copyright (C) 2005-2007 by Dan Sully & Slim Devices
Copyright (C) 2003 by Erik Reckase
Copyright (C) 2007-2010 by Dan Sully.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.2 or,
at your option, any later version of Perl 5 you may have available.
......@@ -18,7 +18,9 @@ my %FeatureMap = (
# various lexical flags
my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $HasCPANPLUS );
my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly );
my (
$Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps
);
my ( $PostambleActions, $PostambleUsed );
# See if it's a testing or non-interactive session
......@@ -73,6 +75,9 @@ sub _init {
elsif ( $arg =~ /^--test(?:only)?$/ ) {
$TestOnly = 1;
}
elsif ( $arg =~ /^--all(?:deps)?$/ ) {
$AllDeps = 1;
}
}
}
......@@ -115,6 +120,13 @@ sub import {
)[0]
);
# We want to know if we're under CPAN early to avoid prompting, but
# if we aren't going to try and install anything anyway then skip the
# check entirely since we don't want to have to load (and configure)
# an old CPAN just for a cosmetic message
$UnderCPAN = _check_lock(1) unless $SkipInstall;
while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
my ( @required, @tests, @skiptests );
my $default = 1;
......@@ -163,15 +175,24 @@ sub import {
}
# XXX: check for conflicts and uninstalls(!) them.
if (
defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
my $cur = _load($mod);
if (_version_cmp ($cur, $arg) >= 0)
{
print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
push @Existing, $mod => $arg;
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
if (not defined $cur) # indeed missing
{
print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
}
else
{
# no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
print "too old. ($cur < $arg)\n";
}
push @required, $mod => $arg;
}
}
......@@ -184,6 +205,8 @@ sub import {
!$SkipInstall
and (
$CheckOnly
or ($mandatory and $UnderCPAN)
or $AllDeps
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
......@@ -214,8 +237,6 @@ sub import {
}
}
$UnderCPAN = _check_lock(); # check for $UnderCPAN
if ( @Missing and not( $CheckOnly or $UnderCPAN ) ) {
require Config;
print
......@@ -232,23 +253,42 @@ sub import {
# import to main::
no strict 'refs';
*{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
return (@Existing, @Missing);
}
sub _running_under {
my $thing = shift;
print <<"END_MESSAGE";
*** Since we're running under ${thing}, I'll just let it take care
of the dependency's installation later.
END_MESSAGE
return 1;
}
# Check to see if we are currently running under CPAN.pm and/or CPANPLUS;
# if we are, then we simply let it taking care of our dependencies
sub _check_lock {
return unless @Missing;
return unless @Missing or @_;
my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING};
if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) {
print <<'END_MESSAGE';
return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS');
}
*** Since we're running under CPANPLUS, I'll just let it take care
of the dependency's installation later.
END_MESSAGE
return 1;
require CPAN;
if ($CPAN::VERSION > '1.89') {
if ($cpan_env) {
return _running_under('CPAN');
}
return; # CPAN.pm new enough, don't need to check further
}
_load_cpan();
# last ditch attempt, this -will- configure CPAN, very sorry
_load_cpan(1); # force initialize even though it's already loaded
# Find the CPAN lock-file
my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" );
......@@ -284,7 +324,7 @@ sub install {
while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
# grep out those already installed
if ( defined( _version_check( _load($pkg), $ver ) ) ) {
if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
else {
......@@ -313,7 +353,7 @@ sub install {
@modules = @newmod;
}
if ( _has_cpanplus() ) {
if ( _has_cpanplus() and not $ENV{PERL_AUTOINSTALL_PREFER_CPAN} ) {
_install_cpanplus( \@modules, \@config );
} else {
_install_cpan( \@modules, \@config );
......@@ -323,7 +363,7 @@ sub install {
# see if we have successfully installed them
while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
if ( defined( _version_check( _load($pkg), $ver ) ) ) {
if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
push @installed, $pkg;
}
elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
......@@ -378,7 +418,7 @@ sub _install_cpanplus {
my $success;
my $obj = $modtree->{$pkg};
if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
......@@ -471,7 +511,7 @@ sub _install_cpan {
my $obj = CPAN::Shell->expand( Module => $pkg );
my $success = 0;
if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
my $pathname = $pkg;
$pathname =~ s/::/\\W/;
......@@ -535,7 +575,7 @@ sub _update_to {
my $ver = shift;
return
if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
......@@ -632,9 +672,22 @@ sub _load {
# Load CPAN.pm and it's configuration
sub _load_cpan {
return if $CPAN::VERSION;
return if $CPAN::VERSION and $CPAN::Config and not @_;
require CPAN;
if ( $CPAN::HandleConfig::VERSION ) {
# CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
# CPAN::HandleConfig->load. CPAN reports that the redirection
# is deprecated in a warning printed at the user.
# CPAN-1.81 expects CPAN::HandleConfig->load, does not have
# $CPAN::HandleConfig::VERSION but cannot handle
# CPAN::Config->load
# Which "versions expect CPAN::Config->load?
if ( $CPAN::HandleConfig::VERSION
|| CPAN::HandleConfig->can('load')
) {
# Newer versions of CPAN have a HandleConfig module
CPAN::HandleConfig->load;
} else {
......@@ -644,9 +697,11 @@ sub _load_cpan {
}
# compare two versions, either use Sort::Versions or plain comparison
sub _version_check {
# return values same as <=>
sub _version_cmp {
my ( $cur, $min ) = @_;
return unless defined $cur;
return -1 unless defined $cur; # if 0 keep comparing
return 1 unless $min;
$cur =~ s/\s+$//;
......@@ -657,16 +712,13 @@ sub _version_check {
) {
# use version.pm if it is installed.
return (
( version->new($cur) >= version->new($min) ) ? $cur : undef );
return version->new($cur) <=> version->new($min);
}
elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
{
# use Sort::Versions as the sorting algorithm for a.b.c versions
return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
? $cur
: undef );
return Sort::Versions::versioncmp( $cur, $min );
}
warn "Cannot reliably compare non-decimal formatted versions.\n"
......@@ -675,7 +727,7 @@ sub _version_check {
# plain comparison
local $^W = 0; # shuts off 'not numeric' bugs
return ( $cur >= $min ? $cur : undef );
return $cur <=> $min;
}
# nothing; this usage is deprecated.
......@@ -706,7 +758,7 @@ sub _make_args {
if $Config;
$PostambleActions = (
$missing
($missing and not $UnderCPAN)
? "\$(PERL) $0 --config=$config --installdeps=$missing"
: "\$(NOECHO) \$(NOOP)"
);
......@@ -746,7 +798,7 @@ sub Write {
sub postamble {
$PostambleUsed = 1;
return << ".";
return <<"END_MAKE";
config :: installdeps
\t\$(NOECHO) \$(NOOP)
......@@ -757,7 +809,7 @@ checkdeps ::
installdeps ::
\t$PostambleActions
.
END_MAKE
}
......@@ -765,4 +817,4 @@ installdeps ::
__END__
#line 1003
#line 1071
This diff is collapsed.
......@@ -2,13 +2,13 @@
package Module::Install::AutoInstall;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub AutoInstall { $_[0] }
......@@ -37,12 +37,33 @@ sub auto_install {
$self->include('Module::AutoInstall');
require Module::AutoInstall;
Module::AutoInstall->import(
my @features_require = Module::AutoInstall->import(
(@config ? (-config => \@config) : ()),
(@core ? (-core => \@core) : ()),
$self->features,
);
my %seen;
my @requires = map @$_, map @$_, grep ref, $self->requires;
while (my ($mod, $ver) = splice(@requires, 0, 2)) {
$seen{$mod}{$ver}++;
}
my @build_requires = map @$_, map @$_, grep ref, $self->build_requires;
while (my ($mod, $ver) = splice(@build_requires, 0, 2)) {
$seen{$mod}{$ver}++;
}
my @configure_requires = map @$_, map @$_, grep ref, $self->configure_requires;
while (my ($mod, $ver) = splice(@configure_requires, 0, 2)) {
$seen{$mod}{$ver}++;
}
my @deduped;
while (my ($mod, $ver) = splice(@features_require, 0, 2)) {
push @deduped, $mod => $ver unless $seen{$mod}{$ver}++;
}
$self->requires(@deduped);
$self->makemaker_args( Module::AutoInstall::_make_args() );
my $class = ref($self);
......
#line 1
package Module::Install::Base;
$VERSION = '0.64';
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
$VERSION = '1.00';
}
# Suspend handler for "redefined" warnings
BEGIN {
......@@ -9,52 +13,61 @@ BEGIN {
$SIG{__WARN__} = sub { $w };
}
### This is the ONLY module that shouldn't have strict on
# use strict;
#line 41
#line 42
sub new {
my ($class, %args) = @_;
foreach my $method ( qw(call load) ) {
*{"$class\::$method"} = sub {
shift()->_top->$method(@_);
} unless defined &{"$class\::$method"};
}
bless( \%args, $class );
my $class = shift;
unless ( defined &{"${class}::call"} ) {
*{"${class}::call"} = sub { shift->_top->call(@_) };
}
unless ( defined &{"${class}::load"} ) {
*{"${class}::load"} = sub { shift->_top->load(@_) };
}
bless { @_ }, $class;
}
#line 61
sub AUTOLOAD {
my $self = shift;
local $@;
my $autoload = eval { $self->_top->autoload } or return;
goto &$autoload;
local $@;
my $func = eval { shift->_top->autoload } or return;
goto &$func;
}
#line 76
#line 75
sub _top { $_[0]->{_top} }
sub _top {
$_[0]->{_top};
}
#line 89
#line 90
sub admin {
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
$_[0]->_top->{admin}
or
Module::Install::Base::FakeAdmin->new;
}
#line 106
sub is_admin {
$_[0]->admin->VERSION;
! $_[0]->admin->isa('Module::Install::Base::FakeAdmin');
}
sub DESTROY {}
package Module::Install::Base::FakeAdmin;
my $Fake;
sub new { $Fake ||= bless(\@_, $_[0]) }
use vars qw{$VERSION};
BEGIN {
$VERSION = $Module::Install::Base::VERSION;
}
my $fake;
sub new {
$fake ||= bless(\@_, $_[0]);
}
sub AUTOLOAD {}
......@@ -67,4 +80,4 @@ BEGIN {
1;
#line 138
#line 159
......@@ -2,18 +2,16 @@
package Module::Install::Can;
use strict;
use Module::Install::Base;
use Config ();
### This adds a 5.005 Perl version dependency.
### This is a bug and will be fixed.
use File::Spec ();
use ExtUtils::MakeMaker ();
use vars qw{$VERSION $ISCORE @ISA};
use Config ();
use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
# check if we can load some module
......@@ -39,6 +37,7 @@ sub can_run {
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
my $abs = File::Spec->catfile($dir, $_[1]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
......@@ -79,4 +78,4 @@ if ( $^O eq 'cygwin' ) {
__END__
#line 157
#line 156
......@@ -2,24 +2,24 @@
package Module::Install::Fetch;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub get_file {
my ($self, %args) = @_;
my ($scheme, $host, $path, $file) =
my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
($scheme, $host, $path, $file) =
($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
......
......@@ -2,13 +2,13 @@
package Module::Install::Include;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub include {
......
This diff is collapsed.
This diff is collapsed.
......@@ -2,13 +2,13 @@
package Module::Install::Win32;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$VERSION = '1.00';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
# determine if the user needs nmake, and download it if needed
......@@ -16,7 +16,7 @@ sub check_nmake {
my $self = shift;
$self->load('can_run');
$self->load('get_file');
require Config;
return unless (
$^O eq 'MSWin32' and
......@@ -38,8 +38,7 @@ sub check_nmake {
remove => 1,
);
if (!$rv) {
die <<'END_MESSAGE';
die <<'END_MESSAGE' unless $rv;
-------------------------------------------------------------------------------
......@@ -59,7 +58,7 @@ You may then resume the installation process described in README.
-------------------------------------------------------------------------------
END_MESSAGE
}
}
1;
......@@ -2,42 +2,62 @@
package Module::Install::WriteAll;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.64';
$ISCORE = 1;
$VERSION = '1.00';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
sub WriteAll {
my $self = shift;
my %args = (
meta => 1,
sign => 0,
inline => 0,
check_nmake => 1,
@_
);
$self->sign(1) if $args{sign};
$self->Meta->write if $args{meta};
$self->admin->WriteAll(%args) if $self->is_admin;
if ( $0 =~ /Build.PL$/i ) {
$self->Build->write;
} else {
$self->check_nmake if $args{check_nmake};
unless ( $self->makemaker_args->{'PL_FILES'} ) {
$self->makemaker_args( PL_FILES => {} );
}
if ($args{inline}) {
$self->Inline->write;
} else {
$self->Makefile->write;
}
}
my $self = shift;
my %args = (
meta => 1,
sign => 0,
inline => 0,
check_nmake => 1,
@_,
);
$self->sign(1) if $args{sign};
$self->admin->WriteAll(%args) if $self->is_admin;
$self->check_nmake if $args{check_nmake};
unless ( $self->makemaker_args->{PL_FILES} ) {
# XXX: This still may be a bit over-defensive...
unless ($self->makemaker(6.25)) {
$self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL';
}
}
# Until ExtUtils::MakeMaker support MYMETA.yml, make sure
# we clean it up properly ourself. </