gentoo/media-video/v4l2loopback/v4l2loopback-0.15.3.ebuild
Paul Zander 18453307e6
media-video/v4l2loopback: add 0.15.3, update 9999
Includes some cosmetic changes.
Uses standard format for handling `-9999`.
Moved `DESCRIPTION` and `HOMEPAGE` where they usually are.
Moved `CONFIG_CHECK` as `local` var into `pkg_setup`.
Added some newlines to make command grouping clearer.

Closes: https://bugs.gentoo.org/967523
Closes: https://bugs.gentoo.org/966360
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45046
Closes: https://github.com/gentoo/gentoo/pull/45046
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-12-17 16:51:59 +02:00

63 lines
1.1 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit linux-mod-r1 toolchain-funcs
DESCRIPTION="v4l2 loopback device whose output is its own input"
HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
if [[ "${PV}" == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/umlaeute/v4l2loopback.git"
else
SRC_URI="https://github.com/umlaeute/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="examples"
pkg_setup() {
local CONFIG_CHECK="VIDEO_DEV"
linux-mod-r1_pkg_setup
export KERNELRELEASE="${KV_FULL}"
}
src_prepare() {
default
sed -i -e 's/gcc /$(CC) /' examples/Makefile || die
}
src_compile() {
local modlist=(
"v4l2loopback=video:::all"
)
linux-mod-r1_src_compile
if use examples; then
emake CC="$(tc-getCC)" -C examples
fi
}
src_install() {
linux-mod-r1_src_install
dosbin utils/v4l2loopback-ctl
dodoc doc/kernel_debugging.txt
dodoc doc/docs.txt
if use examples; then
dosbin examples/yuv4mpeg_to_v4l2
docinto examples
dodoc examples/{*.sh,*.c,Makefile}
fi
}