Codebase list libgit-pureperl-perl / 333e570
Imported Upstream version 0.50 gregor herrmann 10 years ago
15 changed file(s) with 133 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl module Git::PurePerl:
1
2 0.50 Sat Jan 25 14:58:16 CET 2014
3 - Now with the changes from 0.49 in CHANGES. That's it.
4
5 0.49 Sat Jan 25 14:55:42 CET 2014
6 - qw() in list context is an error now (gregor herrmann)
7 - Fixed RT#90667 (Zoffix Znet)
18
29 0.48 Thu Jul 14 22:53:55 BST 2011
310 - Translation from Digest::SHA1 to Digest::SHA (Jonas Genannt)
33 - 'Leon Brocard <acme@astray.com>'
44 - 'Leon Brocard <acme@astray.com>'
55 build_requires:
6 ExtUtils::MakeMaker: 6.42
6 ExtUtils::MakeMaker: 6.36
77 Test::More: 0.88
88 Test::utf8: 0.02
99 configure_requires:
10 ExtUtils::MakeMaker: 6.42
10 ExtUtils::MakeMaker: 6.36
1111 distribution_type: module
12 generated_by: 'Module::Install version 1.01'
12 dynamic_config: 1
13 generated_by: 'Module::Install version 1.06'
1314 license: perl
1415 meta-spec:
1516 url: http://module-build.sourceforge.net/META-spec-v1.4.html
3536 resources:
3637 license: http://dev.perl.org/licenses/
3738 repository: git://github.com/bobtfish/git-pureperl.git
38 version: 0.48
39 version: 0.50
33 use strict 'vars';
44 use vars qw{$VERSION};
55 BEGIN {
6 $VERSION = '1.01';
6 $VERSION = '1.06';
77 }
88
99 # Suspend handler for "redefined" warnings
22
33 use strict;
44 use Config ();
5 use File::Spec ();
65 use ExtUtils::MakeMaker ();
76 use Module::Install::Base ();
87
98 use vars qw{$VERSION @ISA $ISCORE};
109 BEGIN {
11 $VERSION = '1.01';
10 $VERSION = '1.06';
1211 @ISA = 'Module::Install::Base';
1312 $ISCORE = 1;
1413 }
2827 eval { require $mod; $pkg->VERSION($ver || 0); 1 };
2928 }
3029
31 # check if we can run some command
30 # Check if we can run some command
3231 sub can_run {
3332 my ($self, $cmd) = @_;
3433
3736
3837 for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
3938 next if $dir eq '';
40 my $abs = File::Spec->catfile($dir, $_[1]);
39 require File::Spec;
40 my $abs = File::Spec->catfile($dir, $cmd);
4141 return $abs if (-x $abs or $abs = MM->maybe_command($abs));
4242 }
4343
4444 return;
4545 }
4646
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
48121 sub can_cc {
49122 my $self = shift;
50123 my @chunks = split(/ /, $Config::Config{cc}) or return;
77150
78151 __END__
79152
80 #line 156
153 #line 236
55
66 use vars qw{$VERSION @ISA $ISCORE};
77 BEGIN {
8 $VERSION = '1.01';
8 $VERSION = '1.06';
99 @ISA = 'Module::Install::Base';
1010 $ISCORE = 1;
1111 }
77
88 use vars qw{$VERSION @ISA $ISCORE};
99 BEGIN {
10 $VERSION = '1.01';
10 $VERSION = '1.06';
1111 @ISA = 'Module::Install::Base';
1212 $ISCORE = 1;
1313 }
214214 require ExtUtils::MakeMaker;
215215
216216 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 );
224228 } else {
225229 # Allow legacy-compatibility with 5.005 by depending on the
226230 # most recent EU:MM that supported 5.005.
227 $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
228 $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
231 $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
232 $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
229233 }
230234
231235 # Generate the MakeMaker params
240244 'all_from' if you prefer) in Makefile.PL.
241245 EOT
242246
243 $DB::single = 1;
244247 if ( $self->tests ) {
245248 my @tests = split ' ', $self->tests;
246249 my %seen;
411414
412415 __END__
413416
414 #line 541
417 #line 544
55
66 use vars qw{$VERSION @ISA $ISCORE};
77 BEGIN {
8 $VERSION = '1.01';
8 $VERSION = '1.06';
99 @ISA = 'Module::Install::Base';
1010 $ISCORE = 1;
1111 }
150150 sub install_as_vendor { $_[0]->installdirs('vendor') }
151151
152152 sub dynamic_config {
153 my $self = shift;
154 unless ( @_ ) {
155 warn "You MUST provide an explicit true/false value to dynamic_config\n";
156 return $self;
157 }
158 $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
153 my $self = shift;
154 my $value = @_ ? shift : 1;
155 if ( $self->{values}->{dynamic_config} ) {
156 # Once dynamic we never change to static, for safety
157 return 0;
158 }
159 $self->{values}->{dynamic_config} = $value ? 1 : 0;
159160 return 1;
161 }
162
163 # Convenience command
164 sub static_config {
165 shift->dynamic_config(0);
160166 }
161167
162168 sub perl_version {
169175 # Normalize the version
170176 $version = $self->_perl_version($version);
171177
172 # We don't support the reall old versions
178 # We don't support the really old versions
173179 unless ( $version >= 5.005 ) {
174180 die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
175181 }
581587 sub requires_from {
582588 my $self = shift;
583589 my $content = Module::Install::_readperl($_[0]);
584 my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
590 my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
585591 while ( @requires ) {
586592 my $module = shift @requires;
587593 my $version = shift @requires;
55
66 use vars qw{$VERSION @ISA $ISCORE};
77 BEGIN {
8 $VERSION = '1.01';
8 $VERSION = '1.06';
99 @ISA = 'Module::Install::Base';
1010 $ISCORE = 1;
1111 }
55
66 use vars qw{$VERSION @ISA $ISCORE};
77 BEGIN {
8 $VERSION = '1.01';
8 $VERSION = '1.06';
99 @ISA = qw{Module::Install::Base};
1010 $ISCORE = 1;
1111 }
3030 # This is not enforced yet, but will be some time in the next few
3131 # releases once we can make sure it won't clash with custom
3232 # Module::Install extensions.
33 $VERSION = '1.01';
33 $VERSION = '1.06';
3434
3535 # Storage for the pseudo-singleton
3636 $MAIN = undef;
450450 }
451451
452452 sub _cmp ($$) {
453 _version($_[0]) <=> _version($_[1]);
453 _version($_[1]) <=> _version($_[2]);
454454 }
455455
456456 # Cloned from Params::Util::_CLASS
466466
467467 1;
468468
469 # Copyright 2008 - 2011 Adam Kennedy.
469 # Copyright 2008 - 2012 Adam Kennedy.
33 use Moose::Util::TypeConstraints;
44 use namespace::autoclean;
55
6 enum 'ObjectKind' => qw(commit tree blob tag);
6 enum 'ObjectKind' => [qw(commit tree blob tag)];
77
88 has 'kind' => ( is => 'ro', isa => 'ObjectKind', required => 1 );
99 has 'size' => ( is => 'ro', isa => 'Int', required => 0, lazy_build => 1 );
33 use Moose::Util::TypeConstraints;
44 use namespace::autoclean;
55
6 enum 'ObjectKind' => qw(commit tree blob tag);
6 enum 'ObjectKind' => [qw(commit tree blob tag)];
77
88 has 'kind' => ( is => 'ro', isa => 'ObjectKind', required => 1 );
99 has 'size' => ( is => 'ro', isa => 'Int', required => 1 );
3636 use Path::Class;
3737 use namespace::autoclean;
3838
39 our $VERSION = '0.48';
39 our $VERSION = '0.50';
4040 $VERSION = eval $VERSION;
4141
4242 has 'directory' => (
33 use Test::More;
44 use Archive::Extract;
55
6 foreach my $name qw(test-project test-project-packs test-project-packs2 test-encoding) {
6 foreach my $name (qw(test-project test-project-packs test-project-packs2 test-encoding)) {
77 next if -d $name;
88 my $ae = Archive::Extract->new( archive => "$name.tgz" );
99 $ae->extract;
66
77 my $checkout_directory = dir('t/checkout');
88
9 foreach my $directory qw(test-project test-project-packs test-project-packs2)
9 foreach my $directory (qw(test-project test-project-packs test-project-packs2))
1010 {
1111 my $git = Git::PurePerl->new( directory => $directory );
1212 like( $git->master_sha1, qr/^[a-z0-9]{40}$/ );