~ubuntu-branches/ubuntu/edgy/libwww-perl/edgy

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2005-02-13 18:45:32 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050213184532-67qvopi4wre3010u
Tags: 5.803-4
* Make GET/POST/HEAD symlinks (Closes: #294597)
* lwp-requests now honors -b when dumping links (Closes: #294595)
  - Thanks to giuseppe bonacci for the patch
* Moved symlinks to a libwww-perl.links file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This -*- perl -*- script writes the Makefile for libwww-perl
2
 
# $Id: Makefile.PL,v 1.63 2002/01/03 01:51:36 gisle Exp $
 
2
# $Id: Makefile.PL,v 1.75 2004/11/30 11:51:58 gisle Exp $
3
3
 
4
4
require 5.005;
5
5
use strict;
6
 
use ExtUtils::MakeMaker;
7
 
use Config;
 
6
use ExtUtils::MakeMaker qw(WriteMakefile prompt);
 
7
use Config qw(%Config);
8
8
 
9
9
#--- Configuration section ---
10
10
 
24
24
}
25
25
@programs_to_install = () if $opt_n || grep /^LIB=/, @ARGV;
26
26
 
 
27
# Check if we should try to run tests that talk to ourself
 
28
system(qq("$^X" talk-to-ourself));
 
29
if ($?) {
 
30
    print <<EOT;
 
31
 
 
32
You appear to have a misconfigured system, so I will disable tests
 
33
that try to talk HTTP to a local server.
 
34
EOT
 
35
    unlink("t/CAN_TALK_TO_OURSELF");
 
36
}
 
37
else {
 
38
    open(CAN_TALK_TO_OURSELF, ">t/CAN_TALK_TO_OURSELF") || die "Can't create CAN_TALK_TO_OURSELF: $!";
 
39
    close(CAN_TALK_TO_OURSELF);
 
40
}
 
41
 
27
42
# Check if we should try to run the live tests
28
43
open(CHANGES, "Changes") || die "Can't open Changes: $!";
29
44
my $release_date;
73
88
                close(ZLIB_OK);
74
89
            };
75
90
            if ($@) {
76
 
                warn $@;
 
91
                #warn $@;
77
92
                unlink("t/live/ZLIB_OK");
78
93
            }
79
94
        }
87
102
    print <<EOT;
88
103
 
89
104
This package comes with some sample programs that I can try
90
 
to install in $Config{sitebin}.
 
105
to install in $Config{installscript}.
91
106
 
92
107
   Note that you can avoid these questions by passing
93
108
   the '-n' option to 'Makefile.PL'.
100
115
        }
101
116
    }
102
117
    @programs_to_install = @tmp;
 
118
}
103
119
 
104
 
    if (grep($_ eq 'lwp-request', @programs_to_install) && @request_aliases) {
105
 
        print <<EOT;
 
120
if (grep($_ eq 'lwp-request', @programs_to_install) && @request_aliases) {
 
121
    print <<EOT;
106
122
 
107
123
The lwp-request program will use the name it is invoked with to
108
124
determine what HTTP method to use.  I can set up alias for the most
109
125
common HTTP methods.  These alias are also installed in
110
 
$Config{sitebin}.
 
126
$Config{installscript}.
111
127
 
112
128
EOT
113
 
        @tmp = ();
114
 
        for (@request_aliases) {
115
 
            if (prompt("Do you want to install the $_ alias?", "y") =~ /^y/) {
116
 
                push(@tmp, $_);
117
 
            }
 
129
    my @tmp;
 
130
    for my $alias (@request_aliases) {
 
131
        my $default = "n";
 
132
        my $default = "y";
 
133
        if (prompt("Do you want to install the $alias alias?", $default) =~ /^y/) {
 
134
            push(@tmp, $alias);
118
135
        }
119
 
        @request_aliases = @tmp;
120
136
    }
 
137
    @request_aliases = @tmp;
 
138
}
 
139
else {
 
140
    @request_aliases = ();
121
141
}
122
142
 
123
143
# Check for non-standard modules that are used by this library.
139
159
 
140
160
EOT
141
161
    sleep(2);  # Don't hurry too much
142
 
} else {
 
162
}
 
163
else {
143
164
    print " ok\n";
144
165
}
145
166
print "Checking for HTML::Parser..";
146
167
eval {
147
168
    require HTML::HeadParser;
148
 
    HTML::Parser->VERSION(2.20);
 
169
    HTML::Parser->VERSION(3.33);
149
170
};
150
171
if ($@) {
151
172
    print " failed\n";
158
179
 
159
180
EOT
160
181
    sleep(2);  # Don't hurry too much
161
 
} else {
 
182
}
 
183
else {
162
184
    print " ok\n";
163
185
}
164
186
 
176
198
 
177
199
EOT
178
200
    sleep(2);  # Don't hurry too much
179
 
} else {
 
201
}
 
202
else {
180
203
    print " ok\n";
181
204
}
182
205
 
197
220
 
198
221
EOT
199
222
    sleep(2);  # Don't hurry too much
200
 
} else {
 
223
}
 
224
else {
201
225
    print " ok\n";
202
226
}
203
227
 
216
240
worry too much about this.
217
241
 
218
242
EOT
219
 
} else {
 
243
}
 
244
else {
220
245
    print " ok\n";
221
246
}
222
247
 
247
272
   PREREQ_PM     => { 'URI'              => "1.10",
248
273
                      'MIME::Base64'     => "2.1",
249
274
                      'Net::FTP'         => "2.58",
250
 
                      'HTML::HeadParser' => 0,
 
275
                      'HTML::Parser'     => "3.33",
251
276
                      'Digest::MD5'      => 0,
 
277
                      'Compress::Zlib'   => "1.10",
252
278
                     },
253
279
   'clean'       => { FILES => join(" ", map "bin/$_", @request_aliases) },
254
280
   'dist'        => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
275
301
sub libscan
276
302
{
277
303
    my($self, $path) = @_;
278
 
    return '' if $path =~ m/.(pl|dtd|sgml)$/;
 
304
    return '' if $path =~ m/\.(pl|dtd|sgml)$/;
279
305
    return '' if $path =~ m:\bCVS/:;
280
306
    return '' if $path =~ m/~$/;
281
307
    $path;