-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile.PL
98 lines (81 loc) · 2.47 KB
/
Makefile.PL
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
# Dist::Zilla::Plugin::MakeMaker::Awesome 0.49.
# Don't edit it but the dist.ini and plugins used to construct it.
use strict;
use warnings;
use 5.008;
use ExtUtils::MakeMaker;
use Config;
use File::Spec;
use Crypt::OpenSSL::Guess;
my %args;
my ($major, $minor, $patch) = openssl_version();
print "Installed OpenSSL: $major.$minor.$patch\n";
$args{INC} = openssl_inc_paths();
$args{LIBS} = [openssl_lib_paths() . ' -lssl -lcrypto'];
my $cc_option_flags = $major ge 3 ? ' -DOPENSSL_API_COMPAT=30000' : ' -DOPENSSL_API_COMPAT=10100';
if ($Config::Config{cc} =~ /gcc/i) {
$cc_option_flags .= $ENV{AUTHOR_TESTING} ? ' -Wall -Werror' : ' -Wall';
} else {
$cc_option_flags .= '';
}
if ($Config{gccversion} =~ /llvm/i) {
if ( $^O eq 'darwin' && (
$Config{gccversion} =~ /LLVM 1[2-9].\d.[5-9]/ ||
$Config{gccversion} =~ /LLVM 1[3-9]/ ))
{
$cc_option_flags .= ' -Wno-deprecated-declarations -Wno-compound-token-split-by-macro';
} else {
$cc_option_flags .= ' -Wno-deprecated-declarations';
}
if ($Config{gccversion} =~ /llvm 13/i) {
$cc_option_flags .= ' -Wno-compound-token-split-by-macro';
}
if ($Config{perl_version} <= 20) {
$cc_option_flags .= ' -Wno-error=pointer-bool-conversion';
}
}
if ($Config{myuname} =~ /sunos|solaris/i) {
$args{OPTIMIZE} = $cc_option_flags;
} else {
$args{OPTIMIZE} = $cc_option_flags;
}
my %WriteMakefileArgs = (
"ABSTRACT" => "OpenSSL Verify certificate verification in XS.",
"AUTHOR" => "Timothy Legge <timlegge\@cpan.org>, Wesley Schwengle <waterkip\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"Crypt::OpenSSL::Guess" => 0,
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Crypt-OpenSSL-Verify",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.008",
"NAME" => "Crypt::OpenSSL::Verify",
"PREREQ_PM" => {
"Crypt::OpenSSL::X509" => 0
},
"TEST_REQUIRES" => {
"File::Slurper" => "0.012",
"Test::Exception" => 0
},
"VERSION" => "0.36",
"test" => {
"TESTS" => "t/*.t t/author/*.t"
}
);
%WriteMakefileArgs = (
%WriteMakefileArgs,
%args,
);
my %FallbackPrereqs = (
"Crypt::OpenSSL::X509" => 0,
"File::Slurper" => "0.012",
"Test::Exception" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION('6.63_03') } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);