aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.dk>2017-11-30 05:11:01 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-30 08:53:31 +0000
commite635fe5794f79419e83076a73bfe5447cf3c730a (patch)
tree4a460ec802e92c44f9330fe59a31e269d84c9556
parentb71c2ae4be19a147fa924274376903c359bee14a (diff)
downloadalpine_aports-e635fe5794f79419e83076a73bfe5447cf3c730a.tar.bz2
alpine_aports-e635fe5794f79419e83076a73bfe5447cf3c730a.tar.xz
alpine_aports-e635fe5794f79419e83076a73bfe5447cf3c730a.zip
main/opusfile: upgrade to 0.10; modernize
-rw-r--r--main/opusfile/APKBUILD30
-rw-r--r--main/opusfile/libressl.patch51
2 files changed, 60 insertions, 21 deletions
diff --git a/main/opusfile/APKBUILD b/main/opusfile/APKBUILD
index 1185dd056e..3ec7987abd 100644
--- a/main/opusfile/APKBUILD
+++ b/main/opusfile/APKBUILD
@@ -1,7 +1,7 @@
1# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 1# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
2pkgname=opusfile 2pkgname=opusfile
3pkgver=0.8 3pkgver=0.10
4pkgrel=3 4pkgrel=0
5pkgdesc="A high-level API for decoding and seeking within .opus files" 5pkgdesc="A high-level API for decoding and seeking within .opus files"
6url="http://www.opus-codec.org/" 6url="http://www.opus-codec.org/"
7arch="all" 7arch="all"
@@ -14,10 +14,11 @@ subpackages="$pkgname-dev $pkgname-doc"
14source="http://downloads.xiph.org/releases/opus/$pkgname-$pkgver.tar.gz 14source="http://downloads.xiph.org/releases/opus/$pkgname-$pkgver.tar.gz
15 libressl.patch 15 libressl.patch
16 " 16 "
17
18builddir="$srcdir"/$pkgname-$pkgver 17builddir="$srcdir"/$pkgname-$pkgver
18
19build() { 19build() {
20 cd "$builddir" 20 cd "$builddir"
21
21 ./configure \ 22 ./configure \
22 --build=$CBUILD \ 23 --build=$CBUILD \
23 --host=$CHOST \ 24 --host=$CHOST \
@@ -26,19 +27,22 @@ build() {
26 --mandir=/usr/share/man \ 27 --mandir=/usr/share/man \
27 --infodir=/usr/share/info \ 28 --infodir=/usr/share/info \
28 --localstatedir=/var \ 29 --localstatedir=/var \
29 --disable-static \ 30 --disable-static
30 || return 1 31
31 make || return 1 32 make
33}
34
35check() {
36 cd "$builddir"
37
38 make check
32} 39}
33 40
34package() { 41package() {
35 cd "$builddir" 42 cd "$builddir"
36 make DESTDIR="$pkgdir" install || return 1 43
44 make DESTDIR="$pkgdir" install
37} 45}
38 46
39md5sums="78ad26f75900dc8428d75e6e4256196d opusfile-0.8.tar.gz 47sha512sums="302601c31ca28bff175cefa99ac16177122a786d043be229616e2c98b7ffaf4a96b8bb17ca16e31240325a92763f417315b54d8f1b2f4f63f445cb7ad43c4a37 opusfile-0.10.tar.gz
402fea17f38577c79482b4fa500cc71497 libressl.patch" 484a5572bb0671e8bf38d70883d61257e182e4e417828c65461351649728ab5560c7da0d5d4560a30bbad256bfcafa874322a8f1470a796f4948af93d50dd4a74e libressl.patch"
41sha256sums="2c231ed3cfaa1b3173f52d740e5bbd77d51b9dfecb87014b404917fba4b855a4 opusfile-0.8.tar.gz
42b00620ae7355365fc198bc0d2b83b1d762bff120bc93c36350ab3a3f1a509bdf libressl.patch"
43sha512sums="4db553211ac52b9cd9c03449e602fb720d757df385b74e076ce3552a17ecf0e80c861c326fd2570b26f5ffc1c42dff781eef61c25d7a016116a021c9d2176bbb opusfile-0.8.tar.gz
44cf5e8c56dad2e56dcc9b5d1d655d8b1469ce0cd59a19593c20b98bdb1d843c9f98d5ac2c4b3a3836b93e5e9cc7807f4fa5e5430d69d6fb81a9bf2e33491e1f31 libressl.patch"
diff --git a/main/opusfile/libressl.patch b/main/opusfile/libressl.patch
index a1bbf0b344..ed68b0b3a1 100644
--- a/main/opusfile/libressl.patch
+++ b/main/opusfile/libressl.patch
@@ -1,6 +1,7 @@
1# https://github.com/voidlinux/void-packages/master/srcpkgs/opusfile/patches/
1--- a/src/http.c 2--- a/src/http.c
2+++ b/src/http.c 3+++ b/src/http.c
3@@ -1517,7 +1517,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){ 4@@ -1530,7 +1530,7 @@
4 return ret; 5 return ret;
5 } 6 }
6 7
@@ -8,8 +9,8 @@
8+# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER) 9+# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
9 # define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr)) 10 # define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr))
10 # define BIO_set_init(_b,_init) ((_b)->init=(_init)) 11 # define BIO_set_init(_b,_init) ((_b)->init=(_init))
11 # endif 12 # define ASN1_STRING_get0_data ASN1_STRING_data
12@@ -1524,7 +1524,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _num,void *_ptr){ 13@@ -1538,7 +1538,7 @@
13 14
14 static int op_bio_retry_new(BIO *_b){ 15 static int op_bio_retry_new(BIO *_b){
15 BIO_set_init(_b,1); 16 BIO_set_init(_b,1);
@@ -18,7 +19,7 @@
18 _b->num=0; 19 _b->num=0;
19 # endif 20 # endif
20 BIO_set_data(_b,NULL); 21 BIO_set_data(_b,NULL);
21@@ -1535,7 +1535,7 @@ static int op_bio_retry_free(BIO *_b){ 22@@ -1549,7 +1549,7 @@
22 return _b!=NULL; 23 return _b!=NULL;
23 } 24 }
24 25
@@ -27,7 +28,7 @@
27 /*This is not const because OpenSSL doesn't allow it, even though it won't 28 /*This is not const because OpenSSL doesn't allow it, even though it won't
28 write to it.*/ 29 write to it.*/
29 static BIO_METHOD op_bio_retry_method={ 30 static BIO_METHOD op_bio_retry_method={
30@@ -1556,7 +1556,7 @@ static BIO_METHOD op_bio_retry_method={ 31@@ -1570,7 +1570,7 @@
31 proxying https URL requests.*/ 32 proxying https URL requests.*/
32 static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, 33 static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
33 OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){ 34 OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){
@@ -36,7 +37,7 @@
36 BIO_METHOD *bio_retry_method; 37 BIO_METHOD *bio_retry_method;
37 # endif 38 # endif
38 BIO *retry_bio; 39 BIO *retry_bio;
39@@ -1569,7 +1569,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, 40@@ -1583,7 +1583,7 @@
40 ret=op_http_conn_write_fully(_conn, 41 ret=op_http_conn_write_fully(_conn,
41 _stream->proxy_connect.buf,_stream->proxy_connect.nbuf); 42 _stream->proxy_connect.buf,_stream->proxy_connect.nbuf);
42 if(OP_UNLIKELY(ret<0))return ret; 43 if(OP_UNLIKELY(ret<0))return ret;
@@ -45,7 +46,7 @@
45 bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry"); 46 bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry");
46 if(bio_retry_method==NULL)return OP_EFAULT; 47 if(bio_retry_method==NULL)return OP_EFAULT;
47 BIO_meth_set_write(bio_retry_method,op_bio_retry_write); 48 BIO_meth_set_write(bio_retry_method,op_bio_retry_write);
48@@ -1592,7 +1592,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream, 49@@ -1606,7 +1606,7 @@
49 /*This shouldn't succeed, since we can't read yet.*/ 50 /*This shouldn't succeed, since we can't read yet.*/
50 OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0); 51 OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0);
51 SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio); 52 SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio);
@@ -54,7 +55,41 @@
54 BIO_meth_free(bio_retry_method); 55 BIO_meth_free(bio_retry_method);
55 # endif 56 # endif
56 /*Only now do we disable write coalescing, to allow the CONNECT 57 /*Only now do we disable write coalescing, to allow the CONNECT
57@@ -2231,7 +2231,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream,const char *_url, 58@@ -1635,7 +1635,7 @@
59 return NULL;
60 }
61
62-# if OPENSSL_VERSION_NUMBER<0x10002000L
63+# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
64 /*Match a host name against a host with a possible wildcard pattern according
65 to the rules of RFC 6125 Section 6.4.3.
66 Return: 0 if the pattern doesn't match, and a non-zero value if it does.*/
67@@ -1893,7 +1893,7 @@
68 SSL_set_tlsext_host_name(_ssl_conn,_stream->url.host);
69 # endif
70 skip_certificate_check=_stream->skip_certificate_check;
71-# if OPENSSL_VERSION_NUMBER>=0x10002000L
72+# if OPENSSL_VERSION_NUMBER>=0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
73 /*As of version 1.0.2, OpenSSL can finally do hostname checks automatically.
74 Of course, they make it much more complicated than it needs to be.*/
75 if(!skip_certificate_check){
76@@ -1956,13 +1956,13 @@
77 if(OP_UNLIKELY(ret<=0))return OP_FALSE;
78 ssl_session=_stream->ssl_session;
79 if(ssl_session==NULL
80-# if OPENSSL_VERSION_NUMBER<0x10002000L
81+# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
82 ||!skip_certificate_check
83 # endif
84 ){
85 ret=op_do_ssl_step(_ssl_conn,_fd,SSL_do_handshake);
86 if(OP_UNLIKELY(ret<=0))return OP_FALSE;
87-# if OPENSSL_VERSION_NUMBER<0x10002000L
88+# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
89 /*OpenSSL before version 1.0.2 does not do automatic hostname verification,
90 despite the fact that we just passed it the hostname above in the call
91 to SSL_set_tlsext_host_name().
92@@ -2314,7 +2314,7 @@
58 /*Initialize the SSL library if necessary.*/ 93 /*Initialize the SSL library if necessary.*/
59 if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){ 94 if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){
60 SSL_CTX *ssl_ctx; 95 SSL_CTX *ssl_ctx;