summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-07-07 12:12:56 +0000
committernia <nia@pkgsrc.org>2020-07-07 12:12:56 +0000
commit31829cc9f8f3f259ed58062c992c4f17c3759155 (patch)
tree8162d6cee468e62a015fa4be26eb0b06f2dc5c1b /audio
parent337b7581f9c3387080f53ae4f55b30a03291fbd6 (diff)
downloadpkgsrc-31829cc9f8f3f259ed58062c992c4f17c3759155.tar.gz
opusfile: Update to 0.12
Changes since the v0.11 release: * Fix stack overflow buffering out-of-sequence streams. * Fix possible divide-by-zero. * Fix issues with seeking in the win32 backend. * Fix an issue where the seek algorithm could be confused by stream data changing between reads. * Clean up compiler and scan-build warnings. * Avoid use of the deprecated ftime() function which has Y2038 problems. * Remove undefined behaviour memcpy(NULL) in op_read_native(). * Visual Studio project files updated for libogg 1.3.4 library name change. * Various build systems updates. * Various integration and testing environment improvements. This release is backward-compatible with the previous release. We recommend all users upgrade.
Diffstat (limited to 'audio')
-rw-r--r--audio/opusfile/Makefile5
-rw-r--r--audio/opusfile/distinfo13
-rw-r--r--audio/opusfile/patches/patch-configure69
-rw-r--r--audio/opusfile/patches/patch-configure.ac12
-rw-r--r--audio/opusfile/patches/patch-src_http.c175
5 files changed, 7 insertions, 267 deletions
diff --git a/audio/opusfile/Makefile b/audio/opusfile/Makefile
index 24c7dc4b954..798ac322743 100644
--- a/audio/opusfile/Makefile
+++ b/audio/opusfile/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2020/01/18 21:47:58 jperkin Exp $
+# $NetBSD: Makefile,v 1.10 2020/07/07 12:12:56 nia Exp $
-DISTNAME= opusfile-0.11
-PKGREVISION= 1
+DISTNAME= opusfile-0.12
CATEGORIES= audio
MASTER_SITES= https://downloads.xiph.org/releases/opus/
diff --git a/audio/opusfile/distinfo b/audio/opusfile/distinfo
index 5cc4a39c332..b83ff197c54 100644
--- a/audio/opusfile/distinfo
+++ b/audio/opusfile/distinfo
@@ -1,9 +1,6 @@
-$NetBSD: distinfo,v 1.10 2019/07/31 10:48:31 nia Exp $
+$NetBSD: distinfo,v 1.11 2020/07/07 12:12:56 nia Exp $
-SHA1 (opusfile-0.11.tar.gz) = fc3bf2a73be16836a16d9e55ff1097de3835dce3
-RMD160 (opusfile-0.11.tar.gz) = 1698cdc450eaffc00aba4cc4912e6eb9b21bb565
-SHA512 (opusfile-0.11.tar.gz) = ec3e282310cc4f25475c27b7bc8d1652dcb25d3ac6badf87bd1b4e5397fbe106a0dab81c60d88d198003a23d8a2c9bae8b661edc9b31433effeca438ce56a349
-Size (opusfile-0.11.tar.gz) = 467420 bytes
-SHA1 (patch-configure) = 27f0176b889eab6494e83b4d8cf2bdba1c03efa8
-SHA1 (patch-configure.ac) = 7a49191176154c0e7f9fb0182e0dda7dfab8d39c
-SHA1 (patch-src_http.c) = 6b4f64a875c0fb5f9b9f63e041c232344c804dd3
+SHA1 (opusfile-0.12.tar.gz) = 3e86971fef28292f982a32730632b1d531059ed5
+RMD160 (opusfile-0.12.tar.gz) = 9b51fa303625462ce3a2c1b5fc1bfc552913d466
+SHA512 (opusfile-0.12.tar.gz) = e25e6968a3183ac0628ce1000840fd6f9f636e92ba984d6a72b76fb2a98ec632d2de4c66a8e4c05ef30655c2a4a13ab35f89606fa7d79a54cfa8506543ca57af
+Size (opusfile-0.12.tar.gz) = 471354 bytes
diff --git a/audio/opusfile/patches/patch-configure b/audio/opusfile/patches/patch-configure
deleted file mode 100644
index 15cd655fe0d..00000000000
--- a/audio/opusfile/patches/patch-configure
+++ /dev/null
@@ -1,69 +0,0 @@
-$NetBSD: patch-configure,v 1.2 2018/05/13 09:44:03 maya Exp $
-
---- configure.orig 2017-11-14 18:56:39.000000000 +0000
-+++ configure
-@@ -12491,64 +12488,6 @@ fi
- fi
-
- fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ftime" >&5
--$as_echo_n "checking for library containing ftime... " >&6; }
--if ${ac_cv_search_ftime+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- ac_func_search_save_LIBS=$LIBS
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char ftime ();
--int
--main ()
--{
--return ftime ();
-- ;
-- return 0;
--}
--_ACEOF
--for ac_lib in '' compat; do
-- if test -z "$ac_lib"; then
-- ac_res="none required"
-- else
-- ac_res=-l$ac_lib
-- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
-- fi
-- if ac_fn_c_try_link "$LINENO"; then :
-- ac_cv_search_ftime=$ac_res
--fi
--rm -f core conftest.err conftest.$ac_objext \
-- conftest$ac_exeext
-- if ${ac_cv_search_ftime+:} false; then :
-- break
--fi
--done
--if ${ac_cv_search_ftime+:} false; then :
--
--else
-- ac_cv_search_ftime=no
--fi
--rm conftest.$ac_ext
--LIBS=$ac_func_search_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ftime" >&5
--$as_echo "$ac_cv_search_ftime" >&6; }
--ac_res=$ac_cv_search_ftime
--if test "$ac_res" != no; then :
-- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
--
--else
-- enable_http=no
--fi
--
-
-
-
diff --git a/audio/opusfile/patches/patch-configure.ac b/audio/opusfile/patches/patch-configure.ac
deleted file mode 100644
index 411ac34188c..00000000000
--- a/audio/opusfile/patches/patch-configure.ac
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-configure.ac,v 1.2 2018/05/13 09:44:03 maya Exp $
-
---- configure.ac.orig 2017-11-14 18:36:25.000000000 +0000
-+++ configure.ac
-@@ -86,7 +86,6 @@ AM_COND_IF(OP_WIN32,
- )
- )
- )
--AC_SEARCH_LIBS(ftime, [compat], , [enable_http=no])
-
- m4_ifndef([PKG_PROG_PKG_CONFIG],
- [m4_fatal([Could not locate the pkg-config autoconf macros.
diff --git a/audio/opusfile/patches/patch-src_http.c b/audio/opusfile/patches/patch-src_http.c
deleted file mode 100644
index 055a89defab..00000000000
--- a/audio/opusfile/patches/patch-src_http.c
+++ /dev/null
@@ -1,175 +0,0 @@
-$NetBSD: patch-src_http.c,v 1.6 2018/05/13 09:44:03 maya Exp $
-
-* Avoid using the obsolete ftime() function.
-https://trac.xiph.org/ticket/2014
-
-* Need sys/filio.h on SunOS for FIONREAD.
-
---- src/http.c.orig 2017-08-03 00:27:06.000000000 +0000
-+++ src/http.c
-@@ -14,6 +14,9 @@
- #endif
-
- #include "internal.h"
-+#ifdef __sun
-+#include <sys/filio.h>
-+#endif
- #include <ctype.h>
- #include <errno.h>
- #include <limits.h>
-@@ -355,7 +358,7 @@ typedef int op_sock;
- # define op_reset_errno() (errno=0)
-
- # endif
--# include <sys/timeb.h>
-+# include <sys/time.h>
- # include <openssl/x509v3.h>
-
- /*The maximum number of simultaneous connections.
-@@ -799,7 +802,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.*/
-- struct timeb read_time;
-+ struct timeval read_time;
- /*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.*/
-@@ -849,7 +852,7 @@ struct OpusHTTPStream{
- struct sockaddr_in6 v6;
- } addr;
- /*The last time we re-resolved the host.*/
-- struct timeb resolve_time;
-+ struct timeval resolve_time;
- /*A buffer used to build HTTP requests.*/
- OpusStringBuf request;
- /*A buffer used to build proxy CONNECT requests.*/
-@@ -1004,26 +1007,26 @@ static int op_http_conn_estimate_availab
- return available;
- }
-
--static opus_int32 op_time_diff_ms(const struct timeb *_end,
-- const struct timeb *_start){
-+static opus_int32 op_time_diff_ms(const struct timeval *_end,
-+ const struct timeval *_start){
- opus_int64 dtime;
-- dtime=_end->time-(opus_int64)_start->time;
-- OP_ASSERT(_end->millitm<1000);
-- OP_ASSERT(_start->millitm<1000);
-+ dtime=_end->tv_sec-(opus_int64)_start->tv_sec;
-+ OP_ASSERT(_end->tv_usec<1000000);
-+ OP_ASSERT(_start->tv_usec<1000000);
- if(OP_UNLIKELY(dtime>(OP_INT32_MAX-1000)/1000))return OP_INT32_MAX;
- if(OP_UNLIKELY(dtime<(OP_INT32_MIN+1000)/1000))return OP_INT32_MIN;
-- return (opus_int32)dtime*1000+_end->millitm-_start->millitm;
-+ return (opus_int32)dtime*1000+(_end->tv_usec-_start->tv_usec)/1000;
- }
-
- /*Update the read rate estimate for this connection.*/
- static void op_http_conn_read_rate_update(OpusHTTPConn *_conn){
-- struct timeb read_time;
-+ struct timeval read_time;
- opus_int32 read_delta_ms;
- opus_int64 read_delta_bytes;
- opus_int64 read_rate;
- read_delta_bytes=_conn->read_bytes;
- if(read_delta_bytes<=0)return;
-- ftime(&read_time);
-+ gettimeofday(&read_time, NULL);
- 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);
-@@ -2015,7 +2018,7 @@ static int op_sock_connect_next(op_sock
- # define OP_NPROTOS (2)
-
- static int op_http_connect_impl(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
-- 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 +2048,7 @@ static int op_http_connect_impl(OpusHTTP
- _stream->free_head=_conn->next;
- _conn->next=_stream->lru_head;
- _stream->lru_head=_conn;
-- ftime(_start_time);
-+ gettimeofday(_start_time, NULL);
- *&_conn->read_time=*_start_time;
- _conn->read_bytes=0;
- _conn->read_rate=0;
-@@ -2147,14 +2150,14 @@ static int op_http_connect_impl(OpusHTTP
- }
-
- static int op_http_connect(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
-- struct addrinfo *_addrs,struct timeb *_start_time){
-- struct timeb resolve_time;
-+ struct addrinfo *_addrs,struct timeval *_start_time){
-+ struct timeval resolve_time;
- struct addrinfo *new_addrs;
- int ret;
- /*Re-resolve the host if we need to (RFC 6555 says we MUST do so
- occasionally).*/
- new_addrs=NULL;
-- ftime(&resolve_time);
-+ gettimeofday(&resolve_time, NULL);
- 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);
-@@ -2305,8 +2308,8 @@ static int op_http_stream_open(OpusHTTPS
- addrs=NULL;
- for(nredirs=0;nredirs<OP_REDIRECT_LIMIT;nredirs++){
- OpusParsedURL next_url;
-- struct timeb start_time;
-- struct timeb end_time;
-+ struct timeval start_time;
-+ struct timeval end_time;
- char *next;
- char *status_code;
- int minor_version_pos;
-@@ -2440,7 +2443,7 @@ static int op_http_stream_open(OpusHTTPS
- 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;
-- ftime(&end_time);
-+ gettimeofday(&end_time, NULL);
- next=op_http_parse_status_line(&v1_1_compat,&status_code,
- _stream->response.buf);
- if(OP_UNLIKELY(next==NULL))return OP_FALSE;
-@@ -2852,8 +2855,8 @@ static int op_http_conn_handle_response(
- 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;
-+ struct timeval start_time;
-+ struct timeval end_time;
- opus_int32 connect_rate;
- opus_int32 connect_time;
- int ret;
-@@ -2863,7 +2866,7 @@ static int op_http_conn_open_pos(OpusHTT
- 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=(int)(_conn-_stream->conns);
- OP_ASSERT(_stream->cur_conni>=0&&_stream->cur_conni<OP_NCONNS_MAX);
- /*The connection has been successfully opened.
-@@ -3115,7 +3118,7 @@ static int op_http_conn_read_ahead(OpusH
- }
-
- static int op_http_stream_seek(void *_stream,opus_int64 _offset,int _whence){
-- struct timeb seek_time;
-+ struct timeval seek_time;
- OpusHTTPStream *stream;
- OpusHTTPConn *conn;
- OpusHTTPConn **pnext;
-@@ -3156,7 +3159,7 @@ static int op_http_stream_seek(void *_st
- op_http_conn_read_rate_update(stream->conns+ci);
- *&seek_time=*&stream->conns[ci].read_time;
- }
-- else ftime(&seek_time);
-+ else gettimeofday(&seek_time, NULL);
- /*If we seeked past the end of the stream, just disable the active
- connection.*/
- if(pos>=content_length){