~ubuntu-branches/ubuntu/intrepid/horae/intrepid

« back to all changes in this revision

Viewing changes to 0CPAN/Tk-Pod-0.9932/Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- perl -*-
2
 
 
3
 
use ExtUtils::MakeMaker;
4
 
 
5
 
$DIST_VERSION = "0.9932";
6
 
$is_devel_host = defined $ENV{USER} && $ENV{USER} eq 'eserte' && $^O =~ /bsd/i && -f "../../perl.release.mk";
7
 
if ($is_devel_host) {
8
 
    open(P, "Pod.pm") or die "Can't open Pod.pm: $!";
9
 
 SEARCH_FOR_DIST_VERSION: {
10
 
        while(<P>) {
11
 
            if (/DIST_VERSION\s*=\s*\"(.*)\"/) {
12
 
                if ($DIST_VERSION ne $1) {
13
 
                    die "Please adjust DIST_VERSION in Makefile.PL";
14
 
                }
15
 
                last SEARCH_FOR_DIST_VERSION;
16
 
            }
17
 
        }
18
 
        die "Cannot find DIST_VERSION definition in Pod.pm";
19
 
    }
20
 
 
21
 
    if (!eval { require YAML; 1 }) {
22
 
        warn "Please install YAML, otherwise no META.yml check could be done!";
23
 
    } else {
24
 
        my $meta = YAML::LoadFile("META.yml");
25
 
        if ($meta->{version} ne $DIST_VERSION) {
26
 
            die "Please fix version in META.yml!\n";
27
 
        }
28
 
    }
29
 
}
30
 
 
31
 
WriteMakefile(
32
 
        'PREREQ_PM'     => { 'Tk'             => 800.004,
33
 
                             'Pod::Simple'    => 2.05, # there at least in 2.03 bugs when processing "-f ..." output
34
 
                             'File::Temp'     => 0,
35
 
                             # the following are really only COREQUISITES
36
 
                             'Text::English'  => 0,
37
 
                             'Tk::HistEntry'  => 0.40,
38
 
                           },
39
 
        'DISTNAME'      => 'Tk-Pod',
40
 
        'NAME'          => 'Tk::Pod',
41
 
        'VERSION'       => $DIST_VERSION,
42
 
        'NO_META'       => 1,
43
 
 
44
 
        'DIR'           => [],  # Tk-Pod dist build dir is ignored
45
 
 
46
 
        'EXE_FILES'     => [ 'tkpod', 'tkmore' ],
47
 
 
48
 
        'dist'          => {'POSTOP'=>'-$(CHMOD) 644 $(DISTVNAME).tar$(SUFFIX)'},
49
 
);
50
 
 
51
 
sub MY::postamble {
52
 
    my $postamble = <<'EOF';
53
 
demo :: pure_all
54
 
        $(FULLPERL) -w -Mblib tkpod -tree -nodebug
55
 
 
56
 
EOF
57
 
 
58
 
    if ($is_devel_host) {
59
 
        $postamble .= <<'EOF';
60
 
 
61
 
.include "../../perl.release.mk"
62
 
.include "../../perl.cvs.mk"
63
 
 
64
 
EOF
65
 
    }
66
 
 
67
 
    $postamble;
68
 
}