From fcb353ecf11d4e678c5885b92a4c535004ada6bb Mon Sep 17 00:00:00 2001 From: Matthias Schwarzott Date: Thu, 26 Apr 2007 16:45:58 +0000 Subject: [PATCH] Make it compile with kernel greater than 2.6.16, solving Bug #157021, thanks to Brian Long and Greg Smolyn for the patch. Package-Manager: portage-2.1.2.4 --- media-tv/wis-go7007/ChangeLog | 8 +- media-tv/wis-go7007/Manifest | 26 ++- .../files/wis-go7007-0.9.8-kernel-2.6.17.diff | 200 ++++++++++++++++++ .../wis-go7007/wis-go7007-0.9.8-r1.ebuild | 15 +- 4 files changed, 231 insertions(+), 18 deletions(-) create mode 100644 media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff diff --git a/media-tv/wis-go7007/ChangeLog b/media-tv/wis-go7007/ChangeLog index cca814927770..0ebf1da69f0c 100644 --- a/media-tv/wis-go7007/ChangeLog +++ b/media-tv/wis-go7007/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-tv/wis-go7007 # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.2 2007/04/26 08:46:06 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/ChangeLog,v 1.3 2007/04/26 16:45:58 zzam Exp $ + + 26 Apr 2007; Matthias Schwarzott + +files/wis-go7007-0.9.8-kernel-2.6.17.diff, wis-go7007-0.9.8-r1.ebuild: + Make it compile with kernel greater than 2.6.16, solving Bug #157021, thanks + to Brian Long and Greg Smolyn for + the patch. *wis-go7007-0.9.8-r1 (26 Apr 2007) diff --git a/media-tv/wis-go7007/Manifest b/media-tv/wis-go7007/Manifest index 37529f6f87c3..bf9ee1ec8db7 100644 --- a/media-tv/wis-go7007/Manifest +++ b/media-tv/wis-go7007/Manifest @@ -5,19 +5,23 @@ AUX wis-go7007-0.9.8-fix-udev.diff 1459 RMD160 5cd0f53a49dae54160a209b2fd1172f1f MD5 8061c929ce66d2e825d7830363874b44 files/wis-go7007-0.9.8-fix-udev.diff 1459 RMD160 5cd0f53a49dae54160a209b2fd1172f1f2293b30 files/wis-go7007-0.9.8-fix-udev.diff 1459 SHA256 78c25a7d45c2ebdf0d4360f5a2619a32ad8ee13586c3dc8b58ce5ad4b223f949 files/wis-go7007-0.9.8-fix-udev.diff 1459 +AUX wis-go7007-0.9.8-kernel-2.6.17.diff 7039 RMD160 c8497f43dc2345959dc25dead0f08a486f7779f9 SHA1 351a1446f4e214de967d4ee1040c6205582c8564 SHA256 cf1785c4525d9764a5a022b6e61b54ac0ba03031bdcdbba15f853627d05b3f32 +MD5 00f016168f6ab868a9008d8c17ee3c22 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039 +RMD160 c8497f43dc2345959dc25dead0f08a486f7779f9 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039 +SHA256 cf1785c4525d9764a5a022b6e61b54ac0ba03031bdcdbba15f853627d05b3f32 files/wis-go7007-0.9.8-kernel-2.6.17.diff 7039 DIST wis-go7007-linux-0.9.8.tar.bz2 136517 RMD160 d3336efeac890848851506d6079df10d2ffd34a4 SHA1 6732d890f964a086ea5c3116a921a9eafce40c26 SHA256 efd7600d881fc57e0484ddd7f0820c18a3bd98dce8060418dfba1626c8a79b1a -EBUILD wis-go7007-0.9.8-r1.ebuild 2821 RMD160 149a7cc679faf0cd53a526bd929ee2d99e347a10 SHA1 8550f458a6c903b8a1e332dc09af8fb5749c2828 SHA256 8ed0f3939bac58869ccc6f63b13a337eadeabfbb5bfdd1c7bd5f0671ab32e15f -MD5 5d749c800cc7762300e049564c33476e wis-go7007-0.9.8-r1.ebuild 2821 -RMD160 149a7cc679faf0cd53a526bd929ee2d99e347a10 wis-go7007-0.9.8-r1.ebuild 2821 -SHA256 8ed0f3939bac58869ccc6f63b13a337eadeabfbb5bfdd1c7bd5f0671ab32e15f wis-go7007-0.9.8-r1.ebuild 2821 +EBUILD wis-go7007-0.9.8-r1.ebuild 2912 RMD160 f25b93f5cf73c3d7e2ca353253263143ff2da1fb SHA1 52488a051b4dfca7279838fa8c40a754e02c9133 SHA256 361b2aaff7a63c20fc7e39dfc9658c52298d090f842ec05230fc3fe4ef1f4116 +MD5 72863743101329df4c30958eb1c60c3c wis-go7007-0.9.8-r1.ebuild 2912 +RMD160 f25b93f5cf73c3d7e2ca353253263143ff2da1fb wis-go7007-0.9.8-r1.ebuild 2912 +SHA256 361b2aaff7a63c20fc7e39dfc9658c52298d090f842ec05230fc3fe4ef1f4116 wis-go7007-0.9.8-r1.ebuild 2912 EBUILD wis-go7007-0.9.8.ebuild 2740 RMD160 4f2af67daec9284ccd8c384c80efd239cd95003f SHA1 7a9fd57a3e01b46a2c67e3e13da564753a6217b0 SHA256 37e971a896f9b5947a74bcce3982be49681cc46b72600c52687022048d2937e0 MD5 b89fa3abe686a8480d29108c883a4ad1 wis-go7007-0.9.8.ebuild 2740 RMD160 4f2af67daec9284ccd8c384c80efd239cd95003f wis-go7007-0.9.8.ebuild 2740 SHA256 37e971a896f9b5947a74bcce3982be49681cc46b72600c52687022048d2937e0 wis-go7007-0.9.8.ebuild 2740 -MISC ChangeLog 618 RMD160 3b856aae0d2a7b00d59b64dd6a58dfe2ddcd1e76 SHA1 1b15dd10c6f64dd81ea5ac8f0533690b0c1bde4a SHA256 c9a27f3b20200e9a049d69ada7ecf793db5d970ff94fbefc2a8ead835cff52d0 -MD5 53282ef2222845a58c4d13db9b0f301d ChangeLog 618 -RMD160 3b856aae0d2a7b00d59b64dd6a58dfe2ddcd1e76 ChangeLog 618 -SHA256 c9a27f3b20200e9a049d69ada7ecf793db5d970ff94fbefc2a8ead835cff52d0 ChangeLog 618 +MISC ChangeLog 915 RMD160 5b456c72abffef99e330c144bd60fcd18c97ee78 SHA1 09b2336ee25f275f1456d276e22db9b45a760c79 SHA256 a4cfda5cd1a4f220678213c1970821d32e656df8878df4ab3a87a458170a8e43 +MD5 d597ed46837934df7e82e7caf01494fb ChangeLog 915 +RMD160 5b456c72abffef99e330c144bd60fcd18c97ee78 ChangeLog 915 +SHA256 a4cfda5cd1a4f220678213c1970821d32e656df8878df4ab3a87a458170a8e43 ChangeLog 915 MISC metadata.xml 246 RMD160 0f200b959fe440bc003682c4a1dd9ee1d3779fe3 SHA1 308bc54fe4d0cf8ef74b640816059455b7cd8922 SHA256 976fea96fe7879e5ed46a894977803c4927461d0763bf2a08cc17c25bdffa731 MD5 864b7b7362c88dc173a6bfb88a4d0eb1 metadata.xml 246 RMD160 0f200b959fe440bc003682c4a1dd9ee1d3779fe3 metadata.xml 246 @@ -31,7 +35,7 @@ SHA256 fc9dcae83131f6a710ae5f33325d1af4a7bb96444b71139f46b0b8065502a260 files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) -iD8DBQFGMGbXt2vP6XvVdOcRAqxaAKCw9d1iDJgET9hdx3mmCC2O/mKoFQCg3e0o -Aqlti4mxfx1H7gM6In9oDJU= -=3RDt +iD8DBQFGMNdMt2vP6XvVdOcRAt7GAKC/Isl2KG1ygqeEP7diP4c73tklOACeNInW +jwoqvbSuJRJ6xCZnoqyGRKU= +=155o -----END PGP SIGNATURE----- diff --git a/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff new file mode 100644 index 000000000000..720f4c0650b2 --- /dev/null +++ b/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff @@ -0,0 +1,200 @@ +diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c wis-go7007-linux-0.9.8/kernel/go7007-driver.c +--- wis-go7007-linux-0.9.8-orig/kernel/go7007-driver.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/go7007-driver.c 2007-04-26 18:35:06.000000000 +0200 +@@ -18,7 +18,9 @@ + #include + #include + #include ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + #include ++#endif + #include + #include + #include +diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c wis-go7007-linux-0.9.8/kernel/go7007-fw.c +--- wis-go7007-linux-0.9.8-orig/kernel/go7007-fw.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/go7007-fw.c 2007-04-26 18:35:06.000000000 +0200 +@@ -26,7 +26,10 @@ + + #include + #include ++#include ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + #include ++#endif + #include + #include + #include +diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c wis-go7007-linux-0.9.8/kernel/go7007-i2c.c +--- wis-go7007-linux-0.9.8-orig/kernel/go7007-i2c.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/go7007-i2c.c 2007-04-26 18:35:06.000000000 +0200 +@@ -15,9 +15,11 @@ + * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + */ + ++#include ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + #include ++#endif + #include +-#include + #include + #include + #include +diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c wis-go7007-linux-0.9.8/kernel/go7007-usb.c +--- wis-go7007-linux-0.9.8-orig/kernel/go7007-usb.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/go7007-usb.c 2007-04-26 18:35:06.000000000 +0200 +@@ -27,7 +27,7 @@ + #include + #include + #include +-#include ++#include + + #include "go7007-priv.h" + #include "wis-i2c.h" +@@ -225,17 +225,17 @@ + .inputs = { + { + .video_input = 1, +- .audio_input = AUDIO_EXTERN, ++ .audio_input = TVAUDIO_INPUT_EXTERN, + .name = "Composite", + }, + { + .video_input = 8, +- .audio_input = AUDIO_EXTERN, ++ .audio_input = TVAUDIO_INPUT_EXTERN, + .name = "S-Video", + }, + { + .video_input = 3, +- .audio_input = AUDIO_TUNER, ++ .audio_input = TVAUDIO_INPUT_TUNER, + .name = "Tuner", + }, + }, +diff -ru wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c +--- wis-go7007-linux-0.9.8-orig/kernel/go7007-v4l2.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/go7007-v4l2.c 2007-04-26 18:35:06.000000000 +0200 +@@ -17,8 +17,10 @@ + + #include + #include +-#include + #include ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) ++#include ++#endif + #include + #include + #include +@@ -939,7 +941,7 @@ + if (go->i2c_adapter_online) { + i2c_clients_command(&go->i2c_adapter, DECODER_SET_INPUT, + &go->board_info->inputs[*input].video_input); +- i2c_clients_command(&go->i2c_adapter, AUDC_SET_INPUT, ++ i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO, + &go->board_info->inputs[*input].audio_input); + } + return 0; +diff -ru wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c wis-go7007-linux-0.9.8/kernel/snd-go7007.c +--- wis-go7007-linux-0.9.8-orig/kernel/snd-go7007.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/snd-go7007.c 2007-04-26 18:38:24.000000000 +0200 +@@ -20,7 +20,9 @@ + #include + #include + #include ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + #include ++#endif + #include + #include + #include +@@ -305,7 +307,11 @@ + struct go7007_snd *gosnd = go->snd_context; + + snd_card_disconnect(gosnd->card); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) + snd_card_free_in_thread(gosnd->card); ++#else ++ snd_card_free_when_closed(gosnd->card); ++#endif + return 0; + } + EXPORT_SYMBOL(go7007_snd_remove); +diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c wis-go7007-linux-0.9.8/kernel/wis-saa7113.c +--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7113.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/wis-saa7113.c 2007-04-26 18:35:06.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "wis-i2c.h" + +diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c wis-go7007-linux-0.9.8/kernel/wis-saa7115.c +--- wis-go7007-linux-0.9.8-orig/kernel/wis-saa7115.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/wis-saa7115.c 2007-04-26 18:35:06.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "wis-i2c.h" + +diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c wis-go7007-linux-0.9.8/kernel/wis-tw2804.c +--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw2804.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/wis-tw2804.c 2007-04-26 18:35:06.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "wis-i2c.h" + +diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c wis-go7007-linux-0.9.8/kernel/wis-tw9903.c +--- wis-go7007-linux-0.9.8-orig/kernel/wis-tw9903.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/wis-tw9903.c 2007-04-26 18:35:06.000000000 +0200 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #include "wis-i2c.h" + +diff -ru wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c wis-go7007-linux-0.9.8/kernel/wis-uda1342.c +--- wis-go7007-linux-0.9.8-orig/kernel/wis-uda1342.c 2007-04-26 18:34:44.000000000 +0200 ++++ wis-go7007-linux-0.9.8/kernel/wis-uda1342.c 2007-04-26 18:35:06.000000000 +0200 +@@ -20,7 +20,7 @@ + #include + #include + #include +-#include ++#include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) + #include + #endif +@@ -38,15 +38,15 @@ + unsigned int cmd, void *arg) + { + switch (cmd) { +- case AUDC_SET_INPUT: ++ case VIDIOC_S_AUDIO: + { + int *inp = arg; + + switch (*inp) { +- case AUDIO_TUNER: ++ case TVAUDIO_INPUT_TUNER: + write_reg(client, 0x00, 0x1441); /* select input 2 */ + break; +- case AUDIO_EXTERN: ++ case TVAUDIO_INPUT_EXTERN: + write_reg(client, 0x00, 0x1241); /* select input 1 */ + break; + default: diff --git a/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild b/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild index e3088700de72..df6dc8e260d9 100644 --- a/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild +++ b/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild,v 1.1 2007/04/26 08:46:06 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/wis-go7007/wis-go7007-0.9.8-r1.ebuild,v 1.2 2007/04/26 16:45:58 zzam Exp $ inherit eutils linux-mod @@ -20,7 +20,7 @@ S=${WORKDIR}/${MY_PN}-${PV} pkg_setup() { BUILD_TARGETS="all" - BUILD_PARAMS="KDIR=${KERNEL_DIR}" + BUILD_PARAMS="KERNELSRC=${KERNEL_DIR}" CONFIG_CHECK="HOTPLUG MODULES KMOD FW_LOADER I2C VIDEO_DEV SOUND SND USB USB_DEVICEFS USB_EHCI_HCD" @@ -28,10 +28,10 @@ pkg_setup() { CONFIG_CHECK="${CONFIG_CHECK} SND_MIXER_OSS SND_PCM_OSS" fi - if ! kernel_is 2 6 16; then - eerror "These drivers will only work with a 2.6.16 kernel" - die "Needs a different kernel" - fi + #if ! kernel_is 2 6 16; then + # eerror "These drivers will only work with a 2.6.16 kernel" + # #die "Needs a different kernel" + #fi linux-mod_pkg_setup MODULE_NAMES="go7007(extra:${S}:${S}/kernel) @@ -49,6 +49,9 @@ src_unpack() { unpack ${A} cd ${S} epatch "${FILESDIR}/${P}-fix-udev.diff" + if kernel_is ge 2 6 17; then + epatch "${FILESDIR}/${P}-kernel-2.6.17.diff" + fi } src_compile() { -- 2.26.2