summaryrefslogtreecommitdiff
path: root/media-libs/opusfile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
commit536c3711867ec947c1738f2c4b96f22e4863322d (patch)
tree697733f5cb713908dcf378e13fd15a798a906a91 /media-libs/opusfile
parentf65628136faa35d0c4d3b5e7332275c7b35fcd96 (diff)
gentoo resync : 18.11.2018
Diffstat (limited to 'media-libs/opusfile')
-rw-r--r--media-libs/opusfile/Manifest5
-rw-r--r--media-libs/opusfile/files/opusfile-0.11-libressl.patch142
-rw-r--r--media-libs/opusfile/metadata.xml19
-rw-r--r--media-libs/opusfile/opusfile-0.11.ebuild4
4 files changed, 161 insertions, 9 deletions
diff --git a/media-libs/opusfile/Manifest b/media-libs/opusfile/Manifest
index 0223d580e435..ee04b62a8e11 100644
--- a/media-libs/opusfile/Manifest
+++ b/media-libs/opusfile/Manifest
@@ -1,7 +1,8 @@
+AUX opusfile-0.11-libressl.patch 6273 BLAKE2B d4868792619ce83d01994c034f9605a86929e52879a22010c0cc00c512a5b8c5abe2261e406616c04475307b7f9d16a5bc57281304d9462b0317849e7ceda922 SHA512 1eeb55595a125bd43469f47073f78bf392bf70ff5e1f94192bf9a5cfad0fd3a3887d9b38b10290cd32d357d8c6c1e00feddc4f6fa14f652ec56a7d365280d812
DIST opusfile-0.10.tar.gz 467700 BLAKE2B eab1c5eadd13ad574590c5b6a4bf8cc7f82ec0d723c240a0ce8104e108772549a4c81dd244aa61d310f0f432b2426a6e74de3c7b06aa8ab7e2f33e1c3692a826 SHA512 302601c31ca28bff175cefa99ac16177122a786d043be229616e2c98b7ffaf4a96b8bb17ca16e31240325a92763f417315b54d8f1b2f4f63f445cb7ad43c4a37
DIST opusfile-0.11.tar.gz 467420 BLAKE2B e3e6ee2d1d4c7030bdd5f7ec14503d46ebbfcbc4481ab4652a0be9171d45fe2e855e0f17801cf28fda66f44496ba9f9a2996af7e5aaf5b008e4c3b14263f3160 SHA512 ec3e282310cc4f25475c27b7bc8d1652dcb25d3ac6badf87bd1b4e5397fbe106a0dab81c60d88d198003a23d8a2c9bae8b661edc9b31433effeca438ce56a349
DIST opusfile-0.6.tar.gz 437980 BLAKE2B 13250d08f9cc9564541bbe116c5482e5b9a0de1c28a8a9e9509b1019cb75d40caefc2b8eb0ad444bb67e05cc4d0813b7b3f1783e4d136201c71200b04f7690c2 SHA512 6fee48f3da21eeffed1ee5a3852234032aa559335225b07383c1104f5efba2f88aebe41c453ab2de472a69766e0fa9b48bec2f97d2a096b27afa96901802ba02
EBUILD opusfile-0.10.ebuild 890 BLAKE2B 35e7a73420a5aac646805f1175d627c6e3227b7ae5bea191cbc102da955b3ff319099994d440853e9094d33e02a9307729da28be38ad82a04aa0c6df524f90d9 SHA512 36d9df9967f117c7a65354e949eff47e5e78ae681004c1d5f4a287d39fafe4d943c2b9390eb98a1aeb6c4f142911ec2d83271c477e0da3bf3e4cd8f1641fe6d6
-EBUILD opusfile-0.11.ebuild 969 BLAKE2B 921a57c5851cf74bef6da04f3b769498dd29a21a0bd24f1e1a1f9da95d657f2aa9f6032e3c7b10c4380e73ffa416905646f4fb0480298cb595ef6079863adfd2 SHA512 921a3d7b5d8c47da709b002a1effea03ba2b6ceced1c66a0ff06c54d13cdf1a28e1df807f8efdc1f6411cd358380b2641fdc9950869f9e8f3615eb3da35bb04c
+EBUILD opusfile-0.11.ebuild 1026 BLAKE2B cb59006fa7b66f4c2c36df7004fe852379503646802f9b247807be22943fc520401bd2478b364076ecb5f7669f8517590f2765c22236e55b0c4221c0b1b539e3 SHA512 f1533ef12020ea9012da9c343e382d2d9b649c594b33e0959fe6284c8f29476994d18490cf18bc641452c613384c72413227553be9840d151094e0215b28243b
EBUILD opusfile-0.6.ebuild 776 BLAKE2B ac01c1df72626fbe4e2c0ea46d71ce7a5b22419b2f1a72e334abbb346bbd84fbb92760d1b1cc35947c24ef0e5e01330d3a988c7daba40de703fc1bb5f80a0151 SHA512 e6ab915319a73061ed951fa5c1617c434b2c3df1335fa23860175caa2b6773b7326bad386bcc1aa39b5792c90266b1e7bdfcad85f2d997b2f6625e1670909551
-MISC metadata.xml 371 BLAKE2B 020407fca3397e32a82ee401d9b668f9f99755c7404a4c223b5cf05ff012a27928306d19dc866b39edad657647edd030d11b626882972b9d6455b830284e5656 SHA512 bc5c1673d5ea5c298afbc35a6fd68544c2e7304becda14c71e5b472c55e44285ba55f41043f8efb3ed58137b58a0f39245b6db5069c63536b514bce69517474a
+MISC metadata.xml 584 BLAKE2B da2277516b7f14b1a800d3b511ff10579b9544679e5d71535598d2e4a476f0f7cc9bce41247363ee7c50384e5d678379ab0a42fb6172013f873bc1e727d2b5db SHA512 4a4a0c3766de010ae39d0ee2339c21df051e082a36fefa9b8c53ef3ecb184072c1f8cf42aed0e4baa70f5b93d507e942a052a02a6a53ce4ed90496eb445f74c3
diff --git a/media-libs/opusfile/files/opusfile-0.11-libressl.patch b/media-libs/opusfile/files/opusfile-0.11-libressl.patch
new file mode 100644
index 000000000000..72d807623a8c
--- /dev/null
+++ b/media-libs/opusfile/files/opusfile-0.11-libressl.patch
@@ -0,0 +1,142 @@
+From 27ab318babb96e10a9f007b7c7936fd42425f488 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <stefan.strogin@gmail.com>
+Date: Thu, 27 Sep 2018 04:53:29 +0300
+Subject: [PATCH] http: fix compilation with LibreSSL
+
+LibreSSL defines OPENSSL_VERSION_NUMBER to 0x20000000L, but its API is
+compatible with OpenSSL 1.0.1.
+Therefore redefine OPENSSL_VERSION_NUMBER to 0x1000115fL (1.0.1u) if
+LibreSSL is used.
+
+Fixes: #2327
+
+http: use new API with LibreSSL >=2.7.0
+
+LibreSSL is not yet fully API compatible with OpenSSL 1.0.2 and later,
+However many APIs from OpenSSL 1.0.2 and 1.1 are already implemented in
+LibreSSL 2.7.0 and later. Old approach works in newer LibreSSL version
+as well, but it's not nice to force deprecated functions on LibreSSL
+users.
+
+Add additional conditionals for new LibreSSL versions to use the
+available new APIs.
+---
+ src/http.c | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/src/http.c b/src/http.c
+index 8ba9b28..a47648f 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -358,6 +358,11 @@ typedef int op_sock;
+ # include <sys/timeb.h>
+ # include <openssl/x509v3.h>
+
++# if (defined(LIBRESSL_VERSION_NUMBER)&&OPENSSL_VERSION_NUMBER==0x20000000L)
++# undef OPENSSL_VERSION_NUMBER
++# define OPENSSL_VERSION_NUMBER 0x1000115fL
++# endif
++
+ /*The maximum number of simultaneous connections.
+ RFC 2616 says this SHOULD NOT be more than 2, but everyone on the modern web
+ ignores that (e.g., IE 8 bumped theirs up from 2 to 6, Firefox uses 15).
+@@ -1530,7 +1535,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&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ # define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr))
+ # define BIO_set_init(_b,_init) ((_b)->init=(_init))
+ # define ASN1_STRING_get0_data ASN1_STRING_data
+@@ -1538,7 +1543,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&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ _b->num=0;
+ # endif
+ BIO_set_data(_b,NULL);
+@@ -1549,7 +1554,7 @@ static int op_bio_retry_free(BIO *_b){
+ return _b!=NULL;
+ }
+
+-# if OPENSSL_VERSION_NUMBER<0x10100000L
++# if (OPENSSL_VERSION_NUMBER<0x10100000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ /*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={
+@@ -1570,7 +1575,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||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
+ BIO_METHOD *bio_retry_method;
+ # endif
+ BIO *retry_bio;
+@@ -1583,7 +1588,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||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
+ 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);
+@@ -1606,7 +1611,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||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
+ BIO_meth_free(bio_retry_method);
+ # endif
+ /*Only now do we disable write coalescing, to allow the CONNECT
+@@ -1635,7 +1640,7 @@ static struct addrinfo *op_inet_pton(const char *_host){
+ return NULL;
+ }
+
+-# if OPENSSL_VERSION_NUMBER<0x10002000L
++# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ /*Match a host name against a host with a possible wildcard pattern according
+ to the rules of RFC 6125 Section 6.4.3.
+ Return: 0 if the pattern doesn't match, and a non-zero value if it does.*/
+@@ -1893,7 +1898,7 @@ static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
+ SSL_set_tlsext_host_name(_ssl_conn,_stream->url.host);
+ # endif
+ skip_certificate_check=_stream->skip_certificate_check;
+-# if OPENSSL_VERSION_NUMBER>=0x10002000L
++# if (OPENSSL_VERSION_NUMBER>=0x10002000L||LIBRESSL_VERSION_NUMBER>=0x2070000fL)
+ /*As of version 1.0.2, OpenSSL can finally do hostname checks automatically.
+ Of course, they make it much more complicated than it needs to be.*/
+ if(!skip_certificate_check){
+@@ -1956,13 +1961,13 @@ static int op_http_conn_start_tls(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
+ if(OP_UNLIKELY(ret<=0))return OP_FALSE;
+ ssl_session=_stream->ssl_session;
+ if(ssl_session==NULL
+-# if OPENSSL_VERSION_NUMBER<0x10002000L
++# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ ||!skip_certificate_check
+ # endif
+ ){
+ ret=op_do_ssl_step(_ssl_conn,_fd,SSL_do_handshake);
+ if(OP_UNLIKELY(ret<=0))return OP_FALSE;
+-# if OPENSSL_VERSION_NUMBER<0x10002000L
++# if (OPENSSL_VERSION_NUMBER<0x10002000L&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ /*OpenSSL before version 1.0.2 does not do automatic hostname verification,
+ despite the fact that we just passed it the hostname above in the call
+ to SSL_set_tlsext_host_name().
+@@ -2314,7 +2319,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&&LIBRESSL_VERSION_NUMBER<0x2070000fL)
+ # 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
+--
+2.19.1
+
diff --git a/media-libs/opusfile/metadata.xml b/media-libs/opusfile/metadata.xml
index a3fe34c1dc27..029420926695 100644
--- a/media-libs/opusfile/metadata.xml
+++ b/media-libs/opusfile/metadata.xml
@@ -1,10 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
-<use>
-<flag name="fixed-point">Enable fixed-point arithmetic operations</flag>
-<flag name="float">Enable floating point arithmetic operations</flag>
-<flag name="http">Enable http connections</flag>
-</use>
+ <maintainer type="person">
+ <email>stefan.strogin@gmail.com</email>
+ <name>Stefan Strogin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="fixed-point">Enable fixed-point arithmetic operations</flag>
+ <flag name="float">Enable floating point arithmetic operations</flag>
+ <flag name="http">Enable http connections</flag>
+ </use>
</pkgmetadata>
diff --git a/media-libs/opusfile/opusfile-0.11.ebuild b/media-libs/opusfile/opusfile-0.11.ebuild
index bff77dbcf7e7..92e3dbb30f64 100644
--- a/media-libs/opusfile/opusfile-0.11.ebuild
+++ b/media-libs/opusfile/opusfile-0.11.ebuild
@@ -16,7 +16,7 @@ RDEPEND="media-libs/libogg
media-libs/opus
http? (
!libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
+ libressl? ( dev-libs/libressl:0= )
)"
DEPEND="${RDEPEND}
@@ -24,6 +24,8 @@ DEPEND="${RDEPEND}
REQUIRED_USE="^^ ( fixed-point float )"
+PATCHES=( "${FILESDIR}/opusfile-0.11-libressl.patch" )
+
src_configure() {
local myeconfargs=(
--docdir="${EPREFIX}/usr/share/doc/${PF}"