From 8e01ecb6edf467377653728cf270878761d052ae Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 6 Oct 2016 14:22:06 +0000 Subject: main/perl-crypt-ssleay: rebuild agasint libressl --- main/perl-crypt-ssleay/APKBUILD | 25 +++++++++++------- main/perl-crypt-ssleay/libressl.patch | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 main/perl-crypt-ssleay/libressl.patch diff --git a/main/perl-crypt-ssleay/APKBUILD b/main/perl-crypt-ssleay/APKBUILD index 448e850b3b..94727af5fb 100644 --- a/main/perl-crypt-ssleay/APKBUILD +++ b/main/perl-crypt-ssleay/APKBUILD @@ -4,7 +4,7 @@ pkgname=perl-crypt-ssleay _realname=Crypt-SSLeay pkgver=0.72 -pkgrel=3 +pkgrel=4 pkgdesc="OpenSSL Support for LWP" url="http://search.cpan.org/dist/Crypt-SSLeay/" arch="all" @@ -12,28 +12,33 @@ license="GPL PerlArtistic" cpandepends="" cpanmakedepends="" depends="$cpandepends perl-path-class perl-try-tiny" -makedepends="openssl-dev perl-dev $cpanmakedepends" +makedepends="zlib-dev libressl-dev perl-dev $cpanmakedepends" subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/N/NA/NANIS/$_realname-$pkgver.tar.gz" +source="http://search.cpan.org/CPAN/authors/id/N/NA/NANIS/$_realname-$pkgver.tar.gz + libressl.patch" -_builddir="$srcdir/$_realname-$pkgver" +builddir="$srcdir/$_realname-$pkgver" prepare() { - cd "$_builddir" + cd "$builddir" + default_prepare PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor } build() { - cd "$_builddir" + cd "$builddir" make && make test } package() { - cd "$_builddir" + cd "$builddir" make DESTDIR="$pkgdir" install || return 1 find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -md5sums="77d955c9056dbb12413d95d8852a9cdf Crypt-SSLeay-0.72.tar.gz" -sha256sums="f5d34f813677829857cf8a0458623db45b4d9c2311daaebe446f9e01afa9ffe8 Crypt-SSLeay-0.72.tar.gz" -sha512sums="af7a2878df94e116e9aad9a0f028f2e4f89074aaf31672915162f86e55211632d65c1cb00f3ebd25644d77adf8eecdd244dba6a004d93ab90289ab34fe4caaf4 Crypt-SSLeay-0.72.tar.gz" +md5sums="77d955c9056dbb12413d95d8852a9cdf Crypt-SSLeay-0.72.tar.gz +d6d9498d3e2239e31e390902859ac712 libressl.patch" +sha256sums="f5d34f813677829857cf8a0458623db45b4d9c2311daaebe446f9e01afa9ffe8 Crypt-SSLeay-0.72.tar.gz +54f5c501958c5547328b61836f4c9ab0f5fc129c2bf6e7c42cf61e029d508248 libressl.patch" +sha512sums="af7a2878df94e116e9aad9a0f028f2e4f89074aaf31672915162f86e55211632d65c1cb00f3ebd25644d77adf8eecdd244dba6a004d93ab90289ab34fe4caaf4 Crypt-SSLeay-0.72.tar.gz +2e64924c2213368c1043afa01b622c8040d59cdf469be444885fb8e1f5c61c6755b427290cf7bba6e33f30f378a1910c56a3ae4306e4bd0f32f3e16335ada453 libressl.patch" diff --git a/main/perl-crypt-ssleay/libressl.patch b/main/perl-crypt-ssleay/libressl.patch new file mode 100644 index 0000000000..663fd9bc99 --- /dev/null +++ b/main/perl-crypt-ssleay/libressl.patch @@ -0,0 +1,49 @@ +diff --git a/SSLeay.xs b/SSLeay.xs +index 1560604..c9c143a 100644 +--- a/SSLeay.xs ++++ b/SSLeay.xs +@@ -46,11 +46,7 @@ extern "C" { + #endif + + +-#if SSLEAY_VERSION_NUMBER >= 0x0900 +-#define CRYPT_SSL_CLIENT_METHOD SSLv3_client_method() +-#else +-#define CRYPT_SSL_CLIENT_METHOD SSLv2_client_method() +-#endif ++#define CRYPT_SSL_CLIENT_METHOD TLS_client_method() + + static void InfoCallback(const SSL *s,int where,int ret) + { +@@ -148,17 +144,8 @@ SSL_CTX_new(packname, ssl_version) + if(ssl_version == 23) { + ctx = SSL_CTX_new(SSLv23_client_method()); + } +- else if(ssl_version == 3) { +- ctx = SSL_CTX_new(SSLv3_client_method()); +- } + else { +-#ifndef OPENSSL_NO_SSL2 +- /* v2 is the default */ +- ctx = SSL_CTX_new(SSLv2_client_method()); +-#else +- /* v3 is the default */ +- ctx = SSL_CTX_new(SSLv3_client_method()); +-#endif ++ ctx = SSL_CTX_new(TLS_client_method()); + } + + SSL_CTX_set_options(ctx,SSL_OP_ALL|0); +diff --git a/t/03-version.t b/t/03-version.t +index fa6a38f..e6eb954 100644 +--- a/t/03-version.t ++++ b/t/03-version.t +@@ -63,7 +63,7 @@ use Crypt::SSLeay::Version qw( + note $version; + like( + $version, +- qr/\AOpenSSL/, ++ qr/\A(Open|Libre)SSL/, + 'openssl_version return value looks valid', + ); + } -- cgit v1.2.3