mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
Users nvidia-drivers-580.x and 595.x will need to either mask this version or stick to the stable one (there is no plan to stabilize this version while 580.x remains supported), given it requires 610.x. Note that I cannot test runtime for this one (no hardware that can use nvidia-drivers-610.x), and unsure if it works fine with all ffmpeg versions or only ffmpeg-9999 at the moment. nv*dec* seems to work even with nvidia-drivers-580.x (tested with mpv), but nvenc will print a API mismatch error. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
38 lines
1.5 KiB
Bash
38 lines
1.5 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
# only stabilize versions that work for all widely used nvidia-drivers branches
|
|
NV_MIN_VERSION=610 # 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
|
|
}
|