From f571bb6a6929c47b8323c6f2c5214cfefa9dcf37 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Sat, 30 Mar 2019 08:06:53 +0000 Subject: [PATCH] Get libraries to link against from pkg-config Upstream pull request: https://github.com/radiator-software/p5-net-ssleay/pull/127 --- Net-SSLeay-1.86_09-pkgconfig.patch | 24 ++++++++++++++++++++++++ perl-Net-SSLeay.spec | 12 +++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 Net-SSLeay-1.86_09-pkgconfig.patch diff --git a/Net-SSLeay-1.86_09-pkgconfig.patch b/Net-SSLeay-1.86_09-pkgconfig.patch new file mode 100644 index 0000000..16d727b --- /dev/null +++ b/Net-SSLeay-1.86_09-pkgconfig.patch @@ -0,0 +1,24 @@ +--- 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->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"; diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec index 77445f4..6ce63a8 100644 --- a/perl-Net-SSLeay.spec +++ b/perl-Net-SSLeay.spec @@ -10,13 +10,14 @@ Name: perl-Net-SSLeay Version: 1.86 -Release: 0.1.09%{?dist} +Release: 0.2.09%{?dist} Summary: Perl extension for using OpenSSL License: Artistic 2.0 URL: https://metacpan.org/release/Net-SSLeay Source0: https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-%{cpan_version}.tar.gz # Adapt tests to system-wide crypto policy, bug #1614884 Patch0: Net-SSLeay-1.85-Adapt-CTX_get_min_proto_version-tests-to-system-wide.patch +Patch10: Net-SSLeay-1.86_09-pkgconfig.patch # =========== Module Build =========================== BuildRequires: coreutils BuildRequires: findutils @@ -29,6 +30,7 @@ BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Cwd) BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::PkgConfig) BuildRequires: perl(ExtUtils::MM) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Path) @@ -80,6 +82,10 @@ so you can write servers or clients for more complicated applications. %setup -q -n Net-SSLeay-%{cpan_version} %patch0 -p1 +# Get libraries to link against from pkg-config +# https://github.com/radiator-software/p5-net-ssleay/pull/127 +%patch10 + # Fix permissions in examples to avoid bogus doc-file dependencies chmod -c 644 examples/* @@ -125,6 +131,10 @@ make test %{_mandir}/man3/Net::SSLeay::Handle.3* %changelog +* Fri Mar 29 2019 Paul Howarth - 1.86-0.2.09 +- Get libraries to link against from pkg-config + https://github.com/radiator-software/p5-net-ssleay/pull/127 + * Wed Mar 20 2019 Petr Pisar - 1.86-0.1.09 - Update to 1.86_09 (see Changes file for details)