maintenance update to 0.9
This commit is contained in:
parent
629f354715
commit
8a07122438
@ -1,11 +1,11 @@
|
||||
# $OpenBSD $
|
||||
|
||||
COMMENT = high-level decoding and seeking API for Opus files
|
||||
DISTNAME = opusfile-0.8
|
||||
DISTNAME = opusfile-0.9
|
||||
CATEGORIES = audio
|
||||
|
||||
SHARED_LIBS += opusfile 1.0 # 4.1
|
||||
SHARED_LIBS += opusurl 1.0 # 4.1
|
||||
SHARED_LIBS += opusfile 1.0 # 4.2
|
||||
SHARED_LIBS += opusurl 1.0 # 4.2
|
||||
|
||||
HOMEPAGE = https://opus-codec.org/
|
||||
MAINTAINER = Sergey Bronnikov <estetus@gmail.com>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (opusfile-0.8.tar.gz) = LCMe08+qGzFz9S10Dlu9d9Ubnf7LhwFLQEkX+6S4VaQ=
|
||||
SIZE (opusfile-0.8.tar.gz) = 464600
|
||||
SHA256 (opusfile-0.9.tar.gz) = 91+1AOQLEid1rBpxrYDER3aYhCqP6dpKG0oanxbk6Xk=
|
||||
SIZE (opusfile-0.9.tar.gz) = 467683
|
||||
|
@ -1,11 +1,12 @@
|
||||
$OpenBSD: patch-configure,v 1.2 2016/08/05 14:33:35 naddy Exp $
|
||||
$OpenBSD: patch-configure,v 1.3 2017/08/14 22:09:51 naddy Exp $
|
||||
|
||||
Do not disable HTTP support despite missing ftime() since we replace
|
||||
it with gettimeofday().
|
||||
|
||||
--- configure.orig Wed Jul 6 19:38:02 2016
|
||||
+++ configure Thu Aug 4 17:29:10 2016
|
||||
@@ -12545,7 +12545,7 @@ if test "$ac_res" != no; then :
|
||||
Index: configure
|
||||
--- configure.orig
|
||||
+++ configure
|
||||
@@ -12546,7 +12546,7 @@ if test "$ac_res" != no; then :
|
||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||
|
||||
else
|
||||
|
@ -1,11 +1,12 @@
|
||||
$OpenBSD: patch-src_http_c,v 1.2 2016/08/05 14:33:35 naddy Exp $
|
||||
$OpenBSD: patch-src_http_c,v 1.3 2017/08/14 22:09:51 naddy Exp $
|
||||
|
||||
No struct timeb / ftime(3) support; libcompat is gone.
|
||||
Replace with struct timeval / gettimeofday(2).
|
||||
|
||||
--- src/http.c.orig Wed Jul 6 19:14:49 2016
|
||||
+++ src/http.c Thu Aug 4 18:22:46 2016
|
||||
@@ -347,7 +347,7 @@ typedef int op_sock;
|
||||
Index: src/http.c
|
||||
--- src/http.c.orig
|
||||
+++ src/http.c
|
||||
@@ -355,7 +355,7 @@ typedef int op_sock;
|
||||
# define op_reset_errno() (errno=0)
|
||||
|
||||
# endif
|
||||
@ -14,7 +15,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
# include <openssl/x509v3.h>
|
||||
|
||||
/*The maximum number of simultaneous connections.
|
||||
@@ -788,7 +788,7 @@ struct OpusHTTPConn{
|
||||
@@ -799,7 +799,7 @@ struct OpusHTTPConn{
|
||||
/*The next connection in either the LRU or free list.*/
|
||||
OpusHTTPConn *next;
|
||||
/*The last time we blocked for reading from this connection.*/
|
||||
@ -23,7 +24,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
/*The number of bytes we've read since the last time we blocked.*/
|
||||
opus_int64 read_bytes;
|
||||
/*The estimated throughput of this connection, in bytes/s.*/
|
||||
@@ -838,7 +838,7 @@ struct OpusHTTPStream{
|
||||
@@ -849,7 +849,7 @@ struct OpusHTTPStream{
|
||||
struct sockaddr_in6 v6;
|
||||
} addr;
|
||||
/*The last time we re-resolved the host.*/
|
||||
@ -32,7 +33,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
/*A buffer used to build HTTP requests.*/
|
||||
OpusStringBuf request;
|
||||
/*A buffer used to build proxy CONNECT requests.*/
|
||||
@@ -992,26 +992,25 @@ static int op_http_conn_estimate_available(OpusHTTPCon
|
||||
@@ -1004,26 +1004,25 @@ static int op_http_conn_estimate_available(OpusHTTPCon
|
||||
return available;
|
||||
}
|
||||
|
||||
@ -68,7 +69,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
read_delta_ms=op_time_diff_ms(&read_time,&_conn->read_time);
|
||||
read_rate=_conn->read_rate;
|
||||
read_delta_ms=OP_MAX(read_delta_ms,1);
|
||||
@@ -1517,14 +1516,14 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _n
|
||||
@@ -1530,7 +1529,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _n
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -76,7 +77,8 @@ Replace with struct timeval / gettimeofday(2).
|
||||
+# 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
|
||||
# define ASN1_STRING_get0_data ASN1_STRING_data
|
||||
@@ -1538,7 +1537,7 @@ static long op_bio_retry_ctrl(BIO *_b,int _cmd,long _n
|
||||
|
||||
static int op_bio_retry_new(BIO *_b){
|
||||
BIO_set_init(_b,1);
|
||||
@ -85,7 +87,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
_b->num=0;
|
||||
# endif
|
||||
BIO_set_data(_b,NULL);
|
||||
@@ -1535,7 +1534,7 @@ static int op_bio_retry_free(BIO *_b){
|
||||
@@ -1549,7 +1548,7 @@ static int op_bio_retry_free(BIO *_b){
|
||||
return _b!=NULL;
|
||||
}
|
||||
|
||||
@ -94,7 +96,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
/*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 +1555,7 @@ static BIO_METHOD op_bio_retry_method={
|
||||
@@ -1570,7 +1569,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){
|
||||
@ -103,7 +105,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
BIO_METHOD *bio_retry_method;
|
||||
# endif
|
||||
BIO *retry_bio;
|
||||
@@ -1569,7 +1568,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStrea
|
||||
@@ -1583,7 +1582,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStrea
|
||||
ret=op_http_conn_write_fully(_conn,
|
||||
_stream->proxy_connect.buf,_stream->proxy_connect.nbuf);
|
||||
if(OP_UNLIKELY(ret<0))return ret;
|
||||
@ -112,7 +114,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
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 +1591,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStrea
|
||||
@@ -1606,7 +1605,7 @@ static int op_http_conn_establish_tunnel(OpusHTTPStrea
|
||||
/*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);
|
||||
@ -121,16 +123,25 @@ Replace with struct timeval / gettimeofday(2).
|
||||
BIO_meth_free(bio_retry_method);
|
||||
# endif
|
||||
/*Only now do we disable write coalescing, to allow the CONNECT
|
||||
@@ -1933,7 +1932,7 @@ static int op_sock_connect_next(op_sock _fd,
|
||||
@@ -1893,7 +1892,7 @@ static int op_http_conn_start_tls(OpusHTTPStream *_str
|
||||
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 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
/*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){
|
||||
@@ -2015,7 +2014,7 @@ static int op_sock_connect_next(op_sock _fd,
|
||||
# define OP_NPROTOS (2)
|
||||
|
||||
static int op_http_connect_impl(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
|
||||
- const struct addrinfo *_addrs,struct timeb *_start_time){
|
||||
+ const struct addrinfo *_addrs,struct timeval *_start_time){
|
||||
const struct addrinfo *addr;
|
||||
const struct addrinfo *addrs[OP_NPROTOS];
|
||||
struct pollfd fds[OP_NPROTOS];
|
||||
@@ -1963,7 +1962,7 @@ static int op_http_connect_impl(OpusHTTPStream *_strea
|
||||
- struct addrinfo *_addrs,struct timeb *_start_time){
|
||||
+ struct addrinfo *_addrs,struct timeval *_start_time){
|
||||
struct addrinfo *addr;
|
||||
struct addrinfo *addrs[OP_NPROTOS];
|
||||
struct pollfd fds[OP_NPROTOS];
|
||||
@@ -2045,7 +2044,7 @@ static int op_http_connect_impl(OpusHTTPStream *_strea
|
||||
_stream->free_head=_conn->next;
|
||||
_conn->next=_stream->lru_head;
|
||||
_stream->lru_head=_conn;
|
||||
@ -139,13 +150,13 @@ Replace with struct timeval / gettimeofday(2).
|
||||
*&_conn->read_time=*_start_time;
|
||||
_conn->read_bytes=0;
|
||||
_conn->read_rate=0;
|
||||
@@ -2065,14 +2064,14 @@ static int op_http_connect_impl(OpusHTTPStream *_strea
|
||||
@@ -2147,14 +2146,14 @@ static int op_http_connect_impl(OpusHTTPStream *_strea
|
||||
}
|
||||
|
||||
static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
|
||||
- const struct addrinfo *_addrs,struct timeb *_start_time){
|
||||
- struct addrinfo *_addrs,struct timeb *_start_time){
|
||||
- struct timeb resolve_time;
|
||||
+ const struct addrinfo *_addrs,struct timeval *_start_time){
|
||||
+ struct addrinfo *_addrs,struct timeval *_start_time){
|
||||
+ struct timeval resolve_time;
|
||||
struct addrinfo *new_addrs;
|
||||
int ret;
|
||||
@ -157,7 +168,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
if(_addrs!=&_stream->addr_info||op_time_diff_ms(&resolve_time,
|
||||
&_stream->resolve_time)>=OP_RESOLVE_CACHE_TIMEOUT_MS){
|
||||
new_addrs=op_resolve(_stream->connect_host,_stream->connect_port);
|
||||
@@ -2222,8 +2221,8 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
@@ -2305,8 +2304,8 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
addrs=NULL;
|
||||
for(nredirs=0;nredirs<OP_REDIRECT_LIMIT;nredirs++){
|
||||
OpusParsedURL next_url;
|
||||
@ -168,7 +179,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
char *next;
|
||||
char *status_code;
|
||||
int minor_version_pos;
|
||||
@@ -2231,7 +2230,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
@@ -2314,7 +2313,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
/*Initialize the SSL library if necessary.*/
|
||||
if(OP_URL_IS_SSL(&_stream->url)&&_stream->ssl_ctx==NULL){
|
||||
SSL_CTX *ssl_ctx;
|
||||
@ -177,7 +188,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
# 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
|
||||
@@ -2357,7 +2356,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
@@ -2440,7 +2439,7 @@ static int op_http_stream_open(OpusHTTPStream *_stream
|
||||
if(OP_UNLIKELY(ret<0))return ret;
|
||||
ret=op_http_conn_read_response(_stream->conns+0,&_stream->response);
|
||||
if(OP_UNLIKELY(ret<0))return ret;
|
||||
@ -186,32 +197,27 @@ Replace with struct timeval / gettimeofday(2).
|
||||
next=op_http_parse_status_line(&v1_1_compat,&status_code,
|
||||
_stream->response.buf);
|
||||
if(OP_UNLIKELY(next==NULL))return OP_FALSE;
|
||||
@@ -2769,18 +2768,18 @@ static int op_http_conn_handle_response(OpusHTTPStream
|
||||
@@ -2852,8 +2851,8 @@ static int op_http_conn_handle_response(OpusHTTPStream
|
||||
converted into a request for the rest.*/
|
||||
static int op_http_conn_open_pos(OpusHTTPStream *_stream,
|
||||
OpusHTTPConn *_conn,opus_int64 _pos,opus_int32 _chunk_size){
|
||||
- struct timeb start_time;
|
||||
- struct timeb end_time;
|
||||
- opus_int32 connect_rate;
|
||||
- opus_int32 connect_time;
|
||||
- int ret;
|
||||
+ struct timeval start_time;
|
||||
+ struct timeval end_time;
|
||||
+ opus_int32 connect_rate;
|
||||
+ opus_int32 connect_time;
|
||||
+ int ret;
|
||||
ret=op_http_connect(_stream,_conn,&_stream->addr_info,&start_time);
|
||||
if(OP_UNLIKELY(ret<0))return ret;
|
||||
ret=op_http_conn_send_request(_stream,_conn,_pos,_chunk_size,0);
|
||||
+ struct timeval start_time;
|
||||
+ struct timeval end_time;
|
||||
opus_int32 connect_rate;
|
||||
opus_int32 connect_time;
|
||||
int ret;
|
||||
@@ -2863,7 +2862,7 @@ static int op_http_conn_open_pos(OpusHTTPStream *_stre
|
||||
if(OP_UNLIKELY(ret<0))return ret;
|
||||
ret=op_http_conn_handle_response(_stream,_conn);
|
||||
if(OP_UNLIKELY(ret!=0))return OP_FALSE;
|
||||
- ftime(&end_time);
|
||||
+ gettimeofday(&end_time,NULL);
|
||||
_stream->cur_conni=_conn-_stream->conns;
|
||||
_stream->cur_conni=(int)(_conn-_stream->conns);
|
||||
OP_ASSERT(_stream->cur_conni>=0&&_stream->cur_conni<OP_NCONNS_MAX);
|
||||
/*The connection has been successfully opened.
|
||||
@@ -3032,7 +3031,7 @@ static int op_http_conn_read_ahead(OpusHTTPStream *_st
|
||||
@@ -3115,7 +3114,7 @@ static int op_http_conn_read_ahead(OpusHTTPStream *_st
|
||||
}
|
||||
|
||||
static int op_http_stream_seek(void *_stream,opus_int64 _offset,int _whence){
|
||||
@ -220,7 +226,7 @@ Replace with struct timeval / gettimeofday(2).
|
||||
OpusHTTPStream *stream;
|
||||
OpusHTTPConn *conn;
|
||||
OpusHTTPConn **pnext;
|
||||
@@ -3073,7 +3072,7 @@ static int op_http_stream_seek(void *_stream,opus_int6
|
||||
@@ -3156,7 +3155,7 @@ static int op_http_stream_seek(void *_stream,opus_int6
|
||||
op_http_conn_read_rate_update(stream->conns+ci);
|
||||
*&seek_time=*&stream->conns[ci].read_time;
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
Opusfile provides application developers with a high-level API for
|
||||
decoding and seeking in .opus files.
|
||||
The opusfile and opusurl libraries provide a high-level API for
|
||||
decoding and seeking within .opus files on disk or over http(s).
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2016/08/05 14:33:35 naddy Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2017/08/14 22:09:51 naddy Exp $
|
||||
include/opus/opusfile.h
|
||||
lib/libopusfile.a
|
||||
lib/libopusfile.la
|
||||
@ -11,4 +11,4 @@ lib/pkgconfig/opusurl.pc
|
||||
share/doc/opusfile/
|
||||
share/doc/opusfile/AUTHORS
|
||||
share/doc/opusfile/COPYING
|
||||
share/doc/opusfile/README.txt
|
||||
share/doc/opusfile/README.md
|
||||
|
Loading…
Reference in New Issue
Block a user