summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-tv/em28xx-new/ChangeLog8
-rw-r--r--media-tv/em28xx-new/Manifest7
-rw-r--r--media-tv/em28xx-new/em28xx-new-0.0.20090409.ebuild (renamed from media-tv/em28xx-new/em28xx-new-0.0.20090403.36638895894479.ebuild)20
-rw-r--r--media-tv/em28xx-new/files/em28xx-new-2.6.30.patch169
-rw-r--r--media-tv/em28xx-new/files/em28xx-video.c-2.6.29.patch85
5 files changed, 281 insertions, 8 deletions
diff --git a/media-tv/em28xx-new/ChangeLog b/media-tv/em28xx-new/ChangeLog
index 1503c0fa4..051c0a801 100644
--- a/media-tv/em28xx-new/ChangeLog
+++ b/media-tv/em28xx-new/ChangeLog
@@ -2,6 +2,14 @@
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 23 Jun 2009; Chi-Thanh Christopher Nguyen (chithead)
+ <chithanh@cs.tu-berlin.de> -em28xx-new-0.0.20090403.36638895894479.ebuild,
+ +em28xx-new-0.0.20090409.ebuild, +files/em28xx-video.c-2.6.29.patch,
+ +files/em28xx-new-2.6.30.patch:
+ updated ebuild thanks to Roman v. Gemmeren (strowi), necessary due to the
+ demise of upstream's mercurial repository, fixes for building against kernel
+ >=2.6.29
+
04 Apr 2009; Chi-Thanh Christopher Nguyen (chithead)
<chithanh@cs.tu-berlin.de> -em28xx-new-0.0.20090319.23522847372761.ebuild,
+em28xx-new-0.0.20090403.36638895894479.ebuild, em28xx-new-9999.ebuild:
diff --git a/media-tv/em28xx-new/Manifest b/media-tv/em28xx-new/Manifest
index 55801a800..53f8914a3 100644
--- a/media-tv/em28xx-new/Manifest
+++ b/media-tv/em28xx-new/Manifest
@@ -1,4 +1,7 @@
-EBUILD em28xx-new-0.0.20090403.36638895894479.ebuild 1254 RMD160 b4a5069c3fb36f929d91ec7a34b344cdb195a42b SHA1 afcca3399b7ac29c42b35641fb952d9c05a95fed SHA256 d121741ab9ba8756d55023d55c60018a5a80df76fe387c7e29081b4444619b4c
+AUX em28xx-new-2.6.30.patch 6230 RMD160 c38e32888174b0a7dbd23dceea0df81716b8a457 SHA1 0142a579ea1033aefb4460a1b64bc5a7f53d3241 SHA256 710fa78fa95e648ab76efc8c30979b97fed7cdd175c3db4584b40d352b578ab1
+AUX em28xx-video.c-2.6.29.patch 2920 RMD160 9d4254d839e6f15ca21d509d0eb126177e3436ac SHA1 f885a31e79ba53df1d782cb79658da53716b2505 SHA256 773aa03fef8aab92935a3bed6777debe6a282a68689a855748d3469643e62df4
+DIST em28xx-new-20090409.tar.bz2 218765 RMD160 e38ecb7a2cfecc389f2e9c790718355d9c948ec6 SHA1 597b54ee840ccb13da89aaa1dbbb4b6dc74ca4eb SHA256 e2d78d5de3e0ca7e597052510b3dfc5f280132d7a43eaa09943348c2078e6d0f
+EBUILD em28xx-new-0.0.20090409.ebuild 1346 RMD160 5bc1464813bb8db709d91664b3c46ac80f152844 SHA1 10b0202bad066aaca5d8ed788fc257ef5f4251f5 SHA256 6ed5175d800818b45df5bb68da72fde8bf64fdd8c080bb0c978ae2214b5417fc
EBUILD em28xx-new-9999.ebuild 1165 RMD160 146e3361e33366f95566b92cc0840e5b1c441d5f SHA1 5a8ba4b72a6457e1763f50c30db009c0976af4db SHA256 ca0036bf90b8255634597999ffaf57ccb229651e2bc8e0547e3273ba2fd00397
-MISC ChangeLog 6080 RMD160 e176f1fd3c687dcb5cdabf3e3ae24ce9033a7b78 SHA1 b8adb6d744ec3992fc0ca955a00c0ae5d1e1d9c4 SHA256 407ce717fefddcbe027fb1ee4a58531dfbff40b1fc830e1a446c353640241824
+MISC ChangeLog 6484 RMD160 3fc46507a5b561a510d3e2ceaad233aef8318d5a SHA1 c10e86ea39c8f0ab66409d6c08e4cae9e0bcd1bc SHA256 b1c06b38a29d164aa16afbde5a47647ee3f9b3d01d772ec9ff7fe30c3b50929c
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/media-tv/em28xx-new/em28xx-new-0.0.20090403.36638895894479.ebuild b/media-tv/em28xx-new/em28xx-new-0.0.20090409.ebuild
index 36f7c6e32..ea81a4215 100644
--- a/media-tv/em28xx-new/em28xx-new-0.0.20090403.36638895894479.ebuild
+++ b/media-tv/em28xx-new/em28xx-new-0.0.20090409.ebuild
@@ -2,15 +2,13 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-inherit linux-info linux-mod mercurial versionator
+EAPI="2"
-printf -v EHG_REVISION '%012x' "$(get_version_component_range 4)"
-EHG_REPO_URI="http://mcentral.de/hg/~mrec/em28xx-new/"
-EHG_PULL_CMD="hg pull --force --quiet" # necessary until bug 264921 is fixed
+inherit linux-info linux-mod versionator
DESCRIPTION="next generation em28xx driver including dvb support"
HOMEPAGE="http://mcentral.de/"
-SRC_URI=""
+SRC_URI="http://upload.hasnoname.de/${PN}/${PN}-$(get_version_component_range 3).tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
@@ -33,6 +31,16 @@ pkg_setup() {
fi
}
+src_prepare() {
+ if kernel_is eq 2 6 29; then
+ epatch "${FILESDIR}"/em28xx-new-video.c-2.6.29.patch
+ fi
+
+ if kernel_is ge 2 6 30; then
+ epatch "${FILESDIR}"/em28xx-new-2.6.30.patch
+ fi
+}
+
src_compile() {
set_arch_to_kernel
emake || die "Compiling kernel modules failed"
@@ -42,6 +50,6 @@ src_install() {
insinto /lib/modules/${KV_FULL}/empia
local extglob_bak=$(shopt -p extglob)
shopt -s extglob # portage disables bash extglob in ebuilds
- doins $(echo {!(precompiled)/,}*.ko)
+ doins $(echo {!(precompiled)/,}*.ko) || die "doins failed"
eval ${extglob_bak} # restore previous extglob status
}
diff --git a/media-tv/em28xx-new/files/em28xx-new-2.6.30.patch b/media-tv/em28xx-new/files/em28xx-new-2.6.30.patch
new file mode 100644
index 000000000..6b5585f06
--- /dev/null
+++ b/media-tv/em28xx-new/files/em28xx-new-2.6.30.patch
@@ -0,0 +1,169 @@
+diff -urN em28xx-new.orig/cx25843/em28xx-cx25843.c em28xx-new/cx25843/em28xx-cx25843.c
+--- em28xx-new.orig/cx25843/em28xx-cx25843.c 2009-04-09 19:28:53.000000000 +0200
++++ em28xx-new/cx25843/em28xx-cx25843.c 2009-06-12 15:11:43.865650156 +0200
+@@ -23,6 +23,10 @@
+
+ #include "em28xx-cx25843.h"
+
++#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
++#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing)
++#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing)
++
+ MODULE_DESCRIPTION("cx25843 for Empia em28xx based devices");
+ MODULE_AUTHOR("Markus Rechberger <mrechberger@empiatech.com>");
+ MODULE_LICENSE("GPL");
+diff -urN em28xx-new.orig/em28xx-audio.c em28xx-new/em28xx-audio.c
+--- em28xx-new.orig/em28xx-audio.c 2009-04-09 19:28:53.000000000 +0200
++++ em28xx-new/em28xx-audio.c 2009-06-12 15:09:38.869977396 +0200
+@@ -46,6 +46,8 @@
+ #include "em28xx.h"
+ #include "xc5000/xc5000_control.h"
+
++#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing)
++
+ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+ static int em28xx_cmd(struct em28xx *dev, int cmd, int arg);
+
+diff -urN em28xx-new.orig/em28xx-i2c.c em28xx-new/em28xx-i2c.c
+--- em28xx-new.orig/em28xx-i2c.c 2009-04-09 19:28:53.000000000 +0200
++++ em28xx-new/em28xx-i2c.c 2009-06-12 15:08:44.596693725 +0200
+@@ -44,6 +44,8 @@
+
+ #include "xc5000/xc5000_control.h"
+
++#define TUNER_SET_TYPE_ADDR _IOW('d', 90, int)
++
+
+ /* ----------------------------------------------------------- */
+
+diff -urN em28xx-new.orig/em28xx-video.c em28xx-new/em28xx-video.c
+--- em28xx-new.orig/em28xx-video.c 2009-04-22 15:19:52.000000000 +0200
++++ em28xx-new/em28xx-video.c 2009-06-12 15:07:31.429010659 +0200
+@@ -53,6 +53,10 @@
+ #include "xc5000/xc5000_module.h"
+ #include "cx25843/em28xx-cx25843.h"
+
++#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
++#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32)
++#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing)
++
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+ #include "i2c-compat.h"
+ #include <linux/moduleparam.h>
+@@ -578,9 +582,9 @@
+ * inits the device and starts isoc transfer
+ */
+
+-static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
++static int em28xx_v4l2_open(struct file *filp)
+ {
+- int minor = iminor(inode);
++ int minor = video_devdata(filp)->minor;
+ int errCode = 0;
+ int mode = V4L2_TUNER_ANALOG_TV;
+ int type = 0;
+@@ -880,7 +884,7 @@
+ * stops streaming and deallocates all resources allocated by the
+ * v4l2 calls and ioctls
+ */
+-static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
++static int em28xx_v4l2_close(struct file *filp)
+ {
+ int errCode;
+ struct em28xx_fh *fh;
+@@ -1169,7 +1173,7 @@
+ * em28xx_v4l2_poll()
+ * will allocate buffers when called for the first time
+ */
+-static unsigned int em28xx_v4l2_poll(struct file *filp, poll_table *wait)
++static unsigned int em28xx_v4l2_poll(struct file *filp, struct poll_table_struct *wait)
+ {
+ unsigned int mask = 0;
+ struct em28xx_fh *fh = filp->private_data;
+@@ -1919,7 +1923,7 @@
+ * em28xx_v4l2_ioctl() via em28xx_video_do_ioctl(). Userspace
+ * copying is done already, arg is a kernel pointer.
+ */
+-static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
++static int em28xx_do_ioctl(struct file *filp,
+ struct em28xx *dev, unsigned int cmd, void *arg,
+ v4l2_kioctl driver_ioctl)
+ {
+@@ -2436,7 +2440,7 @@
+ * em28xx_v4l2_ioctl. Userspace
+ * copying is done already, arg is a kernel pointer.
+ */
+-static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
++static int em28xx_video_do_ioctl(struct file *filp,
+ unsigned int cmd, void *arg)
+ {
+ struct em28xx_fh *fh = filp->private_data;
+@@ -2459,8 +2463,8 @@
+ strlcpy(cap->driver, "em28xx", sizeof(cap->driver));
+ strlcpy(cap->card, em28xx_boards[dev->model].name,
+ sizeof(cap->card));
+- strlcpy(cap->bus_info, dev->udev->dev.bus_id,
+- sizeof(cap->bus_info));
++ /*strlcpy(cap->bus_info, dev->udev->dev.bus_id,
++ sizeof(cap->bus_info));*/
+ cap->version = EM28XX_VERSION_CODE;
+ cap->capabilities =
+ #if 0
+@@ -2875,7 +2879,7 @@
+ return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
+ em28xx_video_do_ioctl);
+ #else
+- return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
++ return em28xx_do_ioctl(filp, dev, cmd, arg,
+ em28xx_v4l2_ioctl);
+ #endif
+ }
+@@ -2930,7 +2934,7 @@
+ * struct v4l2_ioctl_ops. The struct v4l2_ioctl_ops was introduced with commit
+ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a399810ca69d9d4bd30ab8c1678c7439e567f90b
+ */
+-static int em28xx_v4l2_ioctl_fops(struct inode *inode, struct file *filp,
++static int em28xx_v4l2_ioctl_fops(struct file *filp,
+ unsigned int cmd, unsigned long arg)
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+@@ -2940,7 +2944,7 @@
+ #endif
+ }
+
+-static struct file_operations em28xx_v4l_fops = {
++static struct v4l2_file_operations em28xx_v4l_fops = {
+ .owner = THIS_MODULE,
+ .open = em28xx_v4l2_open,
+ .release = em28xx_v4l2_close,
+@@ -2948,7 +2952,6 @@
+ .read = em28xx_v4l2_read,
+ .poll = em28xx_v4l2_poll,
+ .mmap = em28xx_v4l2_mmap,
+- .llseek = no_llseek,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+ #if 0
+ .compat_ioctl = v4l_compat_ioctl32,
+diff -urN em28xx-new.orig/tvp5150/tvp5150.c em28xx-new/tvp5150/tvp5150.c
+--- em28xx-new.orig/tvp5150/tvp5150.c 2009-04-09 19:28:53.000000000 +0200
++++ em28xx-new/tvp5150/tvp5150.c 2009-06-14 04:58:09.246216302 +0200
+@@ -9,7 +9,7 @@
+ #include <linux/version.h>
+ #include <linux/videodev.h>
+ #include <linux/delay.h>
+-#include <linux/video_decoder.h>
++//#include <linux/video_decoder.h>
+ #include <media/v4l2-common.h>
+ #include <media/tvp5150.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+@@ -21,6 +21,10 @@
+
+ #include "tvp5150_reg.h"
+
++#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
++#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing)
++#define I2C_DRIVERID_TVP5150 76
++
+ MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver");
+ MODULE_AUTHOR("Mauro Carvalho Chehab");
+ MODULE_LICENSE("GPL");
diff --git a/media-tv/em28xx-new/files/em28xx-video.c-2.6.29.patch b/media-tv/em28xx-new/files/em28xx-video.c-2.6.29.patch
new file mode 100644
index 000000000..26f86957b
--- /dev/null
+++ b/media-tv/em28xx-new/files/em28xx-video.c-2.6.29.patch
@@ -0,0 +1,85 @@
+--- em28xx-video.c.orig 2009-04-22 15:19:52.775497497 +0200
++++ em28xx-video.c 2009-04-22 18:02:38.381164273 +0200
+@@ -578,9 +578,9 @@
+ * inits the device and starts isoc transfer
+ */
+
+-static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
++static int em28xx_v4l2_open(struct file *filp)
+ {
+- int minor = iminor(inode);
++ int minor = video_devdata(filp)->minor;
+ int errCode = 0;
+ int mode = V4L2_TUNER_ANALOG_TV;
+ int type = 0;
+@@ -880,7 +880,7 @@
+ * stops streaming and deallocates all resources allocated by the
+ * v4l2 calls and ioctls
+ */
+-static int em28xx_v4l2_close(struct inode *inode, struct file *filp)
++static int em28xx_v4l2_close(struct file *filp)
+ {
+ int errCode;
+ struct em28xx_fh *fh;
+@@ -1169,7 +1169,7 @@
+ * em28xx_v4l2_poll()
+ * will allocate buffers when called for the first time
+ */
+-static unsigned int em28xx_v4l2_poll(struct file *filp, poll_table *wait)
++static unsigned int em28xx_v4l2_poll(struct file *filp, struct poll_table_struct *wait)
+ {
+ unsigned int mask = 0;
+ struct em28xx_fh *fh = filp->private_data;
+@@ -1919,7 +1919,7 @@
+ * em28xx_v4l2_ioctl() via em28xx_video_do_ioctl(). Userspace
+ * copying is done already, arg is a kernel pointer.
+ */
+-static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
++static int em28xx_do_ioctl(struct file *filp,
+ struct em28xx *dev, unsigned int cmd, void *arg,
+ v4l2_kioctl driver_ioctl)
+ {
+@@ -2436,7 +2436,7 @@
+ * em28xx_v4l2_ioctl. Userspace
+ * copying is done already, arg is a kernel pointer.
+ */
+-static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
++static int em28xx_video_do_ioctl(struct file *filp,
+ unsigned int cmd, void *arg)
+ {
+ struct em28xx_fh *fh = filp->private_data;
+@@ -2875,7 +2875,7 @@
+ return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
+ em28xx_video_do_ioctl);
+ #else
+- return em28xx_do_ioctl(inode, filp, dev, cmd, arg,
++ return em28xx_do_ioctl(filp, dev, cmd, arg,
+ em28xx_v4l2_ioctl);
+ #endif
+ }
+@@ -2930,7 +2930,7 @@
+ * struct v4l2_ioctl_ops. The struct v4l2_ioctl_ops was introduced with commit
+ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a399810ca69d9d4bd30ab8c1678c7439e567f90b
+ */
+-static int em28xx_v4l2_ioctl_fops(struct inode *inode, struct file *filp,
++static int em28xx_v4l2_ioctl_fops(struct file *filp,
+ unsigned int cmd, unsigned long arg)
+ {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+@@ -2940,7 +2940,7 @@
+ #endif
+ }
+
+-static struct file_operations em28xx_v4l_fops = {
++static struct v4l2_file_operations em28xx_v4l_fops = {
+ .owner = THIS_MODULE,
+ .open = em28xx_v4l2_open,
+ .release = em28xx_v4l2_close,
+@@ -2948,7 +2948,6 @@
+ .read = em28xx_v4l2_read,
+ .poll = em28xx_v4l2_poll,
+ .mmap = em28xx_v4l2_mmap,
+- .llseek = no_llseek,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
+ #if 0
+ .compat_ioctl = v4l_compat_ioctl32,