perl-Net-SSLeay/Net-SSLeay-1.86_09-pkgconfig.patch
Paul Howarth f67ec24665 Update ExtUtils::PkgConfig patch
The ExtUtils::PkgConfig->exists method was introduced in
ExtUtils::PkgConfig version 1.16.
2020-02-05 12:00:42 +00:00

25 lines
948 B
Diff

--- Makefile.PL
+++ Makefile.PL
@@ -201,11 +201,16 @@ EOM
@{ $opts->{lib_links} } = map { $_ =~ s/32\b//g } @{ $opts->{lib_links} } if $Config{use64bitall};
}
else {
- push @{ $opts->{lib_links} },
- ($rsaref
- ? qw( ssl crypto RSAglue rsaref z )
- : qw( ssl crypto z )
- );
+ if ( eval { require ExtUtils::PkgConfig; ExtUtils::PkgConfig->VERSION('1.16') } && ExtUtils::PkgConfig->exists('openssl') ) {
+ push @{ $opts->{lib_links} }, map { s/^-l//; $_ } split(' ', ExtUtils::PkgConfig->libs_only_l('openssl'));
+ }
+ else {
+ push @{ $opts->{lib_links} },
+ ($rsaref
+ ? qw( ssl crypto RSAglue rsaref z )
+ : qw( ssl crypto z )
+ );
+ }
if (($Config{cc} =~ /aCC/i) && $^O eq 'hpux') {
print "*** Enabling HPUX aCC options (+e)\n";