Diff liblc3-1.0.4 with a liblc3-1.1.3

/usr/portage/media-sound/liblc3/liblc3-1.1.3.ebuild 2025-07-29 16:22:14.904457701 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5 5

  
6
inherit meson
6
PYTHON_COMPAT=( python3_{10..13} )
7
inherit python-any-r1 toolchain-funcs meson-multilib
7 8

  
8 9
DESCRIPTION="LC3 is an efficient low latency audio codec"
9 10
HOMEPAGE="https://github.com/google/liblc3"
......
11 12

  
12 13
LICENSE="Apache-2.0"
13 14
SLOT="0"
14
IUSE="tools"
15
KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
15
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
16
IUSE="test tools"
17
RESTRICT="!test? ( test )"
16 18

  
17
src_configure() {
19
BDEPEND="
20
	test? (
21
		$(python_gen_any_dep '
22
			dev-python/numpy[${PYTHON_USEDEP}]
23
			dev-python/scipy[${PYTHON_USEDEP}]
24
		')
25
	)
26
"
27

  
28
PATCHES=(
29
	"${FILESDIR}"/${P}-typo-fix.patch
30
)
31

  
32
python_check_deps() {
33
	python_has_version "dev-python/numpy[${PYTHON_USEDEP}]" &&
34
	python_has_version "dev-python/scipy[${PYTHON_USEDEP}]"
35
}
36

  
37
pkg_setup() {
38
	use test && python-any-r1_pkg_setup
39
}
40

  
41
multilib_src_prepare() {
42
	if ! use arm ; then
43
		rm -r "test/arm" || die
44
	fi
45

  
46
	if ! use arm64 ; then
47
		rm -r "test/neon" || die
48
	fi
49

  
50
	default
51
}
52

  
53
multilib_src_configure() {
18 54
	local emesonargs=(
19
		# We let users choose to enable LTO
20
		-Db_lto=false
21
		$(meson_use tools)
55
		-Dpython=false
56
		$(meson_native_use_bool tools)
22 57
	)
23 58
	meson_src_configure
24 59
}
60

  
61
multilib_src_test() {
62
	if multilib_is_native_abi; then
63
		# Makefile misuses V=, so V=1 fails (e.g. "1cd ...")
64
		emake V= -C "${S}" test CC="$(tc-getCC)" \
65
			CFLAGS:="${CPPFLAGS} ${CFLAGS} -I"$("${EPYTHON}" -c "import numpy;print(numpy.get_include())")""
66
	else
67
		ewarn "Skipping test for non-native ABI: ${ABI}"
68
	fi
69
}
Thank you!