From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F1300158020 for ; Tue, 22 Nov 2022 03:23:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED3F6E08BB; Tue, 22 Nov 2022 03:23:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF70AE08BB for ; Tue, 22 Nov 2022 03:23:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC199340FE3 for ; Tue, 22 Nov 2022 03:23:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C7E12761 for ; Tue, 22 Nov 2022 03:23:24 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1669087044.d1e9c48e14fc7599345d2f86db526d34516faa22.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libopusenc/, media-libs/libopusenc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libopusenc/files/libopusenc-0.2.1-clang16.patch media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild X-VCS-Directories: media-libs/libopusenc/ media-libs/libopusenc/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d1e9c48e14fc7599345d2f86db526d34516faa22 X-VCS-Branch: master Date: Tue, 22 Nov 2022 03:23:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 728503b0-a7f9-4bab-9f7d-005de8f61afc X-Archives-Hash: f2bc39ac2c2aa32378f39bbc45db4c0e commit: d1e9c48e14fc7599345d2f86db526d34516faa22 Author: Sam James gentoo org> AuthorDate: Tue Nov 22 03:06:00 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Nov 22 03:17:24 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1e9c48e media-libs/libopusenc: EAPI 8; fix configure w/ clang 16 Closes: https://bugs.gentoo.org/879701 Signed-off-by: Sam James gentoo.org> .../files/libopusenc-0.2.1-clang16.patch | 102 +++++++++++++++++++++ media-libs/libopusenc/libopusenc-0.2.1-r1.ebuild | 44 +++++++++ 2 files changed, 146 insertions(+) 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 +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 +--- 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 +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 +--- 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 +}