commit: 7b8e76cd8a538eb15beeb9fac58b204abffd2179 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Mon May 19 12:16:12 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jun 12 10:56:13 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b8e76cd
media-libs/svt-av1: update live Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42170 Signed-off-by: Sam James <sam <AT> gentoo.org> media-libs/svt-av1/svt-av1-9999.ebuild | 49 +++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/media-libs/svt-av1/svt-av1-9999.ebuild b/media-libs/svt-av1/svt-av1-9999.ebuild index 49270aedb7db..e45967114ee1 100644 --- a/media-libs/svt-av1/svt-av1-9999.ebuild +++ b/media-libs/svt-av1/svt-av1-9999.ebuild @@ -1,11 +1,11 @@ -# Copyright 2020-2024 Gentoo Authors +# Copyright 2020-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit cmake-multilib flag-o-matic +inherit cmake-multilib edo multiprocessing -DESCRIPTION="Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder)" +DESCRIPTION="Scalable Video Technology for AV1 (SVT-AV1 Encoder)" HOMEPAGE="https://gitlab.com/AOMediaCodec/SVT-AV1" if [[ ${PV} = 9999 ]]; then @@ -21,26 +21,51 @@ fi LICENSE="BSD-2 Apache-2.0 BSD ISC LGPL-2.1+ MIT" SLOT="0/$(ver_cut 1)" -BDEPEND="amd64? ( dev-lang/yasm )" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="amd64? ( dev-libs/cpuinfo )" +DEPEND="${RDEPEND}" +BDEPEND=" + amd64? ( dev-lang/yasm ) + test? ( dev-util/gtest-parallel ) +" PATCHES=( "${FILESDIR}"/${PN}-1.5.0-fortify-no-override.patch ) -multilib_src_configure() { - append-ldflags -Wl,-z,noexecstack +src_prepare() { + cmake_src_prepare + + # Lets not install tests + sed -e '/install(/d' -i test/CMakeLists.txt || die + + # Needs more setup to run in the ebuild + cmake_run_in test cmake_comment_add_subdirectory api_test + # Tries to download stuff for this test + cmake_run_in test cmake_comment_add_subdirectory e2e_test +} +multilib_src_configure() { local mycmakeargs=( - # Tests require linking against https://github.com/Cidana-Developers/aom/tree/av1-normative ? - # undefined reference to `ifd_inspect' - # https://github.com/Cidana-Developers/aom/commit/cfc5c9e95bcb48a5a41ca7908b44df34ea1313c0 - # .. and https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/.gitlab/workflows/linux/.gitlab-ci.yml implies it's all quite manual? - -DBUILD_TESTING=OFF + # Upstream only supports 64-bit and specially amd64 and arm64. + # Other enviroments will fail to build due to missing symbols. + -DBUILD_TESTING=$(multilib_native_usex test) -DCMAKE_OUTPUT_DIRECTORY="${BUILD_DIR}" - -DENABLE_AVX512=ON + -DUSE_CPUINFO=SYSTEM # will only be used on amd64 ) [[ ${ABI} != amd64 ]] && mycmakeargs+=( -DCOMPILE_C_ONLY=ON ) cmake_src_configure } + +multilib_src_test() { + if multilib_is_native_abi; then + # Upstream uses this, and this gives a significant time save in running these tests. + # 2025-05-19T19:39:25 >>> media-libs/svt-av1-3.0.2: 1:46:14 + # 2025-05-20T16:10:34 >>> media-libs/svt-av1-3.0.2: 20′35″ + edo gtest-parallel --workers "$(makeopts_jobs)" "${BUILD_DIR}"/SvtAv1UnitTests + fi +}