summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Janda <felix.janda@posteo.de>2017-10-14 09:43:32 -0400
committerPatrice Clement <monsieurp@gentoo.org>2017-10-22 18:55:09 +0200
commit9f93ee632f0a851deddaa347bc933278a48f7f8d (patch)
tree563a8286a122ecadec5fc4623d7e0ec8432e37f0 /www-client/elinks
parentdev-python/pillow: jpeg dependency is unconditional #632418 (diff)
downloadgentoo-9f93ee632f0a851deddaa347bc933278a48f7f8d.tar.gz
gentoo-9f93ee632f0a851deddaa347bc933278a48f7f8d.tar.bz2
gentoo-9f93ee632f0a851deddaa347bc933278a48f7f8d.zip
www-client/elinks-0.12_pre6-r2: fix compilation with libressl.
Closes: https://bugs.gentoo.org/584766 Closes: https://bugs.gentoo.org/609006
Diffstat (limited to 'www-client/elinks')
-rw-r--r--www-client/elinks/elinks-0.12_pre6-r2.ebuild2
-rw-r--r--www-client/elinks/files/elinks-0.12_pre5-libressl.patch29
-rw-r--r--www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch20
3 files changed, 51 insertions, 0 deletions
diff --git a/www-client/elinks/elinks-0.12_pre6-r2.ebuild b/www-client/elinks/elinks-0.12_pre6-r2.ebuild
index ed3f69831bd0..e9e8625888a0 100644
--- a/www-client/elinks/elinks-0.12_pre6-r2.ebuild
+++ b/www-client/elinks/elinks-0.12_pre6-r2.ebuild
@@ -56,6 +56,8 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-9999-parallel-make.patch
epatch "${FILESDIR}"/${PN}-0.12_pre5-compilation-fix.patch
+ epatch "${FILESDIR}"/${PN}-0.12_pre5-libressl.patch
+ epatch "${FILESDIR}"/${PN}-0.12_pre5-rand-egd.patch
if use javascript ; then
if has_version ">=dev-lang/spidermonkey-1.8"; then
diff --git a/www-client/elinks/files/elinks-0.12_pre5-libressl.patch b/www-client/elinks/files/elinks-0.12_pre5-libressl.patch
new file mode 100644
index 000000000000..d41ab689e9f1
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.12_pre5-libressl.patch
@@ -0,0 +1,29 @@
+Adapted from upstream
+commit 54ebe365b752f8969a67279d0d29552ab638e025
+Author: Witold Filipczyk <witekfl@poczta.onet.pl>
+Date: Mon Mar 6 17:39:36 2017 +0100
+
+ Compilation fix for OpenSSL-1.1
+
+--- a/src/network/ssl/socket.c
++++ b/src/network/ssl/socket.c
+@@ -67,7 +67,9 @@
+ ssl_set_no_tls(struct socket *socket)
+ {
+ #ifdef CONFIG_OPENSSL
+- ((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1;
++#ifdef SSL_OP_NO_TLSv1
++ SSL_set_options((ssl_t *)socket->ssl, SSL_OP_NO_TLSv1);
++#endif
+ #elif defined(CONFIG_GNUTLS)
+ {
+ /* GnuTLS does not support SSLv2 because it is "insecure".
+@@ -145,7 +147,7 @@
+ }
+
+ if (client_cert) {
+- SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx;
++ SSL_CTX *ctx = SSL_get_SSL_CTX((SSL *) socket->ssl);
+
+ SSL_CTX_use_certificate_chain_file(ctx, client_cert);
+ SSL_CTX_use_PrivateKey_file(ctx, client_cert,
diff --git a/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch b/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch
new file mode 100644
index 000000000000..6c5679a95bbd
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch
@@ -0,0 +1,20 @@
+--- a/src/network/ssl/ssl.c
++++ b/src/network/ssl/ssl.c
+@@ -84,11 +84,16 @@ init_openssl(struct module *module)
+ * cannot initialize the PRNG and so every attempt to use SSL fails.
+ * It's actually an OpenSSL FAQ, and according to them, it's up to the
+ * application coders to seed the RNG. -- William Yodlowsky */
+- if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
++ RAND_file_name(f_randfile, sizeof(f_randfile));
++#ifdef HAVE_RAND_EGD
++ if (RAND_egd(f_randfile) < 0) {
+ /* Not an EGD, so read and write to it */
++#endif
+ if (RAND_load_file(f_randfile, -1))
+ RAND_write_file(f_randfile);
++#ifdef HAVE_RAND_EGD
+ }
++#endif
+
+ SSLeay_add_ssl_algorithms();
+ context = SSL_CTX_new(SSLv23_client_method());