media-gfx/ipe: Move to EAPI=7
[shuber-gentoo-overlay.git] / media-video / v4l2loopback / v4l2loopback-0.12.3-r1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit linux-mod toolchain-funcs
7
8 case ${PV} in
9 9999)
10 inherit git-r3
11 KEYWORDS=""
12 EGIT_REPO_URI="git://github.com/umlaeute/v4l2loopback.git"
13 ;;
14 *)
15 inherit vcs-snapshot
16 KEYWORDS="~amd64 ~x86"
17 SNAPSHOT_COMMIT=""
18 SRC_URI="https://github.com/umlaeute/v4l2loopback/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19 ;;
20 esac
21
22 DESCRIPTION="v4l2 loopback device which output is it's own input"
23 HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
24
25 LICENSE="GPL-2"
26 SLOT="0"
27 IUSE="examples"
28
29 CONFIG_CHECK="VIDEO_DEV"
30 MODULE_NAMES="v4l2loopback(video:)"
31 BUILD_TARGETS="all"
32
33 pkg_setup() {
34 linux-mod_pkg_setup
35 export KERNELRELEASE=${KV_FULL}
36 }
37
38 src_prepare() {
39 default
40 epatch "${FILESDIR}/use-v4l2-buffer-ptr-instead-timeval.patch"
41 sed -i -e 's/gcc /$(CC) /' examples/Makefile || die
42 }
43
44 src_compile() {
45 linux-mod_src_compile
46 if use examples; then
47 emake CC=$(tc-getCC) -C examples
48 fi
49 }
50
51 src_install() {
52 linux-mod_src_install
53 dosbin utils/v4l2loopback-ctl
54 dodoc doc/kernel_debugging.txt
55 dodoc doc/docs.txt
56 if use examples; then
57 dosbin examples/yuv4mpeg_to_v4l2
58 docinto examples
59 dodoc examples/{*.sh,*.c,Makefile}
60 fi
61 }