summaryrefslogtreecommitdiff
path: root/media-libs/libopusenc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-22 07:05:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-22 07:05:54 +0000
commit13ec12ad28bc2ce6e2902be1d571befcca2b3f60 (patch)
tree7c606c326ffa4095258ba77370fe2cad7aff49a8 /media-libs/libopusenc
parentb7819d03d7312d3d8d12b49738aa417f35f6e18a (diff)
gentoo auto-resync : 22:11:2022 - 07:05:54
Diffstat (limited to 'media-libs/libopusenc')
-rw-r--r--media-libs/libopusenc/Manifest2
-rw-r--r--media-libs/libopusenc/files/libopusenc-0.2.1-clang16.patch102
-rw-r--r--media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild44
3 files changed, 148 insertions, 0 deletions
diff --git a/media-libs/libopusenc/Manifest b/media-libs/libopusenc/Manifest
index 6110dd12fd5d..857ba57620cc 100644
--- a/media-libs/libopusenc/Manifest
+++ b/media-libs/libopusenc/Manifest
@@ -1,3 +1,5 @@
+AUX libopusenc-0.2.1-clang16.patch 3810 BLAKE2B a752d96b84af6293a96d1adff7b30255c524da218e6bbc3326de238c141b3e4f2d5c6e1b42d55194caa48f3715e964a755acc153ca6c0bbd4362861e0700e10f SHA512 98a21d44173f73bdafce9215603d5242dafefe13aa11dea8da1853712e4bbdee21aa62f60fb4b822f830e65f52f83f0ae15c2d6f5da4fff0193addf32aa79e17
DIST libopusenc-0.2.1.tar.gz 388071 BLAKE2B de3a69aeb6bb955352e097e41b12cf0c627ce5278687124d00996f52ccf5e8e39277e7c345bb26e75dd7d29b6a70f50396fa5a157913e0906a18acd007b1621b SHA512 adf30cacea9ac2e5889a40147f53943a1bec5279c5ff3a9b09de8ca52727a6cbaeecd338417fc5856e337ae183c85b0d366d14ec4ec329de12d50709a6f6507a
+EBUILD libopusenc-0.2.1-r1.ebuild 780 BLAKE2B 63fbe362e7dc27c550c982cebb16ea938de7ef05ef419a61bc4aebbc161208e98d44665c77e77bad2fe016656f179d2399e994e953727d3737489a6b5c48d295 SHA512 6783909e4a703985ae6d48f415f5e4014f6032885598061b3b4a2d65e41ee34f223e5163d83d47ee70ce9ffa3ed0a1a8ce9e1c419a9e3e0d3d993a88236887a9
EBUILD libopusenc-0.2.1.ebuild 621 BLAKE2B 73414e360c961e1a314cf0926121d6ff0795ef908ef04445f8d566254253d653ebdd1c119689f3436bb29eec5a2b5bd9f2ca3f92f263a14feb1ef8663c16db30 SHA512 3b01f1a0d031e66fde370351d88e30496ee0fb57cfd619265ff827b7bbfa2a79f49d2de138e0ed67280035ea1803b5172a94985d397779323f8c4ad1b1ed434b
MISC metadata.xml 260 BLAKE2B 9945ac40ee60ce67adf51840c3cc2d6d2743dffe4fd2ec965d300c709323f80eb5d35eaeb804414eebb2da1e954ee688067c05093b26499678de524b414ac4ec SHA512 e5b6a2a44cd2a4ea4fb1267eb8f635c079c022853443ad180ca12f2df84492f3ba34db45e4ff5e7e09262a74745f5c0aa04ebccd6f998cf19a6ea2ccd0627701
diff --git a/media-libs/libopusenc/files/libopusenc-0.2.1-clang16.patch b/media-libs/libopusenc/files/libopusenc-0.2.1-clang16.patch
new file mode 100644
index 000000000000..0fc8f214240f
--- /dev/null
+++ b/media-libs/libopusenc/files/libopusenc-0.2.1-clang16.patch
@@ -0,0 +1,102 @@
+https://gitlab.xiph.org/xiph/libopusenc/-/merge_requests/6
+https://bugs.gentoo.org/879701
+
+From ed6154cab7003859ec0bc6481f26b1110ddf34b8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 02:59:20 +0000
+Subject: [PATCH 1/2] m4: fix -Wstrict-protoypes
+
+In preparation for C23. Fixes the following error if Clang 16 is
+cranked up to be stricter:
+```
+-warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
++error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/m4/attributes.m4
++++ b/m4/attributes.m4
+@@ -39,7 +39,7 @@ AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
+ AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
+ [ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
++ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 0; }])],
+ [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
+ CFLAGS="$ac_save_CFLAGS"
+@@ -89,7 +89,7 @@ AC_DEFUN([CC_CHECK_LDFLAGS], [
+ AS_TR_SH([cc_cv_ldflags_$1]),
+ [ac_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $1"
+- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
++ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) { return 1; }])],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
+ [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
+ LDFLAGS="$ac_save_LDFLAGS"
+@@ -165,16 +165,16 @@ AC_DEFUN([CC_CHECK_ATTRIBUTE], [
+ AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
+ CC_CHECK_ATTRIBUTE(
+ [constructor],,
+- [extern void foo();
+- void __attribute__((constructor)) ctor() { foo(); }],
++ [extern void foo(void);
++ void __attribute__((constructor)) ctor(void) { foo(); }],
+ [$1], [$2])
+ ])
+
+ AC_DEFUN([CC_ATTRIBUTE_DESTRUCTOR], [
+ CC_CHECK_ATTRIBUTE(
+ [destructor],,
+- [extern void foo();
+- void __attribute__((destructor)) dtor() { foo(); }],
++ [extern void foo(void);
++ void __attribute__((destructor)) dtor(void) { foo(); }],
+ [$1], [$2])
+ ])
+
+@@ -195,7 +195,7 @@ AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
+ AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
+ CC_CHECK_ATTRIBUTE(
+ [visibility_$1], [visibility("$1")],
+- [void __attribute__((visibility("$1"))) $1_function() { }],
++ [void __attribute__((visibility("$1"))) $1_function(void) { }],
+ [$2], [$3])
+ ])
+
+@@ -306,7 +306,7 @@ AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
+ CFLAGS="$CFLAGS $cc_cv_werror"
+ for cc_attribute_align_try in 64 32 16 8 4 2; do
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+- int main() {
++ int main(void) {
+ static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
+ return c;
+ }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
+GitLab
+From 4e0776f754629f75348faa97bab1441ac6db0802 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 03:00:38 +0000
+Subject: [PATCH 2/2] opusenc: Fix -Wstrict-prototypes
+
+In preparation for C23. Fixes the following warning with Clang 16:
+```
+src/opusenc.c:82:37: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
+OggOpusComments *ope_comments_create() {
+ ^
+ void
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/src/opusenc.c
++++ b/src/opusenc.c
+@@ -79,7 +79,7 @@ struct OggOpusComments {
+ };
+
+ /* Create a new comments object. The vendor string is optional. */
+-OggOpusComments *ope_comments_create() {
++OggOpusComments *ope_comments_create(void) {
+ OggOpusComments *c;
+ const char *libopus_str;
+ char vendor_str[1024];
+GitLab
diff --git a/media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild b/media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild
new file mode 100644
index 000000000000..f37ab0ef5ec0
--- /dev/null
+++ b/media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="High-level API for encoding .opus files"
+HOMEPAGE="https://www.opus-codec.org/"
+SRC_URI="https://archive.mozilla.org/pub/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+IUSE="doc"
+
+RDEPEND=">=media-libs/opus-1.1:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen[dot] )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2.1-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ # Should be able to drop in next release if patches merged
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable doc)
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}