diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-20 15:30:47 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-10-27 10:14:45 +0000 |
commit | 92c9f564f7db4c1c2ed0a3ece4ef8d7c11590825 (patch) | |
tree | 3e15d2be58bc5eccfa3103bf4961befd96fae399 /main/boost | |
parent | c34afe1050d8529caa4421e410d9439d960358ba (diff) | |
download | aports-92c9f564f7db4c1c2ed0a3ece4ef8d7c11590825.tar.bz2 aports-92c9f564f7db4c1c2ed0a3ece4ef8d7c11590825.tar.xz |
main/boost: fixes for libressl
Diffstat (limited to 'main/boost')
-rw-r--r-- | main/boost/APKBUILD | 14 | ||||
-rw-r--r-- | main/boost/libressl.patch | 146 |
2 files changed, 155 insertions, 5 deletions
diff --git a/main/boost/APKBUILD b/main/boost/APKBUILD index 3751a55eba..4d499c0f12 100644 --- a/main/boost/APKBUILD +++ b/main/boost/APKBUILD @@ -2,7 +2,7 @@ pkgname=boost pkgver=1.62.0 _pkgver="${pkgver//./_}" -pkgrel=0 +pkgrel=1 pkgdesc="Free peer-reviewed portable C++ source libraries" url="http://www.boost.org/" arch="all" @@ -11,7 +11,8 @@ depends="" depends_dev="linux-headers" makedepends="$depends_dev python2-dev>=2.6 python3-dev flex bison bzip2-dev zlib-dev" subpackages="$pkgname-dev $pkgname-doc" -source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.gz" +source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.gz + libressl.patch" builddir="$srcdir/${pkgname}_${_pkgver}" _libs="date_time @@ -130,6 +131,9 @@ _pyversion() { $1 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))' } -md5sums="d7fc0678d8aaacaa1286d56f4e20fb3f boost_1_62_0.tar.gz" -sha256sums="b5570af1a6b7f5ed46d2be12b095f919a7f6be678919d4b1e3c6b09f9c08108d boost_1_62_0.tar.gz" -sha512sums="57cd8ad9d1c0bd4d6c510a94cb91b6edc2756c6e7fa656d66a3f2b003d2bf33b80ff7ce8515f1f60e1fa067ab642069c3f54710e613ba0ed459e756c3cf75b43 boost_1_62_0.tar.gz" +md5sums="d7fc0678d8aaacaa1286d56f4e20fb3f boost_1_62_0.tar.gz +b941ebae33e625fe0d08ff48502c11d0 libressl.patch" +sha256sums="b5570af1a6b7f5ed46d2be12b095f919a7f6be678919d4b1e3c6b09f9c08108d boost_1_62_0.tar.gz +bb47222b596f0b3ef1b85470d29abac5f497295f4965dae4d207962d4e41e84f libressl.patch" +sha512sums="57cd8ad9d1c0bd4d6c510a94cb91b6edc2756c6e7fa656d66a3f2b003d2bf33b80ff7ce8515f1f60e1fa067ab642069c3f54710e613ba0ed459e756c3cf75b43 boost_1_62_0.tar.gz +5804c344b5e5ece17811e744f1965c58840b6695a084dd09c23c9db380f3cbfbca201d6c595b5379bc12ff6f285794509799d28864df6037db6212c63adb2207 libressl.patch" diff --git a/main/boost/libressl.patch b/main/boost/libressl.patch new file mode 100644 index 0000000000..30c13bfcc5 --- /dev/null +++ b/main/boost/libressl.patch @@ -0,0 +1,146 @@ +diff --git a/boost/asio/ssl/detail/impl/engine.ipp b/boost/asio/ssl/detail/impl/engine.ipp +index f15f2e3..d33935f 100644 +--- a/boost/asio/ssl/detail/impl/engine.ipp ++++ b/boost/asio/ssl/detail/impl/engine.ipp +@@ -209,7 +209,7 @@ const boost::system::error_code& engine::map_error_code( + + // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the + // underlying transport is passed through. +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + if (ssl_->version == SSL2_VERSION) + return ec; + #endif // (OPENSSL_VERSION_NUMBER < 0x10100000L) +diff --git a/boost/asio/ssl/detail/impl/openssl_init.ipp b/boost/asio/ssl/detail/impl/openssl_init.ipp +index 94b67f3..acbd926 100644 +--- a/boost/asio/ssl/detail/impl/openssl_init.ipp ++++ b/boost/asio/ssl/detail/impl/openssl_init.ipp +@@ -40,7 +40,7 @@ public: + ::SSL_load_error_strings(); + ::OpenSSL_add_all_algorithms(); + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + mutexes_.resize(::CRYPTO_num_locks()); + for (size_t i = 0; i < mutexes_.size(); ++i) + mutexes_[i].reset(new boost::asio::detail::mutex); +@@ -68,7 +68,7 @@ public: + #if (OPENSSL_VERSION_NUMBER < 0x10000000L) + ::CRYPTO_set_id_callback(0); + #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + ::CRYPTO_set_locking_callback(0); + ::ERR_free_strings(); + ::EVP_cleanup(); +@@ -76,7 +76,7 @@ public: + #endif // (OPENSSL_VERSION_NUMBER < 0x10100000L) + #if (OPENSSL_VERSION_NUMBER < 0x10000000L) + ::ERR_remove_state(0); +-#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + ::ERR_remove_thread_state(NULL); + #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) + #if (OPENSSL_VERSION_NUMBER >= 0x10002000L) \ +@@ -117,7 +117,7 @@ private: + } + #endif // (OPENSSL_VERSION_NUMBER < 0x10000000L) + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + static void openssl_locking_func(int mode, int n, + const char* /*file*/, int /*line*/) + { +diff --git a/boost/asio/ssl/error.hpp b/boost/asio/ssl/error.hpp +index 7f85fbd..7e07e65 100644 +--- a/boost/asio/ssl/error.hpp ++++ b/boost/asio/ssl/error.hpp +@@ -44,7 +44,7 @@ enum stream_errors + #if defined(GENERATING_DOCUMENTATION) + /// The underlying stream closed before the ssl stream gracefully shut down. + stream_truncated +-#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL) ++#elif ((OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)) || defined(LIBRESSL_VERSION_NUMBER) + stream_truncated = ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ) + #else + stream_truncated = 1 +diff --git a/boost/asio/ssl/impl/context.ipp b/boost/asio/ssl/impl/context.ipp +index aea2cbd..3ef8c86 100644 +--- a/boost/asio/ssl/impl/context.ipp ++++ b/boost/asio/ssl/impl/context.ipp +@@ -130,7 +130,7 @@ context::context(context::method m) + case context::sslv23_server: + handle_ = ::SSL_CTX_new(::SSLv23_server_method()); + break; +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + #if defined(SSL_TXT_TLSV1_1) + case context::tlsv11: + handle_ = ::SSL_CTX_new(::TLSv1_1_method()); +@@ -228,7 +228,7 @@ context::~context() + { + if (handle_) + { +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) + void* cb_userdata = handle_->default_passwd_callback_userdata; +@@ -239,7 +239,7 @@ context::~context() + static_cast<detail::password_callback_base*>( + cb_userdata); + delete callback; +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) + handle_->default_passwd_callback_userdata = 0; +@@ -578,7 +578,7 @@ boost::system::error_code context::use_certificate_chain( + bio_cleanup bio = { make_buffer_bio(chain) }; + if (bio.p) + { +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +@@ -682,7 +682,7 @@ boost::system::error_code context::use_private_key( + { + ::ERR_clear_error(); + +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +@@ -749,7 +749,7 @@ boost::system::error_code context::use_rsa_private_key( + { + ::ERR_clear_error(); + +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_); + void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +@@ -988,7 +988,7 @@ int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx) + boost::system::error_code context::do_set_password_callback( + detail::password_callback_base* callback, boost::system::error_code& ec) + { +-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) ++#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) + void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_); + ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback); + #else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) +diff --git a/boost/asio/ssl/impl/error.ipp b/boost/asio/ssl/impl/error.ipp +index e82afba..1629794 100644 +--- a/boost/asio/ssl/impl/error.ipp ++++ b/boost/asio/ssl/impl/error.ipp +@@ -53,7 +53,7 @@ const boost::system::error_category& get_ssl_category() + namespace ssl { + namespace error { + +-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL) ++#if ((OPENSSL_VERSION_NUMBER < 0x10100000L) && !defined(OPENSSL_IS_BORINGSSL)) || defined(LIBRESSL_VERSION_NUMBER) + + const boost::system::error_category& get_stream_category() + { |