aboutsummaryrefslogtreecommitdiffstats
path: root/main/opusfile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-10-05 17:52:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-10-10 12:04:21 +0000
commitaea15c68f821ba167744f47ed2bd00daf0465d24 (patch)
tree127ef560f0e158a83c73ccd9a891628363a20b31 /main/opusfile
parent3e2cb134319f31ba0b311f2e7ee5770f74fb1f5d (diff)
downloadaports-aea15c68f821ba167744f47ed2bd00daf0465d24.tar.bz2
aports-aea15c68f821ba167744f47ed2bd00daf0465d24.tar.xz
main/opusfile: rebuild against libressl
Diffstat (limited to 'main/opusfile')
-rw-r--r--main/opusfile/APKBUILD17
-rw-r--r--main/opusfile/libressl.patch65
2 files changed, 76 insertions, 6 deletions
diff --git a/main/opusfile/APKBUILD b/main/opusfile/APKBUILD
index 54c868d521..51bebac60c 100644
--- a/main/opusfile/APKBUILD
+++ b/main/opusfile/APKBUILD
@@ -1,17 +1,19 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=opusfile
pkgver=0.8
-pkgrel=0
+pkgrel=1
pkgdesc="A high-level API for decoding and seeking within .opus files"
url="http://www.opus-codec.org/"
arch="all"
license="BSD"
depends=""
-depends_dev="libogg-dev openssl-dev opus-dev"
+depends_dev="libogg-dev libressl-dev opus-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
-source="http://downloads.xiph.org/releases/opus/$pkgname-$pkgver.tar.gz"
+source="http://downloads.xiph.org/releases/opus/$pkgname-$pkgver.tar.gz
+ libressl.patch
+ "
builddir="$srcdir"/$pkgname-$pkgver
build() {
@@ -34,6 +36,9 @@ package() {
make DESTDIR="$pkgdir" install || return 1
}
-md5sums="78ad26f75900dc8428d75e6e4256196d opusfile-0.8.tar.gz"
-sha256sums="2c231ed3cfaa1b3173f52d740e5bbd77d51b9dfecb87014b404917fba4b855a4 opusfile-0.8.tar.gz"
-sha512sums="4db553211ac52b9cd9c03449e602fb720d757df385b74e076ce3552a17ecf0e80c861c326fd2570b26f5ffc1c42dff781eef61c25d7a016116a021c9d2176bbb opusfile-0.8.tar.gz"
+md5sums="78ad26f75900dc8428d75e6e4256196d opusfile-0.8.tar.gz
+2fea17f38577c79482b4fa500cc71497 libressl.patch"
+sha256sums="2c231ed3cfaa1b3173f52d740e5bbd77d51b9dfecb87014b404917fba4b855a4 opusfile-0.8.tar.gz
+b00620ae7355365fc198bc0d2b83b1d762bff120bc93c36350ab3a3f1a509bdf libressl.patch"
+sha512sums="4db553211ac52b9cd9c03449e602fb720d757df385b74e076ce3552a17ecf0e80c861c326fd2570b26f5ffc1c42dff781eef61c25d7a016116a021c9d2176bbb opusfile-0.8.tar.gz
+cf5e8c56dad2e56dcc9b5d1d655d8b1469ce0cd59a19593c20b98bdb1d843c9f98d5ac2c4b3a3836b93e5e9cc7807f4fa5e5430d69d6fb81a9bf2e33491e1f31 libressl.patch"
diff --git a/main/opusfile/libressl.patch b/main/opusfile/libressl.patch
new file mode 100644
index 0000000000..a1bbf0b344
--- /dev/null
+++ b/main/opusfile/libressl.patch
@@ -0,0 +1,65 @@
+--- a/src/http.c
++++ b/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