summaryrefslogtreecommitdiffstats
path: root/abs/core/perl_modules
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-03-28 00:06:10 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-03-28 00:06:10 (GMT)
commit436619f5d5ddad9a0f1730f93a92a4f7b0cccef7 (patch)
tree5893dfaec6d2dd6aacd57266fb38b9fb7b7a6a57 /abs/core/perl_modules
parent7d8b8008b2b682c970060035cb3dbbd9c7b5c1fc (diff)
downloadlinhes_pkgbuild-436619f5d5ddad9a0f1730f93a92a4f7b0cccef7.zip
linhes_pkgbuild-436619f5d5ddad9a0f1730f93a92a4f7b0cccef7.tar.gz
linhes_pkgbuild-436619f5d5ddad9a0f1730f93a92a4f7b0cccef7.tar.bz2
perl-lwp-protocol-https: dep of perl-crypt-ssleay
Diffstat (limited to 'abs/core/perl_modules')
-rw-r--r--abs/core/perl_modules/perl-lwp-protocol-https/PKGBUILD38
-rw-r--r--abs/core/perl_modules/perl-lwp-protocol-https/certs.patch43
2 files changed, 81 insertions, 0 deletions
diff --git a/abs/core/perl_modules/perl-lwp-protocol-https/PKGBUILD b/abs/core/perl_modules/perl-lwp-protocol-https/PKGBUILD
new file mode 100644
index 0000000..f871fbe
--- /dev/null
+++ b/abs/core/perl_modules/perl-lwp-protocol-https/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@gmail.com>
+
+pkgname=perl-lwp-protocol-https
+pkgver=6.07
+pkgrel=1
+pkgdesc="Provide https support for LWP::UserAgent"
+arch=('any')
+url="https://metacpan.org/release/LWP-Protocol-https"
+license=('PerlArtistic' 'GPL')
+depends=('ca-certificates' 'perl-io-socket-ssl' 'perl-net-http' 'perl-libwww')
+checkdepends=('perl-test-requiresinternet')
+options=('!emptydirs')
+source=("http://search.cpan.org/CPAN/authors/id/O/OA/OALDERS/LWP-Protocol-https-$pkgver.tar.gz"
+ certs.patch)
+sha512sums=('4a07cd8a1c44e31781069a632a77f3af43747933420e831b4fd4a12faac7dc04f0c6b10ea773c3e14ecb66209a547b3587c0e3f481a55b9929db65f7b10343aa'
+ '7ee0ad7c40f526fb3ba1148f13f2601c11fe68c72b4aaf22b628709c2877b7d49ee6dc1c722bb091b97251d76fceec4a9b39dcf3778d7f19b79fdd8c5754a444')
+
+prepare() {
+ cd LWP-Protocol-https-${pkgver}
+ patch -p1 -i ../certs.patch
+}
+
+build() {
+ cd LWP-Protocol-https-${pkgver}
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+check() {
+ cd LWP-Protocol-https-${pkgver}
+ make test
+}
+
+package() {
+ cd LWP-Protocol-https-${pkgver}
+ make DESTDIR="$pkgdir" install
+}
diff --git a/abs/core/perl_modules/perl-lwp-protocol-https/certs.patch b/abs/core/perl_modules/perl-lwp-protocol-https/certs.patch
new file mode 100644
index 0000000..a2edc40
--- /dev/null
+++ b/abs/core/perl_modules/perl-lwp-protocol-https/certs.patch
@@ -0,0 +1,43 @@
+diff --git a/Makefile.PL.orig b/Makefile.PL
+index fc8ef4a..26313e2 100644
+--- a/Makefile.PL.orig
++++ b/Makefile.PL
+@@ -26,7 +26,6 @@ my %WriteMakefileArgs = (
+ 'LWP::UserAgent' => '6.06',
+ 'Net::HTTPS' => 6,
+ 'IO::Socket::SSL' => "1.54",
+- 'Mozilla::CA' => "20110101",
+ 'perl' => '5.008001',
+ },
+ },
+diff --git a/lib/LWP/Protocol/https.pm.orig b/lib/LWP/Protocol/https.pm
+index ed4d832..b8667cf 100644
+--- a/lib/LWP/Protocol/https.pm.orig
++++ b/lib/LWP/Protocol/https.pm
+@@ -25,25 +25,7 @@ sub _extra_sock_opts
+ }
+ if ($ssl_opts{SSL_verify_mode}) {
+ unless (exists $ssl_opts{SSL_ca_file} || exists $ssl_opts{SSL_ca_path}) {
+- eval {
+- require Mozilla::CA;
+- };
+- if ($@) {
+- if ($@ =~ /^Can't locate Mozilla\/CA\.pm/) {
+- $@ = <<'EOT';
+-Can't verify SSL peers without knowing which Certificate Authorities to trust
+-
+-This problem can be fixed by either setting the PERL_LWP_SSL_CA_FILE
+-environment variable or by installing the Mozilla::CA module.
+-
+-To disable verification of SSL peers set the PERL_LWP_SSL_VERIFY_HOSTNAME
+-environment variable to 0. If you do this you can't be sure that you
+-communicate with the expected peer.
+-EOT
+- }
+- die $@;
+- }
+- $ssl_opts{SSL_ca_file} = Mozilla::CA::SSL_ca_file();
++ $ssl_opts{SSL_ca_file} = '/etc/ssl/certs/ca-certificates.crt';
+ }
+ }
+ $self->{ssl_opts} = \%ssl_opts;