commit: 5be154aba71347ffb00820773828ff48925bda90 Author: Leonardo Hernández Hernández <leohdz172 <AT> proton <DOT> me> AuthorDate: Sat Jun 15 04:10:36 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jun 20 17:15:42 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5be154ab
media-sound/liblc3: add multilib It's going to be required by ffmpeg-9999 Signed-off-by: Leonardo Hernández Hernández <leohdz172 <AT> proton.me> Signed-off-by: Sam James <sam <AT> gentoo.org> media-sound/liblc3/liblc3-1.1.1-r1.ebuild | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) 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 +}