diff options
author | Adel KARA SLIMANE <adel.ks@zegrapher.com> | 2022-04-11 00:37:13 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-04-18 09:43:02 +0300 |
commit | 888a5176d519cbe68d1647f5af9c9180f17f2683 (patch) | |
tree | c52add37f99c89839c118d6942b74d16ce21ac52 /media-libs | |
parent | x11-plugins/gkrellm-leds: rename src_{configure,install} (diff) | |
download | gentoo-888a5176d519cbe68d1647f5af9c9180f17f2683.tar.gz gentoo-888a5176d519cbe68d1647f5af9c9180f17f2683.tar.bz2 gentoo-888a5176d519cbe68d1647f5af9c9180f17f2683.zip |
media-libs/libvmaf: fix tests and add embed-models useflag
Closes: https://bugs.gentoo.org/837221
Closes: https://bugs.gentoo.org/837488
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Closes: https://github.com/gentoo/gentoo/pull/24982
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libvmaf/libvmaf-2.3.0-r2.ebuild (renamed from media-libs/libvmaf/libvmaf-2.3.0-r1.ebuild) | 21 | ||||
-rw-r--r-- | media-libs/libvmaf/metadata.xml | 3 |
2 files changed, 20 insertions, 4 deletions
diff --git a/media-libs/libvmaf/libvmaf-2.3.0-r1.ebuild b/media-libs/libvmaf/libvmaf-2.3.0-r2.ebuild index d83062357877..9276f49b516c 100644 --- a/media-libs/libvmaf/libvmaf-2.3.0-r1.ebuild +++ b/media-libs/libvmaf/libvmaf-2.3.0-r2.ebuild @@ -20,20 +20,33 @@ fi LICENSE="BSD-2-with-patent" SLOT="0" +IUSE="+embed-models test" + +RESTRICT="!test? ( test )" BDEPEND=" dev-lang/nasm - app-editors/vim-core + embed-models? ( app-editors/vim-core ) " -# The app-editors/vim-core dep is needed to embed models within the library -# could be made into a useflag if someones express the need for it -# see https://github.com/Netflix/vmaf/blob/master/libvmaf/meson_options.txt#L21 RDEPEND="${BDEPEND}" S="${WORKDIR}/vmaf-${PV}" +src_prepare() { + default + + # Workaround for https://bugs.gentoo.org/837221 + # The paths in the tests are hard coded to look for the model folder as "../../model" + sed -i "s|\"../../model|\"../vmaf-${PV}/model|g" ${S}/libvmaf/test/* || die +} + multilib_src_configure() { + local emesonargs=( + $(meson_use embed-models built_in_models) + $(meson_use test enable_tests) + ) + EMESON_SOURCE="${S}/libvmaf" meson_src_configure } diff --git a/media-libs/libvmaf/metadata.xml b/media-libs/libvmaf/metadata.xml index 765ae6466607..01039a20cb19 100644 --- a/media-libs/libvmaf/metadata.xml +++ b/media-libs/libvmaf/metadata.xml @@ -16,4 +16,7 @@ <remote-id type="github">Netflix/vmaf</remote-id> <bugs-to>https://github.com/Netflix/vmaf/issues</bugs-to> </upstream> + <use> + <flag name="embed-models">Compile default vmaf models into the library (needs <pkg>app-editors/vim-core</pkg>)</flag> + </use> </pkgmetadata> |