pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/libopusenc



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Dec 22 23:18:38 UTC 2025

Modified Files:
        pkgsrc/audio/libopusenc: Makefile distinfo
Added Files:
        pkgsrc/audio/libopusenc/patches: patch-include_opusenc.h

Log Message:
libopusenc: add upstream patch to fix build of opus-tools

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/audio/libopusenc/Makefile \
    pkgsrc/audio/libopusenc/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/libopusenc/patches/patch-include_opusenc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/libopusenc/Makefile
diff -u pkgsrc/audio/libopusenc/Makefile:1.3 pkgsrc/audio/libopusenc/Makefile:1.4
--- pkgsrc/audio/libopusenc/Makefile:1.3        Wed Nov 12 20:22:25 2025
+++ pkgsrc/audio/libopusenc/Makefile    Mon Dec 22 23:18:38 2025
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2025/11/12 20:22:25 mrg Exp $
+# $NetBSD: Makefile,v 1.4 2025/12/22 23:18:38 wiz Exp $
 
 DISTNAME=      libopusenc-0.2.1
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    audio
 MASTER_SITES=  https://downloads.xiph.org/releases/opus/
 
Index: pkgsrc/audio/libopusenc/distinfo
diff -u pkgsrc/audio/libopusenc/distinfo:1.3 pkgsrc/audio/libopusenc/distinfo:1.4
--- pkgsrc/audio/libopusenc/distinfo:1.3        Tue Oct 26 09:59:08 2021
+++ pkgsrc/audio/libopusenc/distinfo    Mon Dec 22 23:18:38 2025
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 09:59:08 nia Exp $
+$NetBSD: distinfo,v 1.4 2025/12/22 23:18:38 wiz Exp $
 
 BLAKE2s (libopusenc-0.2.1.tar.gz) = 62abdbd51b5301dc2822077e25d1d73d1042ff5be29488e007cdb975b9c416f3
 SHA512 (libopusenc-0.2.1.tar.gz) = adf30cacea9ac2e5889a40147f53943a1bec5279c5ff3a9b09de8ca52727a6cbaeecd338417fc5856e337ae183c85b0d366d14ec4ec329de12d50709a6f6507a
 Size (libopusenc-0.2.1.tar.gz) = 388071 bytes
+SHA1 (patch-include_opusenc.h) = d76abd05730593b941e68f1df0dc3d5fad2de410

Added files:

Index: pkgsrc/audio/libopusenc/patches/patch-include_opusenc.h
diff -u /dev/null pkgsrc/audio/libopusenc/patches/patch-include_opusenc.h:1.1
--- /dev/null   Mon Dec 22 23:18:38 2025
+++ pkgsrc/audio/libopusenc/patches/patch-include_opusenc.h     Mon Dec 22 23:18:38 2025
@@ -0,0 +1,72 @@
+$NetBSD: patch-include_opusenc.h,v 1.1 2025/12/22 23:18:38 wiz Exp $
+
+The __opus_check_* macros are undocumented macros internal to opus, and
+have changed in opus commit 7817df7908318fb3a0af2a01e4da1e25643967d0
+because identifiers beginning with a double underscore are reserved by
+ISO C.  Define our own macros, not using reserved identifiers.
+
+Reported by Bertaz on GitHub and benedikt-grl on gitlab.xiph.org.
+
+Resolves: https://github.com/xiph/libopusenc/pull/36
+Resolves: opus-tools#2323
+
+https://gitlab.xiph.org/xiph/libopusenc/-/commit/04c6172ffbbd5c7f7f2e170cf843872113f33b05
+
+--- include/opusenc.h.orig     2018-09-14 17:12:05.000000000 +0000
++++ include/opusenc.h
+@@ -104,7 +104,6 @@ extern "C" {
+ /*@}*/
+ /*@}*/
+ 
+-
+ /* These are the "raw" request values -- they should usually not be used. */
+ #define OPE_SET_DECISION_DELAY_REQUEST      14000
+ #define OPE_GET_DECISION_DELAY_REQUEST      14001
+@@ -121,6 +120,13 @@ extern "C" {
+ #define OPE_GET_NB_STREAMS_REQUEST          14013
+ #define OPE_GET_NB_COUPLED_STREAMS_REQUEST  14015
+ 
++/* Macros to trigger compilation errors when the wrong types are provided to a CTL. */
++/* These macros are not part of the API and are only for use within the macros below. */
++#define ope_check_int(x) (((void)((x) == (opus_int32)0)), (opus_int32)(x))
++#define ope_check_int_ptr(ptr) ((ptr) + ((ptr) - (opus_int32*)(ptr)))
++#define ope_check_packet_func(x) ((void)((void (*)(void *, const unsigned char *, opus_int32, opus_uint32))0 == (x)), (x))
++#define ope_check_void_ptr(x) ((void)((void *)0 == (x)), (x))
++
+ /**\defgroup encoder_ctl Encoding Options*/
+ /*@{*/
+ 
+@@ -129,21 +135,21 @@ extern "C" {
+    Macros for setting encoder options.*/
+ /*@{*/
+ 
+-#define OPE_SET_DECISION_DELAY(x) OPE_SET_DECISION_DELAY_REQUEST, __opus_check_int(x)
+-#define OPE_GET_DECISION_DELAY(x) OPE_GET_DECISION_DELAY_REQUEST, __opus_check_int_ptr(x)
+-#define OPE_SET_MUXING_DELAY(x) OPE_SET_MUXING_DELAY_REQUEST, __opus_check_int(x)
+-#define OPE_GET_MUXING_DELAY(x) OPE_GET_MUXING_DELAY_REQUEST, __opus_check_int_ptr(x)
+-#define OPE_SET_COMMENT_PADDING(x) OPE_SET_COMMENT_PADDING_REQUEST, __opus_check_int(x)
+-#define OPE_GET_COMMENT_PADDING(x) OPE_GET_COMMENT_PADDING_REQUEST, __opus_check_int_ptr(x)
+-#define OPE_SET_SERIALNO(x) OPE_SET_SERIALNO_REQUEST, __opus_check_int(x)
+-#define OPE_GET_SERIALNO(x) OPE_GET_SERIALNO_REQUEST, __opus_check_int_ptr(x)
++#define OPE_SET_DECISION_DELAY(x) OPE_SET_DECISION_DELAY_REQUEST, ope_check_int(x)
++#define OPE_GET_DECISION_DELAY(x) OPE_GET_DECISION_DELAY_REQUEST, ope_check_int_ptr(x)
++#define OPE_SET_MUXING_DELAY(x) OPE_SET_MUXING_DELAY_REQUEST, ope_check_int(x)
++#define OPE_GET_MUXING_DELAY(x) OPE_GET_MUXING_DELAY_REQUEST, ope_check_int_ptr(x)
++#define OPE_SET_COMMENT_PADDING(x) OPE_SET_COMMENT_PADDING_REQUEST, ope_check_int(x)
++#define OPE_GET_COMMENT_PADDING(x) OPE_GET_COMMENT_PADDING_REQUEST, ope_check_int_ptr(x)
++#define OPE_SET_SERIALNO(x) OPE_SET_SERIALNO_REQUEST, ope_check_int(x)
++#define OPE_GET_SERIALNO(x) OPE_GET_SERIALNO_REQUEST, ope_check_int_ptr(x)
+ /* FIXME: Add type-checking macros to these. */
+ #define OPE_SET_PACKET_CALLBACK(x,u) OPE_SET_PACKET_CALLBACK_REQUEST, (x), (u)
+ /*#define OPE_GET_PACKET_CALLBACK(x,u) OPE_GET_PACKET_CALLBACK_REQUEST, (x), (u)*/
+-#define OPE_SET_HEADER_GAIN(x) OPE_SET_HEADER_GAIN_REQUEST, __opus_check_int(x)
+-#define OPE_GET_HEADER_GAIN(x) OPE_GET_HEADER_GAIN_REQUEST, __opus_check_int_ptr(x)
+-#define OPE_GET_NB_STREAMS(x) OPE_GET_NB_STREAMS_REQUEST, __opus_check_int_ptr(x)
+-#define OPE_GET_NB_COUPLED_STREAMS(x) OPE_GET_NB_COUPLED_STREAMS_REQUEST, __opus_check_int_ptr(x)
++#define OPE_SET_HEADER_GAIN(x) OPE_SET_HEADER_GAIN_REQUEST, ope_check_int(x)
++#define OPE_GET_HEADER_GAIN(x) OPE_GET_HEADER_GAIN_REQUEST, ope_check_int_ptr(x)
++#define OPE_GET_NB_STREAMS(x) OPE_GET_NB_STREAMS_REQUEST, ope_check_int_ptr(x)
++#define OPE_GET_NB_COUPLED_STREAMS(x) OPE_GET_NB_COUPLED_STREAMS_REQUEST, ope_check_int_ptr(x)
+ /*@}*/
+ /*@}*/
+ 



Home | Main Index | Thread Index | Old Index