~ubuntu-branches/ubuntu/oneiric/libdatetimex-easy-perl/oneiric

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2010-08-28 01:45:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100828014516-5j19aql8jw9y4567
Tags: 0.089-1
* New upstream release.
* Convert to source format 3.0 (quilt).
* Add /me to Uploaders.
* debian/copyright: update years of upstream copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
use inc::Module::Install;
2
 
 
3
 
name 'DateTimeX-Easy';
4
 
all_from 'lib/DateTimeX/Easy.pm';
5
 
 
6
 
resources repository => 'http://github.com/robertkrimen/datetimex-easy/tree/master';
7
 
 
8
 
{
9
 
    require ExtUtils::MakeMaker;
10
 
    use strict;
11
 
    no strict 'refs';
12
 
 
13
 
    my $libscan = \&{"ExtUtils::MM_Any::libscan"};
14
 
    *{"ExtUtils::MM_Any::libscan"} = sub {
15
 
        return '' unless $libscan->(@_);
16
 
        return '' if $_[1] =~ /\.sw[p-z]$/;
17
 
        return $_[1];
18
 
    };
19
 
}
20
 
 
21
 
{
22
 
    map { my ($pk, $vr) = split m/\s/; build_requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
23
 
Test::Most
24
 
_END_
25
 
 
26
 
    map { my ($pk, $vr) = split m/\s/; requires $pk => $vr || 0 } grep { ! /^\s*#/ } split m/\n/, <<_END_;
27
 
Date::Parse
28
 
Time::Zone
29
 
DateTime
30
 
DateTime::Format::Natural
31
 
DateTime::Format::Flexible
32
 
DateTime::Format::ICal
33
 
DateTime::Format::DateManip
34
 
Scalar::Util
35
 
_END_
36
 
}
37
 
 
38
 
if (-e 'inc/.author') {
39
 
    my $all_from = join '/', 'lib', split m/-/, name . '.pm';
40
 
    `perldoc -tF $all_from > README` if ! -e 'README' || (stat $all_from)[9] > (stat 'README')[9];
41
 
}
42
 
 
43
 
auto_install;
44
 
 
45
 
WriteAll;
 
1
 
 
2
use strict;
 
3
use warnings;
 
4
 
 
5
 
 
6
 
 
7
use ExtUtils::MakeMaker 6.31;
 
8
 
 
9
 
 
10
 
 
11
my %WriteMakefileArgs = (
 
12
                       'test' => {
 
13
                                   'TESTS' => 't/*.t'
 
14
                                 },
 
15
                       'NAME' => 'DateTimeX::Easy',
 
16
                       'DISTNAME' => 'DateTimeX-Easy',
 
17
                       'CONFIGURE_REQUIRES' => {
 
18
                                                 'ExtUtils::MakeMaker' => '6.31'
 
19
                                               },
 
20
                       'AUTHOR' => 'Robert Krimen <robertkrimen@gmail.com>',
 
21
                       'BUILD_REQUIRES' => {
 
22
                                             'Test::Most' => '0'
 
23
                                           },
 
24
                       'ABSTRACT' => 'Parse a date/time string using the best method available',
 
25
                       'EXE_FILES' => [],
 
26
                       'VERSION' => '0.089',
 
27
                       'PREREQ_PM' => {
 
28
                                        'Scalar::Util' => '0',
 
29
                                        'DateTime::Format::Flexible' => '0',
 
30
                                        'DateTime' => '0',
 
31
                                        'DateTime::Format::Natural' => '0',
 
32
                                        'DateTime::Format::ICal' => '0',
 
33
                                        'Time::Zone' => '0',
 
34
                                        'Date::Parse' => '0'
 
35
                                      },
 
36
                       'LICENSE' => 'perl'
 
37
                     );
 
38
 
 
39
 
 
40
unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
 
41
  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
 
42
  my $pp = $WriteMakefileArgs{PREREQ_PM}; 
 
43
  for my $mod ( keys %$br ) {
 
44
    if ( exists $pp->{$mod} ) {
 
45
      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; 
 
46
    }
 
47
    else {
 
48
      $pp->{$mod} = $br->{$mod};
 
49
    }
 
50
  }
 
51
}
 
52
 
 
53
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
 
54
  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
55
 
 
56
WriteMakefile(%WriteMakefileArgs);
 
57
 
 
58
 
46
59