Merge tag 'upstream/1.9'
Upstream version 1.9
Salvatore Bonaccorso
11 years ago
0 | 0 | Revision history for Net-Dropbox |
1 | ||
2 | 1.9 2012-10-23T20:26:55 | |
3 | updated Module::Install | |
1 | 4 | |
2 | 5 | 1.8 2012-03-23T12:47:13 |
3 | 6 | Thanks to SureVoIP for updating to v1 API |
9 | 9 | ExtUtils::MakeMaker: 6.36 |
10 | 10 | distribution_type: module |
11 | 11 | dynamic_config: 1 |
12 | generated_by: 'Module::Install version 1.04' | |
12 | generated_by: 'Module::Install version 1.06' | |
13 | 13 | license: perl |
14 | 14 | meta-spec: |
15 | 15 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
34 | 34 | resources: |
35 | 35 | license: http://dev.perl.org/licenses/ |
36 | 36 | repository: https://github.com/norbu09/Net--Dropbox |
37 | version: 1.8 | |
37 | version: 1.9 |
2 | 2 | |
3 | 3 | use strict; |
4 | 4 | use Cwd (); |
5 | use File::Spec (); | |
5 | 6 | use ExtUtils::MakeMaker (); |
6 | 7 | |
7 | 8 | use vars qw{$VERSION}; |
8 | 9 | BEGIN { |
9 | $VERSION = '1.04'; | |
10 | $VERSION = '1.06'; | |
10 | 11 | } |
11 | 12 | |
12 | 13 | # special map on pre-defined feature sets |
186 | 187 | } |
187 | 188 | |
188 | 189 | # XXX: check for conflicts and uninstalls(!) them. |
189 | my $cur = _load($mod); | |
190 | my $cur = _version_of($mod); | |
190 | 191 | if (_version_cmp ($cur, $arg) >= 0) |
191 | 192 | { |
192 | 193 | print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n"; |
347 | 348 | while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) { |
348 | 349 | |
349 | 350 | # grep out those already installed |
350 | if ( _version_cmp( _load($pkg), $ver ) >= 0 ) { | |
351 | if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { | |
351 | 352 | push @installed, $pkg; |
352 | 353 | } |
353 | 354 | else { |
356 | 357 | } |
357 | 358 | |
358 | 359 | if ($UpgradeDeps) { |
359 | push @modules, @installed; | |
360 | @installed = (); | |
360 | push @modules, @installed; | |
361 | @installed = (); | |
361 | 362 | } |
362 | 363 | |
363 | 364 | return @installed unless @modules; # nothing to do |
391 | 392 | |
392 | 393 | # see if we have successfully installed them |
393 | 394 | while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { |
394 | if ( _version_cmp( _load($pkg), $ver ) >= 0 ) { | |
395 | if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { | |
395 | 396 | push @installed, $pkg; |
396 | 397 | } |
397 | 398 | elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) { |
620 | 621 | my $ver = shift; |
621 | 622 | |
622 | 623 | return |
623 | if _version_cmp( _load($class), $ver ) >= 0; # no need to upgrade | |
624 | if _version_cmp( _version_of($class), $ver ) >= 0; # no need to upgrade | |
624 | 625 | |
625 | 626 | if ( |
626 | 627 | _prompt( "==> A newer version of $class ($ver) is required. Install?", |
705 | 706 | |
706 | 707 | # load a module and return the version it reports |
707 | 708 | sub _load { |
708 | my $mod = pop; # class/instance doesn't matter | |
709 | my $mod = pop; # method/function doesn't matter | |
709 | 710 | my $file = $mod; |
710 | ||
711 | 711 | $file =~ s|::|/|g; |
712 | 712 | $file .= '.pm'; |
713 | ||
714 | 713 | local $@; |
715 | 714 | return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 ); |
715 | } | |
716 | ||
717 | # report version without loading a module | |
718 | sub _version_of { | |
719 | my $mod = pop; # method/function doesn't matter | |
720 | my $file = $mod; | |
721 | $file =~ s|::|/|g; | |
722 | $file .= '.pm'; | |
723 | foreach my $dir ( @INC ) { | |
724 | next if ref $dir; | |
725 | my $path = File::Spec->catfile($dir, $file); | |
726 | next unless -e $path; | |
727 | require ExtUtils::MM_Unix; | |
728 | return ExtUtils::MM_Unix->parse_version($path); | |
729 | } | |
730 | return undef; | |
716 | 731 | } |
717 | 732 | |
718 | 733 | # Load CPAN.pm and it's configuration |
911 | 926 | |
912 | 927 | __END__ |
913 | 928 | |
914 | #line 1178 | |
929 | #line 1193 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
3 | 3 | use strict 'vars'; |
4 | 4 | use vars qw{$VERSION}; |
5 | 5 | BEGIN { |
6 | $VERSION = '1.04'; | |
6 | $VERSION = '1.06'; | |
7 | 7 | } |
8 | 8 | |
9 | 9 | # Suspend handler for "redefined" warnings |
2 | 2 | |
3 | 3 | use strict; |
4 | 4 | use Config (); |
5 | use File::Spec (); | |
6 | 5 | use ExtUtils::MakeMaker (); |
7 | 6 | use Module::Install::Base (); |
8 | 7 | |
9 | 8 | use vars qw{$VERSION @ISA $ISCORE}; |
10 | 9 | BEGIN { |
11 | $VERSION = '1.04'; | |
10 | $VERSION = '1.06'; | |
12 | 11 | @ISA = 'Module::Install::Base'; |
13 | 12 | $ISCORE = 1; |
14 | 13 | } |
28 | 27 | eval { require $mod; $pkg->VERSION($ver || 0); 1 }; |
29 | 28 | } |
30 | 29 | |
31 | # check if we can run some command | |
30 | # Check if we can run some command | |
32 | 31 | sub can_run { |
33 | 32 | my ($self, $cmd) = @_; |
34 | 33 | |
37 | 36 | |
38 | 37 | for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { |
39 | 38 | next if $dir eq ''; |
40 | my $abs = File::Spec->catfile($dir, $_[1]); | |
39 | require File::Spec; | |
40 | my $abs = File::Spec->catfile($dir, $cmd); | |
41 | 41 | return $abs if (-x $abs or $abs = MM->maybe_command($abs)); |
42 | 42 | } |
43 | 43 | |
44 | 44 | return; |
45 | 45 | } |
46 | 46 | |
47 | # can we locate a (the) C compiler | |
47 | # Can our C compiler environment build XS files | |
48 | sub can_xs { | |
49 | my $self = shift; | |
50 | ||
51 | # Ensure we have the CBuilder module | |
52 | $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 ); | |
53 | ||
54 | # Do we have the configure_requires checker? | |
55 | local $@; | |
56 | eval "require ExtUtils::CBuilder;"; | |
57 | if ( $@ ) { | |
58 | # They don't obey configure_requires, so it is | |
59 | # someone old and delicate. Try to avoid hurting | |
60 | # them by falling back to an older simpler test. | |
61 | return $self->can_cc(); | |
62 | } | |
63 | ||
64 | # Do we have a working C compiler | |
65 | my $builder = ExtUtils::CBuilder->new( | |
66 | quiet => 1, | |
67 | ); | |
68 | unless ( $builder->have_compiler ) { | |
69 | # No working C compiler | |
70 | return 0; | |
71 | } | |
72 | ||
73 | # Write a C file representative of what XS becomes | |
74 | require File::Temp; | |
75 | my ( $FH, $tmpfile ) = File::Temp::tempfile( | |
76 | "compilexs-XXXXX", | |
77 | SUFFIX => '.c', | |
78 | ); | |
79 | binmode $FH; | |
80 | print $FH <<'END_C'; | |
81 | #include "EXTERN.h" | |
82 | #include "perl.h" | |
83 | #include "XSUB.h" | |
84 | ||
85 | int main(int argc, char **argv) { | |
86 | return 0; | |
87 | } | |
88 | ||
89 | int boot_sanexs() { | |
90 | return 1; | |
91 | } | |
92 | ||
93 | END_C | |
94 | close $FH; | |
95 | ||
96 | # Can the C compiler access the same headers XS does | |
97 | my @libs = (); | |
98 | my $object = undef; | |
99 | eval { | |
100 | local $^W = 0; | |
101 | $object = $builder->compile( | |
102 | source => $tmpfile, | |
103 | ); | |
104 | @libs = $builder->link( | |
105 | objects => $object, | |
106 | module_name => 'sanexs', | |
107 | ); | |
108 | }; | |
109 | my $result = $@ ? 0 : 1; | |
110 | ||
111 | # Clean up all the build files | |
112 | foreach ( $tmpfile, $object, @libs ) { | |
113 | next unless defined $_; | |
114 | 1 while unlink; | |
115 | } | |
116 | ||
117 | return $result; | |
118 | } | |
119 | ||
120 | # Can we locate a (the) C compiler | |
48 | 121 | sub can_cc { |
49 | 122 | my $self = shift; |
50 | 123 | my @chunks = split(/ /, $Config::Config{cc}) or return; |
77 | 150 | |
78 | 151 | __END__ |
79 | 152 | |
80 | #line 156 | |
153 | #line 236 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
7 | 7 | |
8 | 8 | use vars qw{$VERSION @ISA $ISCORE}; |
9 | 9 | BEGIN { |
10 | $VERSION = '1.04'; | |
10 | $VERSION = '1.06'; | |
11 | 11 | @ISA = 'Module::Install::Base'; |
12 | 12 | $ISCORE = 1; |
13 | 13 | } |
214 | 214 | require ExtUtils::MakeMaker; |
215 | 215 | |
216 | 216 | if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { |
217 | # MakeMaker can complain about module versions that include | |
218 | # an underscore, even though its own version may contain one! | |
219 | # Hence the funny regexp to get rid of it. See RT #35800 | |
220 | # for details. | |
221 | my ($v) = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/; | |
222 | $self->build_requires( 'ExtUtils::MakeMaker' => $v ); | |
223 | $self->configure_requires( 'ExtUtils::MakeMaker' => $v ); | |
217 | # This previous attempted to inherit the version of | |
218 | # ExtUtils::MakeMaker in use by the module author, but this | |
219 | # was found to be untenable as some authors build releases | |
220 | # using future dev versions of EU:MM that nobody else has. | |
221 | # Instead, #toolchain suggests we use 6.59 which is the most | |
222 | # stable version on CPAN at time of writing and is, to quote | |
223 | # ribasushi, "not terminally fucked, > and tested enough". | |
224 | # TODO: We will now need to maintain this over time to push | |
225 | # the version up as new versions are released. | |
226 | $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 ); | |
227 | $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 ); | |
224 | 228 | } else { |
225 | 229 | # Allow legacy-compatibility with 5.005 by depending on the |
226 | 230 | # most recent EU:MM that supported 5.005. |
410 | 414 | |
411 | 415 | __END__ |
412 | 416 | |
413 | #line 540 | |
417 | #line 544 |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = 'Module::Install::Base'; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
5 | 5 | |
6 | 6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | 7 | BEGIN { |
8 | $VERSION = '1.04'; | |
8 | $VERSION = '1.06'; | |
9 | 9 | @ISA = qw{Module::Install::Base}; |
10 | 10 | $ISCORE = 1; |
11 | 11 | } |
30 | 30 | # This is not enforced yet, but will be some time in the next few |
31 | 31 | # releases once we can make sure it won't clash with custom |
32 | 32 | # Module::Install extensions. |
33 | $VERSION = '1.04'; | |
33 | $VERSION = '1.06'; | |
34 | 34 | |
35 | 35 | # Storage for the pseudo-singleton |
36 | 36 | $MAIN = undef; |
466 | 466 | |
467 | 467 | 1; |
468 | 468 | |
469 | # Copyright 2008 - 2011 Adam Kennedy. | |
469 | # Copyright 2008 - 2012 Adam Kennedy. |