diff --git a/srcpkgs/libevent/patches/fix-libressl-2.7.patch b/srcpkgs/libevent/patches/fix-libressl-2.7.patch new file mode 100644 index 00000000000..5a42a4a577a --- /dev/null +++ b/srcpkgs/libevent/patches/fix-libressl-2.7.patch @@ -0,0 +1,23 @@ +--- openssl-compat.h.orig 2018-04-23 16:26:06.271112397 +0200 ++++ openssl-compat.h 2018-04-23 16:27:06.157202883 +0200 +@@ -1,7 +1,11 @@ + #ifndef OPENSSL_COMPAT_H + #define OPENSSL_COMPAT_H + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL ++#define BIO_get_init(b) (b)->init ++#define BIO_get_data(b) (b)->ptr ++#define BIO_get_shutdown(b) (b)->shutdown ++#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) + + static inline BIO_METHOD *BIO_meth_new(int type, const char *name) + { +@@ -30,6 +34,6 @@ static inline BIO_METHOD *BIO_meth_new(i + + #define TLS_method SSLv23_method + +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */ + + #endif /* OPENSSL_COMPAT_H */ diff --git a/srcpkgs/libevent/patches/libressl.patch b/srcpkgs/libevent/patches/libressl.patch deleted file mode 100644 index a7cfcc59870..00000000000 --- a/srcpkgs/libevent/patches/libressl.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- openssl-compat.h.orig -+++ openssl-compat.h -@@ -1,7 +1,7 @@ - #ifndef OPENSSL_COMPAT_H - #define OPENSSL_COMPAT_H - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - - static inline BIO_METHOD *BIO_meth_new(int type, const char *name) - { -@@ -30,6 +30,6 @@ static inline BIO_METHOD *BIO_meth_new(i - - #define TLS_method SSLv23_method - --#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ -+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */ - - #endif /* OPENSSL_COMPAT_H */ ---- sample/https-client.c.orig -+++ sample/https-client.c -@@ -312,7 +312,7 @@ main(int argc, char **argv) - } - uri[sizeof(uri) - 1] = '\0'; - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - // Initialize OpenSSL - SSL_library_init(); - ERR_load_crypto_strings(); -@@ -480,7 +480,7 @@ cleanup: - SSL_CTX_free(ssl_ctx); - if (type == HTTP && ssl) - SSL_free(ssl); --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - EVP_cleanup(); - ERR_free_strings(); - -@@ -492,7 +492,7 @@ cleanup: - CRYPTO_cleanup_all_ex_data(); - - sk_SSL_COMP_free(SSL_COMP_get_compression_methods()); --#endif /*OPENSSL_VERSION_NUMBER < 0x10100000L */ -+#endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) */ - - #ifdef _WIN32 - WSACleanup(); ---- sample/le-proxy.c.orig -+++ sample/le-proxy.c -@@ -259,7 +259,7 @@ main(int argc, char **argv) - - if (use_ssl) { - int r; --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - SSL_library_init(); - ERR_load_crypto_strings(); - SSL_load_error_strings(); ---- sample/openssl_hostname_validation.c.orig -+++ sample/openssl_hostname_validation.c -@@ -48,7 +48,7 @@ SOFTWARE. - - #define HOSTNAME_MAX_SIZE 255 - --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - #define ASN1_STRING_get0_data ASN1_STRING_data - #endif - ---- test/regress_ssl.c.orig -+++ test/regress_ssl.c -@@ -186,7 +186,7 @@ get_ssl_ctx(void) - void - init_ssl(void) - { --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - SSL_library_init(); - ERR_load_crypto_strings(); - SSL_load_error_strings(); diff --git a/srcpkgs/libevent/template b/srcpkgs/libevent/template index 6e3b5b75272..7994c42f5aa 100644 --- a/srcpkgs/libevent/template +++ b/srcpkgs/libevent/template @@ -1,7 +1,7 @@ # Template file for 'libevent' pkgname=libevent version=2.1.8 -revision=4 +revision=5 wrksrc="${pkgname}-${version}-stable" build_style=gnu-configure makedepends="libressl-devel"