summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-06-14 22:10:36 -0600
committerSam James <sam@gentoo.org>2024-06-20 18:15:42 +0100
commit5be154aba71347ffb00820773828ff48925bda90 (patch)
tree96021c66d49d9caf17e35b2355028a966f39aee0 /media-sound/liblc3
parentdev-python/housekeeping: Enable py3.13 (diff)
downloadgentoo-5be154aba71347ffb00820773828ff48925bda90.tar.gz
gentoo-5be154aba71347ffb00820773828ff48925bda90.tar.bz2
gentoo-5be154aba71347ffb00820773828ff48925bda90.zip
media-sound/liblc3: add multilib
It's going to be required by ffmpeg-9999 Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-sound/liblc3')
-rw-r--r--media-sound/liblc3/liblc3-1.1.1-r1.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/media-sound/liblc3/liblc3-1.1.1-r1.ebuild b/media-sound/liblc3/liblc3-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..0a29e622ec90
--- /dev/null
+++ b/media-sound/liblc3/liblc3-1.1.1-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+inherit python-any-r1 meson-multilib
+
+DESCRIPTION="LC3 is an efficient low latency audio codec"
+HOMEPAGE="https://github.com/google/liblc3"
+SRC_URI="https://github.com/google/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ $(python_gen_any_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+python_check_deps() {
+ python_has_version "dev-python/numpy[${PYTHON_USEDEP}]" &&
+ python_has_version "dev-python/scipy[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+multilib_src_prepare() {
+ use arm || rm -rf "test/arm" || die
+ use arm64 || rm -rf "test/neon" || die
+ default
+}
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Dpython=false
+ $(meson_native_use_bool tools)
+ )
+ meson_src_configure
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ V= emake -C "${S}" test CFLAGS:="${CPPFLAGS} ${CFLAGS} -I"$("${EPYTHON}" -c "import numpy;print(numpy.get_include())")""
+ else
+ ewarn "Skipping test for non-native ABI: ${ABI}"
+ fi
+}