perl-libnet.git  about / heads / tags
Unnamed repository; edit this file 'description' to name the repository.
blob 463bd250ed6d87d4ff11a8773ed23a5725efabe5 8369 bytes (raw)
$ git show nntp-compress:Makefile.PL	# shows this blob on the CLI

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
 
#!perl
#===============================================================================
#
# Makefile.PL
#
# DESCRIPTION
#   Makefile creation script.
#
# COPYRIGHT
#   Copyright (C) 2014, 2015 Steve Hay.  All rights reserved.
#
# LICENCE
#   This script is free software; you can redistribute it and/or modify it under
#   the same terms as Perl itself, i.e. under the terms of either the GNU
#   General Public License or the Artistic License, as specified in the LICENCE
#   file.
#
#===============================================================================

use 5.008001;

use strict;
use warnings;

use ExtUtils::MakeMaker 6.64;
use ExtUtils::MakeMaker qw(WriteMakefile);

## no critic (Subroutines::ProhibitSubroutinePrototypes)

sub running_under_cpan();

#===============================================================================
# INITIALIZATION
#===============================================================================

our($CfgFile, $CfgPath);

BEGIN {
    $CfgFile = 'libnet.cfg';
    $CfgPath = "Net/$CfgFile";
}

#===============================================================================
# MAIN PROGRAM
#===============================================================================

MAIN: {
    my %prereq_pms = ();
    $prereq_pms{'Convert::EBCDIC'} = '0.06' if $^O eq 'os390';

    my $xt = 'n';
    if (not running_under_cpan() and not $ENV{PERL_CORE}) {
        $xt = prompt("Should I do external tests?\n" .
                     "These tests will fail if there is no internet" .
                     " connection or if a firewall\n" .
                     "blocks or modifies some traffic.\n" .
                     "[y/N]", 'n');
    }

    my $tests = 't/*.t';
    $tests .= ' t/external/*.t' if $xt =~ m/^y/io;

    WriteMakefile(
        NAME     => 'Net',
        DISTNAME => 'libnet',
        ABSTRACT => 'Collection of network protocol modules',
        AUTHOR   => 'Graham Barr <gbarr@pobox.com>, Steve Hay <shay@cpan.org>',
        LICENSE  => 'perl_5',
        VERSION  => '3.12',

        META_MERGE => {
            'meta-spec' => {
                version => 2
            },

            resources => {
                repository => {
                    type => 'git',
                    url  => 'https://github.com/steve-m-hay/perl-libnet.git'
                }
            },

            optional_features => {
                APOP => {
                    description => 'APOP support',
                    prereqs => {
                        runtime => {
                            requires => {
                                'Digest::MD5' => '0'
                            }
                        }
                    }
                },

                AUTH => {
                    description => 'AUTH support',
                    prereqs => {
                        runtime => {
                            requires => {
                                'Authen::SASL' => '0',
                                'MIME::Base64' => '0'
                            }
                        }
                    }
                },

                SSL => {
                    description => 'SSL support',
                    prereqs => {
                        runtime => {
                            requires => {
                                'IO::Socket::SSL' => '2.007'
                            }
                        }
                    }
                },

                IPv6 => {
                    description => 'IPv6 support',
                    prereqs => {
                        runtime => {
                            requires => {
                                'IO::Socket::IP' => '0.25'
                            # or IO::Socket::INET6 2.62
                            }
                        }
                    }
                },

                COMPRESS => {
                    description => 'NNTP COMPRESS support',
                    prereqs => {
                        runtime => {
                            requires => {
                                'Compress::Raw::Zlib' => 0
                            }
                        }
                    }
                },
                changestest => {
                    description => 'Changes testing',
                    prereqs => {
                        test => {
                            requires => {
                                'Test::CPAN::Changes' => '0'
                            }
                        }
                    }
                },

                critictest => {
                    description => 'Perl::Critic testing',
                    prereqs => {
                        test => {
                            requires => {
                                'Test::Perl::Critic' => '0'
                            }
                        }
                    }
                },

                podtest => {
                    description => 'POD testing',
                    prereqs => {
                        test => {
                            requires => {
                                'Test::Pod' => '1.00'
                            }
                        }
                    }
                },

                podcoveragetest => {
                    description => 'POD coverage testing',
                    prereqs => {
                        test => {
                            requires => {
                                'Test::Pod::Coverage' => '0.08'
                            }
                        }
                    }
                }
            }
        },

        MIN_PERL_VERSION => '5.008001',

        CONFIGURE_REQUIRES => {
            'ExtUtils::MakeMaker' => '6.64',
            'Getopt::Std'         => '0',
            'IO::File'            => '0',
            'perl'                => '5.008001',
            'strict'              => '0',
            'vars'                => '0',
            'warnings'            => '0'
        },

        TEST_REQUIRES => {
            'Config' => '0',
            'Cwd'    => '0'
        },

        PREREQ_PM => {
            %prereq_pms,
            'Carp'           => '0',
            'Errno'          => '0',
            'Exporter'       => '0',
            'Fcntl'          => '0',
            'File::Basename' => '0',
            'FileHandle'     => '0',
            'IO::Select'     => '0',
            'IO::Socket'     => '1.05',
            'POSIX'          => '0',
            'Socket'         => '2.016',
            'Symbol'         => '0',
            'Time::Local'    => '0',
            'constant'       => '0',
            'strict'         => '0',
            'utf8'           => '0',
            'vars'           => '0'
        },

        INSTALLDIRS => ($] < 5.011 ? 'perl' : 'site'),

        realclean => {
            FILES => $CfgFile
        },

        test => {
            TESTS => $tests
        },

        dist => {
            PREOP   => 'find $(DISTVNAME) -type d -print|xargs chmod 0755 && ' .
                       'find $(DISTVNAME) -type f -print|xargs chmod 0644',
            TO_UNIX => 'find $(DISTVNAME) -type f -print|xargs dos2unix'
        }
    );
}

#===============================================================================
# MAKEMAKER OVERRIDES
#===============================================================================

sub MY::post_initialize {
    my $self = shift;

    return '' if $self->{PERL_CORE};

    if (not -f $CfgFile) {
        my @args = qw(Configure);
        push @args, '-d' if $ENV{PERL5_CPAN_IS_RUNNING}     ||
                            $ENV{PERL5_CPANPLUS_IS_RUNNING} ||
                            $ENV{PERL5_CPANM_IS_RUNNING};
        system(($^O eq 'VMS' ? 'mcr ': ()), $^X, @args)
    }

    $self->{PM}{$CfgFile} = $self->catfile('$(INST_LIBDIR)',$CfgPath);

    return '';
}

#===============================================================================
# SUBROUTINES
#===============================================================================

sub running_under_cpan() {
    return $ENV{PERL5_CPAN_IS_RUNNING}     || # cpan
           $ENV{PERL5_CPANPLUS_IS_RUNNING} || # cpanp
           $ENV{PERL5_CPANM_IS_RUNNING};      # cpanm
}

#===============================================================================

git clone https://80x24.org/perl-libnet.git