You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.3 KiB
65 lines
1.3 KiB
3 years ago
|
# Copyright 1999-2022 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
|
inherit meson-multilib
|
||
|
|
||
2 years ago
|
DESCRIPTION="C libary for Netflix's Perceptual video quality assessment"
|
||
3 years ago
|
HOMEPAGE="https://github.com/Netflix/vmaf"
|
||
|
|
||
|
if [[ ${PV} == "9999" ]]; then
|
||
|
inherit git-r3
|
||
|
EGIT_REPO_URI="https://github.com/Netflix/vmaf.git"
|
||
|
else
|
||
|
SRC_URI="
|
||
|
https://github.com/Netflix/vmaf/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||
|
"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
fi
|
||
|
|
||
|
LICENSE="BSD-2-with-patent"
|
||
|
SLOT="0"
|
||
2 years ago
|
IUSE="+embed-models test"
|
||
|
|
||
|
RESTRICT="!test? ( test )"
|
||
3 years ago
|
|
||
|
BDEPEND="
|
||
|
dev-lang/nasm
|
||
2 years ago
|
embed-models? ( app-editors/vim-core )
|
||
3 years ago
|
"
|
||
|
|
||
|
RDEPEND="${BDEPEND}"
|
||
|
|
||
|
S="${WORKDIR}/vmaf-${PV}"
|
||
|
|
||
2 years ago
|
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
|
||
|
}
|
||
|
|
||
3 years ago
|
multilib_src_configure() {
|
||
2 years ago
|
local emesonargs=(
|
||
|
$(meson_use embed-models built_in_models)
|
||
|
$(meson_use test enable_tests)
|
||
|
)
|
||
|
|
||
3 years ago
|
EMESON_SOURCE="${S}/libvmaf"
|
||
|
meson_src_configure
|
||
|
}
|
||
|
|
||
3 years ago
|
multilib_src_install() {
|
||
|
meson_src_install
|
||
|
find "${D}" -name '*.la' -delete -o -name '*.a' -delete || die
|
||
|
}
|
||
|
|
||
3 years ago
|
multilib_src_install_all() {
|
||
|
einstalldocs
|
||
|
|
||
|
insinto "/usr/share/vmaf"
|
||
|
doins -r "${S}/model"
|
||
|
}
|