aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2018-06-06 02:57:28 +0800
committersunpoet <sunpoet@FreeBSD.org>2018-06-06 02:57:28 +0800
commit54abe56ce6802ca6485444a38f619208341a300a (patch)
tree6696dababe6570faea46b85aa2ccc98615ed3410 /lang
parent503bdcb6778dd0c2200a428a94d0d66385ed97d8 (diff)
downloadfreebsd-ports-gnome-54abe56ce6802ca6485444a38f619208341a300a.tar.gz
freebsd-ports-gnome-54abe56ce6802ca6485444a38f619208341a300a.tar.zst
freebsd-ports-gnome-54abe56ce6802ca6485444a38f619208341a300a.zip
Fix build with LibreSSL 2.7
Obtained from: https://github.com/ruby/openssl/commit/75de15ddcdab6efe7faf3ca1f6b5c6e5b6ba57cc PR: 227851
Diffstat (limited to 'lang')
-rw-r--r--lang/ruby24/files/patch-ext-openssl-extconf.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/lang/ruby24/files/patch-ext-openssl-extconf.rb b/lang/ruby24/files/patch-ext-openssl-extconf.rb
new file mode 100644
index 000000000000..be58b92ea90b
--- /dev/null
+++ b/lang/ruby24/files/patch-ext-openssl-extconf.rb
@@ -0,0 +1,28 @@
+From 75de15ddcdab6efe7faf3ca1f6b5c6e5b6ba57cc Mon Sep 17 00:00:00 2001
+From: Kazuki Yamaguchi <k@rhe.jp>
+Date: Sat, 24 Mar 2018 01:44:37 +0900
+Subject: [PATCH] extconf.rb: fix build with LibreSSL 2.7.0
+
+Our compat implementation of accessor functions that were introduced in
+OpenSSL 1.1.0 conflicts with those from LibreSSL 2.7.0. Use the
+HAVE_OPAQUE_OPENSSL code path when LibreSSL 2.7 or newer is detected.
+
+Fix suggested by Joel Sing.
+
+Fixes: https://github.com/ruby/openssl/issues/192
+
+--- ext/openssl/extconf.rb.orig
++++ ext/openssl/extconf.rb
+@@ -157,8 +157,11 @@ def find_openssl_library
+ have_func("SSL_is_server")
+
+ # added in 1.1.0
++if !have_struct_member("SSL", "ctx", "openssl/ssl.h") ||
++ try_static_assert("LIBRESSL_VERSION_NUMBER >= 0x2070000fL", "openssl/opensslv.h")
++ $defs.push("-DHAVE_OPAQUE_OPENSSL")
++end
+ have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
+-have_struct_member("SSL", "ctx", "openssl/ssl.h") || $defs.push("-DHAVE_OPAQUE_OPENSSL")
+ have_func("BN_GENCB_new")
+ have_func("BN_GENCB_free")
+ have_func("BN_GENCB_get_arg")