summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Polke <DuPol@gmx.de>2013-04-01 23:32:20 +0200
committerDustin Polke <DuPol@gmx.de>2013-04-01 23:32:20 +0200
commit54320a3cc8e3fb91299538dc8e74965924e0bf40 (patch)
tree051fced11880c43ac3eadbcca99154f0509d0665 /media-video
parent[media-video/webcamstudio-module] Add patch for kernels >3.6. (diff)
downloadDuPol-54320a3cc8e3fb91299538dc8e74965924e0bf40.tar.gz
DuPol-54320a3cc8e3fb91299538dc8e74965924e0bf40.tar.bz2
DuPol-54320a3cc8e3fb91299538dc8e74965924e0bf40.zip
[media-video/webcamstudio-module] Use newer kernel module based on v4l2loopback; drop old.
Diffstat (limited to 'media-video')
-rw-r--r--media-video/webcamstudio-module/ChangeLog8
-rw-r--r--media-video/webcamstudio-module/Manifest8
-rw-r--r--media-video/webcamstudio-module/files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch12
-rw-r--r--media-video/webcamstudio-module/files/webcamstudio-module-0.6.3-webcamstudio.patch223
-rw-r--r--media-video/webcamstudio-module/webcamstudio-module-0.57_beta4.ebuild71
-rw-r--r--media-video/webcamstudio-module/webcamstudio-module-0.6.3.ebuild53
6 files changed, 288 insertions, 87 deletions
diff --git a/media-video/webcamstudio-module/ChangeLog b/media-video/webcamstudio-module/ChangeLog
index 64b5ce8..3ea299b 100644
--- a/media-video/webcamstudio-module/ChangeLog
+++ b/media-video/webcamstudio-module/ChangeLog
@@ -2,6 +2,14 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*webcamstudio-module-0.6.3 (01 Apr 2013)
+
+ 01 Apr 2013; Dustin Polke <DuPol@gmx.de> +webcamstudio-module-0.6.3.ebuild,
+ +files/webcamstudio-module-0.6.3-webcamstudio.patch,
+ -webcamstudio-module-0.57_beta4.ebuild,
+ -files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch:
+ Use newer kernel module based on v4l2loopback-0.6.3.
+
27 Mar 2013; Dustin Polke <DuPol@gmx.de>
webcamstudio-module-0.57_beta4.ebuild,
+files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch:
diff --git a/media-video/webcamstudio-module/Manifest b/media-video/webcamstudio-module/Manifest
index 9087ae7..0874458 100644
--- a/media-video/webcamstudio-module/Manifest
+++ b/media-video/webcamstudio-module/Manifest
@@ -1,5 +1,5 @@
-AUX webcamstudio-module-0.57_beta4-v4l2_buffer.patch 586 SHA256 1d2a88a86ca4f95c19724b281946a7d8208c2ea9a8b0ede93e9ee2a582b4cb05 SHA512 4892cdcadbb27188dabf647afb4a2ba08e72526fc6c64ba3e6b32675aeab2b703f72a5fbd1467830d51d5aa2d85a2685869c4e30000f61e1c204574c17944657 WHIRLPOOL c7c8d79e5581fd8bc020c1851e7d32013645fa9f35b9725b7730a8e98beb4473d53774a079684ab8d38835a6712532be5e17bde6e76a6aca65665a881837861d
-DIST webcamstudio_0.57beta4_all.deb 15264140 SHA256 4b9399269e73402a166762f995d1bd5e3247c6fe8b72ee2bbcbebd9dd3366efd SHA512 1bca5a093c6e7e0dcace96c7696a4fa1596f0f72334e091401cfd5280c6c220ab7c1e60b3d4cbe461bcc7610b68f6a1c5589425ad5615bd6a9f9130ace09ec06 WHIRLPOOL ff3491c4642ea2127392190c93161627c1e55b66796ba41359915d898bbcf6c702800d951404408ec0bd6af4c47e882d4134c76d3f3d90bc129b308ee31bb88b
-EBUILD webcamstudio-module-0.57_beta4.ebuild 1762 SHA256 a294746f37d310b5946cfddd9f163f5822a63ac2754f708c1c568f639e658b82 SHA512 ed0b6ce6bdd1668f946018f38393dfaeaa92a975ae66b2442659f7cbb7b89df085e249a6880fd3fd0442a110eb6e0b3dc2f42cd6b70263f948bc3581149f9763 WHIRLPOOL afd33552ec40505171a0ea1608944d9de2e67330b26215dd9811dbd8bce555e39c65e657f32792e03d4f57d71b9284250428585023aa177243d88d0049bf32ab
-MISC ChangeLog 642 SHA256 3a71a5c62a3c48cecb2e5a97b0838aaa2543a869f8c8e8f4b3d7207339d61c15 SHA512 93760cc63c09a844725f4fd4741d6d2800e6b6cc9c9563c1240833beb4244c57c10c8e565e74c79958ac78bc2ef64a499e90e50908d80fb4eec01a9a6b55ad12 WHIRLPOOL 0ad899344c1040d1b924b68e40033a617ae1bd1f5b8e799d97344c20481955533589d003c3d03538f4ae9d7e78e355f03dc61c67d7da2db911bbdebbe9ff551b
+AUX webcamstudio-module-0.6.3-webcamstudio.patch 8955 SHA256 ab4067f7ce8f4f8624bbbd0347bddbd8e95221e3c6c02baceaf3c7655690bfea SHA512 703e820a6c5e15b46f91f343f95a191b4ddd3019eb3e1c2c49aca5e9d15d33b467d70bda26e5c6301a28079336810d7f0e1271abc60323a14497a7baac28e5da WHIRLPOOL 9f065603e9afd134c2cb5ba4d34b58648bdb6d3724876628ef54114c7fd8cbcb1e26dc5610fa5cc79fc3f5d11e26e56fefedd5d09a971820059c0325fa86f8ba
+DIST webcamstudio-module-0.6.3.tar.gz 208243 SHA256 92e63637a4722bb75c666ffb295b53becb304ccf3818d995a93c9db44395ac43 SHA512 a633b49e7f16a167f36821e083155fe91c1924bbd1b9ded73e895d4ce43c2e175cbd4e0646129b73c27fede8a1ae4451c62e3b182b936c8d60b36b146a57487e WHIRLPOOL e70b0508e75f6367a799cc1d874e8864d4db8fa85666fc040977e60023632696860673d0d02c0fe7e211e1d05a8a9405915db6fa7015c380b0516e666a0212fc
+EBUILD webcamstudio-module-0.6.3.ebuild 1065 SHA256 b685f4622b0c402e07b5c7179ec877b86bef1524eab4361218342b555dc8c02e SHA512 3107d8196316585356c8baabc79caeca25a96327d2bdca01756cf4f543ff7fec92636525be3132c1e8aec703ea87d443c82f8512c2377fd54586cc350bd0432f WHIRLPOOL 5b19fcb74769280eb6d9943618944c464a19bf51074ba9d7c54a307c0aaaa9bb8b59c9eb1f47b561ebf11ca86fc34c75d01cb5628ea45d954bb65313bcc5957d
+MISC ChangeLog 974 SHA256 b933349b273bb699481654a6176fd588b718176872cb70bcd511af6bd93be9af SHA512 46674fdfe99e501a14058b410cf788320b8adeea5a201124b0a1e14099bff0c0da67d3cdefcd887285beefdeaff28cd68b898b85dd7feb99f646c34995215d79 WHIRLPOOL 620f0683ab20ab602a6a94bb284374f5b39aa15d8f55d2f110711fc111dbc3cd0698fa7cd999d87fda28c6a076bb9ef48785f5e4d94d74b026f4672b88d67d94
MISC metadata.xml 202 SHA256 898b32b6414d22f4ea6738700b5787496b6e6ba12abe71cc823e8815e58a563f SHA512 6c849882d504372e8d4a9a958d03b1a93f5f886c8b45f3e2b7688c2fe1e8ec76f3d26a73cb4b8a57aa120ee2e5d3b0185a59d01bf16eed60f30bd2d4603f50ee WHIRLPOOL 2b59a7764d05e8fbe255cd1e290f2e46d96898f397c1c8832b4efa41141dff9be823cec86253fc0f16d8c710fd5f8b880cfbc71c27abaec4265dfc51d64a67fd
diff --git a/media-video/webcamstudio-module/files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch b/media-video/webcamstudio-module/files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch
deleted file mode 100644
index f90c8a4..0000000
--- a/media-video/webcamstudio-module/files/webcamstudio-module-0.57_beta4-v4l2_buffer.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- usr/share/webcamstudio/webcamstudio-src/webcamstudio.c.orig 2013-03-27 23:14:50.507509483 +0100
-+++ usr/share/webcamstudio/webcamstudio-src/webcamstudio.c 2013-03-27 23:16:14.127464090 +0100
-@@ -1435,7 +1435,9 @@ init_buffers (struct webcamstudio
- b->length = buffer_size;
- b->field = V4L2_FIELD_NONE;
- b->flags = 0;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 1)
- b->input = 0;
-+#endif
- b->m.offset = i * buffer_size;
- b->memory = V4L2_MEMORY_MMAP;
- b->sequence = 0;
diff --git a/media-video/webcamstudio-module/files/webcamstudio-module-0.6.3-webcamstudio.patch b/media-video/webcamstudio-module/files/webcamstudio-module-0.6.3-webcamstudio.patch
new file mode 100644
index 0000000..df03c31
--- /dev/null
+++ b/media-video/webcamstudio-module/files/webcamstudio-module-0.6.3-webcamstudio.patch
@@ -0,0 +1,223 @@
+--- v4l2loopback.c.orig 2013-04-01 21:38:26.998046315 +0200
++++ v4l2loopback.c 2013-04-01 22:07:51.838982767 +0200
+@@ -38,11 +38,11 @@ void * v4l2l_vzalloc ( unsigned long siz
+ #include <linux/sched.h>
+ #include <linux/slab.h>
+
+-#define V4L2LOOPBACK_VERSION_CODE KERNEL_VERSION(0,6,3)
++#define V4L2LOOPBACK_VERSION_CODE KERNEL_VERSION(1,0,3)
+
+
+-MODULE_DESCRIPTION("V4L2 loopback video device");
+-MODULE_AUTHOR("Vasily Levin, IOhannes m zmoelnig <zmoelnig@iem.at>, Stefan Diewald, Anton Novikov");
++MODULE_DESCRIPTION("Webcamstudio video device");
++MODULE_AUTHOR("Vasily Levin, IOhannes m zmoelnig <zmoelnig@iem.at>, Stefan Diewald, Anton Novikov, Modified by Dustin Polke <DuPol@gmx.de>");
+ MODULE_LICENSE("GPL");
+
+
+@@ -52,7 +52,7 @@ MODULE_LICENSE("GPL");
+
+ #define dprintk(fmt, args...) \
+ do { if (debug > 0) { \
+- printk(KERN_INFO "v4l2-loopback[" STRINGIFY2(__LINE__) "]: " fmt, ##args); \
++ printk(KERN_INFO "webcamstudio[" STRINGIFY2(__LINE__) "]: " fmt, ##args); \
+ } } while(0)
+
+ #define MARK() \
+@@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");
+
+ #define dprintkrw(fmt, args...) \
+ do { if (debug > 2) { \
+- printk(KERN_INFO "v4l2-loopback[" STRINGIFY2(__LINE__)"]: " fmt, ##args); \
++ printk(KERN_INFO "webcamstudio[" STRINGIFY2(__LINE__)"]: " fmt, ##args); \
+ } } while (0)
+
+
+@@ -261,20 +261,16 @@ static const struct v4l2l_format formats
+ .depth = 16,
+ .flags = 0,
+ },{
+-#ifdef V4L2_PIX_FMT_YVYU
+ .name = "4:2:2, packed YVYU",
+ .fourcc = V4L2_PIX_FMT_YVYU,
+ .depth = 16,
+ .flags=0,
+ },{
+-#endif
+-#ifdef V4L2_PIX_FMT_VYUY
+ .name = "4:2:2, packed VYUY",
+ .fourcc = V4L2_PIX_FMT_VYUY,
+ .depth = 16,
+ .flags=0,
+ },{
+-#endif
+ .name = "4:2:2, packed YYUV",
+ .fourcc = V4L2_PIX_FMT_YYUV,
+ .depth = 16,
+@@ -512,7 +508,7 @@ v4l2loopback_cd2dev (struct device*cd)
+ struct video_device *loopdev = to_video_device(cd);
+ priv_ptr ptr = (priv_ptr)video_get_drvdata(loopdev);
+ int nr = ptr->devicenr;
+- if(nr<0 || nr>=devices){printk(KERN_ERR "v4l2-loopback: illegal device %d\n",nr);return NULL;}
++ if(nr<0 || nr>=devices){printk(KERN_ERR "webcamstudio: illegal device %d\n",nr);return NULL;}
+ return devs[nr];
+ }
+
+@@ -522,7 +518,7 @@ v4l2loopback_getdevice (struct fi
+ struct video_device *loopdev = video_devdata(f);
+ priv_ptr ptr = (priv_ptr)video_get_drvdata(loopdev);
+ int nr = ptr->devicenr;
+- if(nr<0 || nr>=devices){printk(KERN_ERR "v4l2-loopback: illegal device %d\n",nr);return NULL;}
++ if(nr<0 || nr>=devices){printk(KERN_ERR "webcamstudio: illegal device %d\n",nr);return NULL;}
+ return devs[nr];
+ }
+
+@@ -570,10 +566,10 @@ vidioc_querycap (struct file *file,
+ struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
+ int devnr = ((priv_ptr)video_get_drvdata(dev->vdev))->devicenr;
+
+- strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
+- strlcpy(cap->card, "Dummy video device", sizeof(cap->card));
+- snprintf(cap->card, sizeof(cap->card), "Dummy video device (0x%04X)",devnr);
+- snprintf(cap->bus_info, sizeof(cap->bus_info), "v4l2loopback:%d", devnr);
++ strlcpy(cap->driver, "WebcamStudio", sizeof(cap->driver));
++ strlcpy(cap->card, "WebcamStudio video device", sizeof(cap->card));
++ snprintf(cap->card, sizeof(cap->card), "WebcamStudio video device (0x%04X)",devnr);
++ snprintf(cap->bus_info, sizeof(cap->bus_info), "WebcamStudio:%d", devnr);
+
+ cap->version = V4L2LOOPBACK_VERSION_CODE;
+ cap->capabilities =
+@@ -1233,7 +1229,7 @@ vidioc_enum_output (struct file *file,
+ memset(outp, 0, sizeof(*outp));
+
+ outp->index = index;
+- strlcpy(outp->name, "loopback in", sizeof(outp->name));
++ strlcpy(outp->name, "webcamstudio in", sizeof(outp->name));
+ outp->type = V4L2_OUTPUT_TYPE_ANALOG;
+ outp->audioset = 0;
+ outp->modulator = 0;
+@@ -1302,7 +1298,7 @@ vidioc_enum_input (struct file *file,
+ memset(inp, 0, sizeof(*inp));
+
+ inp->index = index;
+- strlcpy(inp->name, "loopback", sizeof(inp->name));
++ strlcpy(inp->name, "webcamstudio", sizeof(inp->name));
+ inp->type = V4L2_INPUT_TYPE_CAMERA;
+ inp->audioset = 0;
+ inp->tuner = 0;
+@@ -1914,7 +1910,7 @@ v4l2_loopback_read (struct file *file,
+ count = dev->buffer_size;
+ if (copy_to_user((void *) buf, (void *) (dev->image +
+ dev->buffers[read_index].buffer.m.offset), count)) {
+- printk(KERN_ERR "v4l2-loopback: "
++ printk(KERN_ERR "webcamstudio: "
+ "failed copy_from_user() in write buf\n");
+ return -EFAULT;
+ }
+@@ -1952,7 +1948,7 @@ v4l2_loopback_write (struct file *file,
+ if (copy_from_user(
+ (void *) (dev->image + b->m.offset),
+ (void *) buf, count)) {
+- printk(KERN_ERR "v4l2-loopback: "
++ printk(KERN_ERR "webcamstudio: "
+ "failed copy_from_user() in write buf, could not write %zu\n",
+ count);
+ return -EFAULT;
+@@ -2091,7 +2087,7 @@ init_vdev (struct video_device
+ int nr)
+ {
+ MARK();
+- snprintf(vdev->name, sizeof(vdev->name), "Loopback video device %X", nr);
++ snprintf(vdev->name, sizeof(vdev->name), "WebcamStudio device %X", nr);
+ vdev->tvnorms = V4L2_STD_ALL;
+ vdev->current_norm = V4L2_STD_ALL;
+ vdev->vfl_type = VFL_TYPE_GRABBER;
+@@ -2339,31 +2335,31 @@ init_module (void)
+
+ if (devices > MAX_DEVICES) {
+ devices = MAX_DEVICES;
+- printk(KERN_INFO "v4l2loopback: number of devices is limited to: %d\n", MAX_DEVICES);
++ printk(KERN_INFO "webcamstudio: number of devices is limited to: %d\n", MAX_DEVICES);
+ }
+
+ if (max_buffers > MAX_BUFFERS) {
+ max_buffers=MAX_BUFFERS;
+- printk(KERN_INFO "v4l2loopback: number of buffers is limited to: %d\n", MAX_BUFFERS);
++ printk(KERN_INFO "webcamstudio: number of buffers is limited to: %d\n", MAX_BUFFERS);
+ }
+
+ if (max_openers < 0) {
+- printk(KERN_INFO "v4l2loopback: allowing %d openers rather than %d\n", 2, max_openers);
++ printk(KERN_INFO "webcamstudio: allowing %d openers rather than %d\n", 2, max_openers);
+ max_openers=2;
+ }
+
+ if (max_width < 1) {
+ max_width = V4L2LOOPBACK_SIZE_MAX_WIDTH;
+- printk(KERN_INFO "v4l2loopback: using max_width %d\n", max_width);
++ printk(KERN_INFO "webcamstudio: using max_width %d\n", max_width);
+ }
+ if (max_height < 1) {
+ max_height = V4L2LOOPBACK_SIZE_MAX_HEIGHT;
+- printk(KERN_INFO "v4l2loopback: using max_height %d\n", max_height);
++ printk(KERN_INFO "webcamstudio: using max_height %d\n", max_height);
+ }
+
+ /* kfree on module release */
+ for(i=0; i<devices; i++) {
+- dprintk("creating v4l2loopback-device #%d\n", i);
++ dprintk("creating webcamstudio device #%d\n", i);
+ devs[i] = kzalloc(sizeof(*devs[i]), GFP_KERNEL);
+ if (devs[i] == NULL) {
+ free_devices();
+@@ -2377,7 +2373,7 @@ init_module (void)
+ /* register the device -> it creates /dev/video* */
+ if (video_register_device(devs[i]->vdev, VFL_TYPE_GRABBER, video_nr[i]) < 0) {
+ video_device_release(devs[i]->vdev);
+- printk(KERN_ERR "v4l2loopback: failed video_register_device()\n");
++ printk(KERN_ERR "webcamstudio: failed video_register_device()\n");
+ free_devices();
+ return -EFAULT;
+ }
+@@ -2387,7 +2383,7 @@ init_module (void)
+
+ dprintk("module installed\n");
+
+- printk(KERN_INFO "v4l2loopback driver version %d.%d.%d loaded\n",
++ printk(KERN_INFO "webcamstudio driver version %d.%d.%d loaded\n",
+ (V4L2LOOPBACK_VERSION_CODE >> 16) & 0xff,
+ (V4L2LOOPBACK_VERSION_CODE >> 8) & 0xff,
+ (V4L2LOOPBACK_VERSION_CODE ) & 0xff);
+--- Makefile.orig 2013-04-01 23:16:54.298307712 +0200
++++ Makefile 2013-04-01 23:18:35.439043279 +0200
+@@ -1,7 +1,7 @@
+ KERNEL_VERSION := `uname -r`
+ KERNEL_DIR := /lib/modules/$(KERNEL_VERSION)/build
+ PWD := $(shell pwd)
+-obj-m := v4l2loopback.o
++obj-m := webcamstudio.o
+
+ PREFIX = /usr/local
+ BINDIR = $(PREFIX)/bin
+@@ -30,15 +30,15 @@ MODULE_OPTIONS = devices=2
+
+ .PHONY: all install clean distclean
+ .PHONY: install-all install-utils install-man
+-.PHONY: modprobe v4l2loopback
++.PHONY: modprobe webcamstudio
+
+ # we don't control the .ko file dependencies, as it is done by kernel
+-# makefiles. therefore v4l2loopback.ko is a phony target actually
+-.PHONY: v4l2loopback.ko
++# makefiles. therefore webcamstudio.ko is a phony target actually
++.PHONY: webcamstudio.ko
+
+-all: v4l2loopback.ko
+-v4l2loopback: v4l2loopback.ko
+-v4l2loopback.ko:
++all: webcamstudio.ko
++webcamstudio: webcamstudio.ko
++webcamstudio.ko:
+ @echo "Building v4l2-loopback driver..."
+ $(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules
+ install-all: install install-utils install-man
diff --git a/media-video/webcamstudio-module/webcamstudio-module-0.57_beta4.ebuild b/media-video/webcamstudio-module/webcamstudio-module-0.57_beta4.ebuild
deleted file mode 100644
index 4da0280..0000000
--- a/media-video/webcamstudio-module/webcamstudio-module-0.57_beta4.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="4"
-
-inherit versionator unpacker linux-mod toolchain-funcs
-
-MY_PN="webcamstudio"
-MY_P="${MY_PN}_$(delete_version_separator 2)"
-
-DESCRIPTION="Kernel module to create webcamstudio's virtual webcam loopback device"
-HOMEPAGE="http://www.ws4gl.org/"
-SRC_URI="http://webcamstudio.googlecode.com/files/${MY_P}_all.deb"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="modules"
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-S="${WORKDIR}/usr/share/${MY_PN}/${MY_PN}-src"
-
-pkg_setup() {
- linux-mod_pkg_setup
- MODULE_NAMES="webcamstudio(misc:)"
- BUILD_TARGETS="webcamstudio"
-}
-
-src_prepare() {
- if use modules; then
- epatch "${FILESDIR}/${P}-v4l2_buffer.patch"
- sed -e "s:\$(KERNEL_DIR):${KV_DIR}:" \
- -i Makefile || die
- set_arch_to_kernel
- fi
-}
-
-src_compile() {
- if use modules; then
- einfo "Compile kernel module"
- linux-mod_src_compile
- fi
-
- einfo "Compile shared library"
- echo "$(tc-getCC) -c -fPIC ${CFLAGS} -o libwebcamstudio.o libwebcamstudio.c"
- $(tc-getCC) -c -fPIC ${CFLAGS} -o libwebcamstudio.o libwebcamstudio.c || die
- echo "$(tc-getCC) -shared -Wl,-soname,libwebcamstudio.so.1 ${LDFLAGS} \
- -o libwebcamstudio.so.1.0.1 libwebcamstudio.o"
- $(tc-getCC) -shared -Wl,-soname,libwebcamstudio.so.1 ${LDFLAGS} \
- -o libwebcamstudio.so.1.0.1 libwebcamstudio.o || die
-}
-
-src_install() {
- use modules && linux-mod_src_install
-
- insinto /usr/$(get_libdir)
- doins libwebcamstudio.so.1.0.1
- dosym libwebcamstudio.so.1.0.1 usr/$(get_libdir)/libwebcamstudio.so
- dosym libwebcamstudio.so.1.0.1 usr/$(get_libdir)/libwebcamstudio.so.1
-}
-
-pkg_postinst() {
- use modules && linux-mod_pkg_postinst
-}
-
-pkg_postrm() {
- use modules && linux-mod_pkg_postrm
-}
diff --git a/media-video/webcamstudio-module/webcamstudio-module-0.6.3.ebuild b/media-video/webcamstudio-module/webcamstudio-module-0.6.3.ebuild
new file mode 100644
index 0000000..be93159
--- /dev/null
+++ b/media-video/webcamstudio-module/webcamstudio-module-0.6.3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+inherit linux-mod
+
+DESCRIPTION="Kernel module to create webcamstudio's virtual webcam loopback device"
+HOMEPAGE="https://github.com/umlaeute/v4l2loopback"
+SRC_URI="https://github.com/umlaeute/v4l2loopback/tarball/v${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="modules"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/umlaeute-v4l2loopback-a3eaac9
+
+pkg_setup() {
+ linux-mod_pkg_setup
+ CONFIG_CHECK="VIDEO_DEV"
+ MODULE_NAMES="webcamstudio(video:)"
+ BUILD_TARGETS="all"
+}
+
+src_prepare() {
+ if use modules; then
+ epatch "${FILESDIR}/${P}-webcamstudio.patch"
+ sed -e "s:\$(KERNEL_DIR):${KV_DIR}:" \
+ -i Makefile || die
+ set_arch_to_kernel
+ fi
+}
+
+src_compile() {
+ if use modules; then
+ einfo "Compile kernel module"
+ mv v4l2loopback.c webcamstudio.c || die
+ linux-mod_src_compile
+ fi
+}
+
+src_install() {
+ use modules && linux-mod_src_install
+}
+
+pkg_postinst() {
+ use modules && linux-mod_pkg_postinst
+}