Diff opus-1.3.1-r4 with a opus-1.4

/usr/portage/media-libs/opus/opus-1.4.ebuild 2023-10-09 14:52:31.708368406 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 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 flag-o-matic multilib-minimal
6
PYTHON_COMPAT=( python3_{9..11} )
7
inherit flag-o-matic meson-multilib python-any-r1
7 8

  
8 9
DESCRIPTION="Open codec for interactive speech and music transmission over the Internet"
9 10
HOMEPAGE="https://opus-codec.org/"
10
SRC_URI="https://archive.mozilla.org/pub/opus/${P}.tar.gz"
11
SRC_URI="https://github.com/xiph/opus/releases/download/v${PV}/${P}.tar.gz"
11 12

  
12 13
LICENSE="BSD"
13 14
SLOT="0"
14
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv sparc x86"
15
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~sparc x86"
15 16
INTRINSIC_FLAGS="cpu_flags_x86_sse cpu_flags_arm_neon"
16
IUSE="custom-modes doc static-libs ${INTRINSIC_FLAGS}"
17
IUSE="custom-modes debug doc hardened static-libs test ${INTRINSIC_FLAGS}"
18
RESTRICT="!test? ( test )"
17 19

  
18 20
BDEPEND="
21
	${PYTHON_DEPS}
19 22
	doc? (
20 23
		app-doc/doxygen
21 24
		media-gfx/graphviz
......
24 27

  
25 28
PATCHES=(
26 29
	"${FILESDIR}"/${PN}-1.3.1-libdir-macro.patch
27
	"${FILESDIR}"/${PN}-1.3.1-macro-wstrict-prototypes.patch
30
	"${FILESDIR}"/${PN}-1.4-arm64-neon.patch
28 31
)
29 32

  
30 33
multilib_src_configure() {
31
	local myeconfargs=(
32
		$(use_enable custom-modes)
33
		$(multilib_native_use_enable doc)
34
		$(use_enable static-libs static)
34
	local emesonargs=(
35
		-Ddefault_library=$(multilib_native_usex static-libs both shared)
36

  
37
		$(meson_use custom-modes)
38
		$(meson_feature test tests)
39
		$(meson_use debug assertions)
40
		$(meson_use hardened hardening)
41

  
42
		$(meson_native_use_feature doc docs)
43

  
44
		-Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
35 45
	)
36 46

  
37 47
	local i
38 48
	# We want to disable intrinsics if no flags are enabled
39 49
	# (This is a fun Bash construct to do that!)
40 50
	# bug #752069
51
	# TODO: What is -Dasm for?
41 52
	for i in ${INTRINSIC_FLAGS} ; do
42
		use ${i} && myeconfargs+=( --enable-intrinsics ) && break
43
	done || myeconfargs+=( --disable-intrinsics )
53
		use ${i} && emesonargs+=( -Dintrinsics=enabled ) && break
54
	done || emesonargs+=( -Dintrinsics=disabled )
44 55

  
45
	if is-flagq -ffast-math || is-flagq -Ofast; then
46
		myeconfargs+=( --enable-float-approx )
56
	if is-flagq -ffast-math || is-flagq -Ofast ; then
57
		emesonargs+=( -Dfloat-approx=true )
47 58
	fi
48 59

  
49
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
50
}
51

  
52
multilib_src_install_all() {
53
	einstalldocs
54
	find "${ED}" -name "*.la" -delete || die
60
	meson_src_configure
55 61
}
Thank you!