Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 69 lines (65 sloc) 2.013 kb
4c59fee5 » rjbs
2007-07-29 kwalitee nonsense
1 #!/usr/bin/perl
2 use ExtUtils::MakeMaker;
53b49b45 »
2011-07-13 make optional modules optional
3 #use strict;
4 #use warnings;
4c59fee5 » rjbs
2007-07-29 kwalitee nonsense
5
6 #------------------------------------------------------------
7 # Makefile:
8 #------------------------------------------------------------
8b09b832 » rjbs
2007-07-31 use Email::Date for email dates
9 my %prereq = (
6b127fc2 » rjbs
2007-12-01 use Email::Date::Format
10 'File::Spec' => 0,
a7e406cc » rjbs
2009-11-09 basename has always been core
11 'File::Basename' => 0,
6b127fc2 » rjbs
2007-12-01 use Email::Date::Format
12 'Email::Date::Format' => '1.000', # first release
8b09b832 » rjbs
2007-07-31 use Email::Date for email dates
13 );
53b49b45 »
2011-07-13 make optional modules optional
14 my %optional = (
4c59fee5 » rjbs
2007-07-29 kwalitee nonsense
15 'Mail::Address' => 1.62,
436e026b » rjbs
2009-09-17 adapt to work with latest MIME::Types
16 'MIME::Types' => 1.28,
53b49b45 »
2011-07-13 make optional modules optional
17 'MIME::Base64' => 0,
18 'MIME::QuotedPrint' => 0,
19 );
20
21 my $str = '';
22 foreach my $name (keys %optional) {
23 eval "use $name";
24 if ($@) {
25 $str .= "\t$name $optional{$name}\n";
26 } elsif ($name->VERSION < $optional{$name}) {
27 my $version = $name->VERSION;
28 $str .= "\t$name $optional{$name} (we found $version)\n";
29 }
30 }
31
32 if ($str) {
33 print "MIME::Lite is designed to take advantage of a variety of external modules\n",
34 "if they are not present then MIME::Lite will attempt to do its best\n",
35 "but its strongly recommend that you install them.\n\n",
36 "These modules are:\n",
37 $str,
38 "Some or all of these maybe included with your perl, neverless if you wish\n",
39 "I can add these modules to the prereq list which will cause the files to be\n",
40 "automatically installed if they arent already present\n";
41 if (prompt("Add prereqs?",'Yes')=~/y/i) {
42 %prereq=( %prereq,
43 %optional,
44 );
45 }
4c59fee5 » rjbs
2007-07-29 kwalitee nonsense
46 }
47
48 # Write the Makefile:
49 WriteMakefile(
50 NAME => 'MIME::Lite',
51 (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
52 VERSION_FROM => "lib/MIME/Lite.pm",
53 DISTNAME => "MIME-Lite",
54 EXE_FILES => [@EXES],
55 'dist' => {
56 #PREOP => 'cvu_perl_preop -m MIME::Lite -f',#demerphq
57 COMPRESS => 'gzip',
58 SUFFIX => 'gz',
59 },
b9dd9d2d » rjbs
2009-01-16 add repo to meta
60 (eval { ExtUtils::MakeMaker->VERSION(6.46) }
61 ? (META_MERGE => {
62 resources => {
63 Repository => 'http://github.com/rjbs/mime-lite'
64 }
65 })
66 : ()
67 ),
4c59fee5 » rjbs
2007-07-29 kwalitee nonsense
68 'PREREQ_PM' => \%prereq,
69 );
70
Something went wrong with that request. Please try again.