From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B22F9158099 for ; Wed, 22 Nov 2023 18:29:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 031552BC026; Wed, 22 Nov 2023 18:29:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D7F6D2BC022 for ; Wed, 22 Nov 2023 18:29:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E68FD335DB5 for ; Wed, 22 Nov 2023 18:29:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6080C13B3 for ; Wed, 22 Nov 2023 18:29:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1700677715.e1b8a96cfc24d46b49c58e3c9e2eb597fdf47574.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/liblc3/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/liblc3/liblc3-1.0.4-r1.ebuild X-VCS-Directories: media-sound/liblc3/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e1b8a96cfc24d46b49c58e3c9e2eb597fdf47574 X-VCS-Branch: master Date: Wed, 22 Nov 2023 18:29:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5bc5a3c1-d2d1-433e-a1e9-dc0600eaf996 X-Archives-Hash: 574b1a560d3571a465267c6a1ce3b1a0 commit: e1b8a96cfc24d46b49c58e3c9e2eb597fdf47574 Author: Matoro Mahri matoro tk> AuthorDate: Wed Nov 22 03:56:49 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Nov 22 18:28:35 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1b8a96c media-sound/liblc3: wire up tests The test/arm and test/neon suites actually run on non-ARM platforms, but the generic implementations are not endian-safe, and since they're supposed to test ARM assembly, there's not much point in running them on other platforms. Most of the tricks stolen from Debian: deps and rules. Tested on arm and arm64, as well as other 64-bit BE and LE platforms. Bug: https://bugs.gentoo.org/896130 Signed-off-by: Matoro Mahri matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/33934 Signed-off-by: Sam James gentoo.org> media-sound/liblc3/liblc3-1.0.4-r1.ebuild | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/media-sound/liblc3/liblc3-1.0.4-r1.ebuild b/media-sound/liblc3/liblc3-1.0.4-r1.ebuild new file mode 100644 index 000000000000..13bee49ab7af --- /dev/null +++ b/media-sound/liblc3/liblc3-1.0.4-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10,11,12} pypy3 ) +inherit meson python-any-r1 + +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" +IUSE="test tools" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +RESTRICT="!test? ( test )" + +DEPEND="test? ( + $(python_gen_any_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + ') +)" + +python_check_deps() { + python_has_version -d "dev-python/numpy[${PYTHON_USEDEP}]" && + python_has_version -d "dev-python/scipy[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + +src_prepare() { + use arm || rm -rf "test/arm" || die + use arm64 || rm -rf "test/neon" || die + default +} + +src_configure() { + local emesonargs=( + # We let users choose to enable LTO + -Db_lto=false + $(meson_use tools) + ) + meson_src_configure +} + +src_test() { + V= emake test CFLAGS:="${CPPFLAGS} ${CFLAGS} -I"$("${EPYTHON}" -c "import numpy;print(numpy.get_include())")"" +}