From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opusfile/files/, media-libs/opusfile/
Date: Tue, 22 Nov 2022 03:23:24 +0000 (UTC) [thread overview]
Message-ID: <1669087044.754c8b4df67d9e16962c4d41c5d4730218c86346.sam@gentoo> (raw)
commit: 754c8b4df67d9e16962c4d41c5d4730218c86346
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 03:17:07 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 03:17:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=754c8b4d
media-libs/opusfile: EAPI 8, fix configure w/ clang 16
Closes: https://bugs.gentoo.org/879707
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/opusfile-0.12-configure-clang16.patch | 77 ++++++++++++++++++++++
media-libs/opusfile/opusfile-0.12-r1.ebuild | 54 +++++++++++++++
2 files changed, 131 insertions(+)
diff --git a/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch b/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch
new file mode 100644
index 000000000000..2319b06e652b
--- /dev/null
+++ b/media-libs/opusfile/files/opusfile-0.12-configure-clang16.patch
@@ -0,0 +1,77 @@
+https://gitlab.xiph.org/xiph/opusfile/-/merge_requests/42
+https://bugs.gentoo.org/879707
+
+From 9c7915c120c399a6a001c2a34e9040c9c5c9d340 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 22 Nov 2022 02:59:20 +0000
+Subject: [PATCH] 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]
+```
+
+Bug: https://bugs.gentoo.org/879701
+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
diff --git a/media-libs/opusfile/opusfile-0.12-r1.ebuild b/media-libs/opusfile/opusfile-0.12-r1.ebuild
new file mode 100644
index 000000000000..0aab5f8e89cc
--- /dev/null
+++ b/media-libs/opusfile/opusfile-0.12-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A high-level decoding and seeking API for .opus files"
+HOMEPAGE="https://www.opus-codec.org/"
+SRC_URI="https://downloads.xiph.org/releases/opus/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc fixed-point +float +http static-libs"
+
+RDEPEND="
+ media-libs/libogg
+ media-libs/opus
+ http? (
+ dev-libs/openssl:=
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+REQUIRED_USE="^^ ( fixed-point float )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.12-configure-clang16.patch
+)
+
+src_prepare() {
+ default
+
+ # Drop once configure patch merged
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable doc)
+ $(use_enable fixed-point)\
+ $(use_enable float)
+ $(use_enable http)
+ $(use_enable static-libs static)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ find "${ED}" -type f -name "*.la" -delete || die
+}
next reply other threads:[~2022-11-22 3:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 3:23 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-07 11:33 [gentoo-commits] repo/gentoo:master commit in: media-libs/opusfile/files/, media-libs/opusfile/ Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1669087044.754c8b4df67d9e16962c4d41c5d4730218c86346.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox