gentoo-ebuilds/media-libs/nv-codec-headers/nv-codec-headers-13.0.19.0.ebuild
WANG Xuerui 4f7ae3ae45
media-libs/nv-codec-headers: keyword 13.0.19.0 for ~loong
Accidentally dropped by mis-rebasing of an outdated branch.

Fixes: 744eb96329
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
2025-06-17 11:28:28 +08:00

37 lines
1.5 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# ideally only stabilize versions that work for all non-masked nvidia-drivers
NV_MIN_VERSION=570 # see README
DESCRIPTION="FFmpeg version of headers required to interface with Nvidias codec APIs"
HOMEPAGE="https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git"
SRC_URI="https://github.com/FFmpeg/nv-codec-headers/releases/download/n${PV}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~loong"
src_install() {
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR=share install
einstalldocs
}
pkg_postinst() {
# prefer not to depend on nvidia-drivers given this package is depended
# on as header-only and drivers are optfeature'ish which can be better
# for e.g. binhosts to provide support (binding operators also not really
# suitable in DEPEND-only wrt rebuilds, rebuilds are not currently needed
# to work with *newer* drivers, and would be annoying for users switching
# driver versions only to troubleshoot non-nvenc issues)
if ! has_version ">=x11-drivers/nvidia-drivers-${NV_MIN_VERSION}"; then
ewarn
ewarn "Be warned that packages built using this version of ${PN}"
ewarn "will require x11-drivers/nvidia-drivers of version ${NV_MIN_VERSION} or"
ewarn "higher for NVDEC/NVENC to function properly. If switch to an older"
ewarn "${PN} version, remember to rebuild packages that are using"
ewarn "this such as ffmpeg or mpv."
fi
}