From 7cc86c8912554bdaa2c0e3af65423e01aee76c3b Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 2 Aug 2016 23:00:16 +0200 Subject: [PATCH] opusfile: add libressl patch to unbreak --- srcpkgs/opusfile/patches/libressl.patch | 65 +++++++++++++++++++++++++ srcpkgs/opusfile/template | 4 +- 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/opusfile/patches/libressl.patch diff --git a/srcpkgs/opusfile/patches/libressl.patch b/srcpkgs/opusfile/patches/libressl.patch new file mode 100644 index 00000000000..c1c9f58e5dd --- /dev/null +++ b/srcpkgs/opusfile/patches/libressl.patch @@ -0,0 +1,65 @@ +--- src/http.c ++++ src/http.c +@@ -1517,7 +1517,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){ + return ret; + } + +-# if OPENSSL_VERSION_NUMBER<0x10100000L ++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + # define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr)) + # define BIO_set_init(_b,_init) ((_b)->init=(_init)) + # endif +@@ -1524,7 +1524,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){ + + static int op_bio_retry_new(BIO *_b){ + BIO_set_init(_b,1); +-# if OPENSSL_VERSION_NUMBER<0x10100000L ++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + _b->num=0; + # endif + BIO_set_data(_b,NULL); +@@ -1535,7 +1535,7 @@ static int op_bio_retry_free(BIO *_b){ + return _b!=NULL; + } + +-# if OPENSSL_VERSION_NUMBER<0x10100000L ++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + /*This is not const because OpenSSL doesn't allow it, even though it won't + write to it.*/ + static BIO_METHOD op_bio_retry_method={ +@@ -1556,7 +1556,7 @@ static BIO_METHOD op_bio_retry_method={ + proxying https URL requests.*/ + static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, + OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){ +-# if OPENSSL_VERSION_NUMBER>=0x10100000L ++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + BIO_METHOD *bio_retry_method; + # endif + BIO *retry_bio; +@@ -1569,7 +1569,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, + ret=op_http_conn_write_fully(_conn, + _stream->proxy_connect.buf,_stream->proxy_connect.nbuf); + if(OP_UNLIKELY(ret<0))return ret; +-# if OPENSSL_VERSION_NUMBER>=0x10100000L ++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry"); + if(bio_retry_method==NULL)return OP_EFAULT; + BIO_meth_set_write(bio_retry_method,op_bio_retry_write); +@@ -1592,7 +1592,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, + /*This shouldn't succeed, since we can't read yet.*/ + OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0); + SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio); +-# if OPENSSL_VERSION_NUMBER>=0x10100000L ++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + BIO_meth_free(bio_retry_method); + # endif + /*Only now do we disable write coalescing, to allow the CONNECT +@@ -2231,7 +2231,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, + /*Initialize the SSL library if necessary.*/ + if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){ + SSL_CTX *ssl_ctx; +-# if OPENSSL_VERSION_NUMBER<0x10100000L ++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + # if !defined(OPENSSL_NO_LOCKING) + /*The documentation says SSL_library_init() is not reentrant. + We don't want to add our own depenencies on a threading library, and it diff --git a/srcpkgs/opusfile/template b/srcpkgs/opusfile/template index 08397e95bc2..5719e3dcaf2 100644 --- a/srcpkgs/opusfile/template +++ b/srcpkgs/opusfile/template @@ -1,7 +1,7 @@ # Template file for 'opusfile' pkgname=opusfile version=0.8 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" makedepends="libogg-devel opus-devel libressl-devel" @@ -12,8 +12,6 @@ license="BSD" distfiles="http://downloads.xiph.org/releases/opus/${pkgname}-${version}.tar.gz" checksum=2c231ed3cfaa1b3173f52d740e5bbd77d51b9dfecb87014b404917fba4b855a4 -broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/12738/steps/shell_3/logs/stdio" - pre_configure() { autoreconf -fi }