<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/913892e8640a37af8ee1311dc1172d2f1143f166">https://github.com/macports/macports-ports/commit/913892e8640a37af8ee1311dc1172d2f1143f166</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 913892e opusfile: patch libressl version confusion
</span>913892e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 913892e8640a37af8ee1311dc1172d2f1143f166
</span>Author: Jan StarĂ½ <hans@stare.cz>
AuthorDate: Thu Jan 11 17:34:18 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> opusfile: patch libressl version confusion
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> LibreSSL declares its OPENSSL_VERSION_NUMBER as 0x20000000L
</span><span style='display:block; white-space:pre;color:#404040;'> which makes it satisfy e.g. OPENSSL_VERSION_NUMBER>=0x10100000L,
</span><span style='display:block; white-space:pre;color:#404040;'> about which opusfile makes certain assumptions not met in LibreSSL.
</span><span style='display:block; white-space:pre;color:#404040;'> Explicitly negate those for now, to compile with LibreSSL.
</span>---
audio/opusfile/Portfile | 1 +
audio/opusfile/files/patch-libressl.diff | 99 ++++++++++++++++++++++++++++++++
2 files changed, 100 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/opusfile/Portfile b/audio/opusfile/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index cd11176..e6417f0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/audio/opusfile/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/opusfile/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,6 +24,7 @@ depends_lib path:lib/libssl.dylib:openssl \
</span> port:libogg \
port:libopus
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-libressl.diff
</span> configure.args --disable-silent-rules
livecheck.type regex
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/opusfile/files/patch-libressl.diff b/audio/opusfile/files/patch-libressl.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..5346c48
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/opusfile/files/patch-libressl.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,99 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/http.c.orig 2017-08-03 02:27:06.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/http.c 2018-01-11 17:23:29.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1530,7 +1530,7 @@ static long op_bio_retry_ctrl(BIO *_b,in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define BIO_set_data(_b,_ptr) ((_b)->ptr=(_ptr))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define BIO_set_init(_b,_init) ((_b)->init=(_init))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define ASN1_STRING_get0_data ASN1_STRING_data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1538,7 +1538,7 @@ static long op_bio_retry_ctrl(BIO *_b,in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int op_bio_retry_new(BIO *_b){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO_set_init(_b,1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _b->num=0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO_set_data(_b,NULL);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1549,7 +1549,7 @@ static int op_bio_retry_free(BIO *_b){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return _b!=NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*This is not const because OpenSSL doesn't allow it, even though it won't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ write to it.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static BIO_METHOD op_bio_retry_method={
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1570,7 +1570,7 @@ static BIO_METHOD op_bio_retry_method={
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proxying https URL requests.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int op_http_conn_establish_tunnel(OpusHTTPStream *_stream,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OpusHTTPConn *_conn,op_sock _fd,SSL *_ssl_conn,BIO *_ssl_bio){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER>=0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO_METHOD *bio_retry_method;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO *retry_bio;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1583,7 +1583,7 @@ static int op_http_conn_establish_tunnel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret=op_http_conn_write_fully(_conn,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _stream->proxy_connect.buf,_stream->proxy_connect.nbuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(OP_UNLIKELY(ret<0))return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER>=0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bio_retry_method=BIO_meth_new(BIO_TYPE_NULL,"retry");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(bio_retry_method==NULL)return OP_EFAULT;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO_meth_set_write(bio_retry_method,op_bio_retry_write);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1606,7 +1606,7 @@ static int op_http_conn_establish_tunnel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*This shouldn't succeed, since we can't read yet.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OP_ALWAYS_TRUE(SSL_connect(_ssl_conn)<0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SSL_set_bio(_ssl_conn,_ssl_bio,_ssl_bio);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER>=0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIO_meth_free(bio_retry_method);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*Only now do we disable write coalescing, to allow the CONNECT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1635,7 +1635,7 @@ static struct addrinfo *op_inet_pton(con
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10002000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*Match a host name against a host with a possible wildcard pattern according
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to the rules of RFC 6125 Section 6.4.3.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Return: 0 if the pattern doesn't match, and a non-zero value if it does.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1893,7 +1893,7 @@ static int op_http_conn_start_tls(OpusHT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SSL_set_tlsext_host_name(_ssl_conn,_stream->url.host);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ skip_certificate_check=_stream->skip_certificate_check;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER>=0x10002000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER>=0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*As of version 1.0.2, OpenSSL can finally do hostname checks automatically.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Of course, they make it much more complicated than it needs to be.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(!skip_certificate_check){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1956,13 +1956,13 @@ static int op_http_conn_start_tls(OpusHT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(OP_UNLIKELY(ret<=0))return OP_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ssl_session=_stream->ssl_session;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(ssl_session==NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10002000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ||!skip_certificate_check
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret=op_do_ssl_step(_ssl_conn,_fd,SSL_do_handshake);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(OP_UNLIKELY(ret<=0))return OP_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10002000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*OpenSSL before version 1.0.2 does not do automatic hostname verification,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ despite the fact that we just passed it the hostname above in the call
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ to SSL_set_tlsext_host_name().
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2314,7 +2314,7 @@ static int op_http_stream_open(OpusHTTPS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*Initialize the SSL library if necessary.*/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SSL_CTX *ssl_ctx;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# if OPENSSL_VERSION_NUMBER<0x10100000L
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if !defined(OPENSSL_NO_LOCKING)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*The documentation says SSL_library_init() is not reentrant.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ We don't want to add our own depenencies on a threading library, and it
</span></pre><pre style='margin:0'>
</pre>