aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/xawtv
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2011-02-26 22:48:11 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2011-02-26 22:51:11 +0100
commit2caafc8ebec7f0dc641baf7f8dd93a4386d40948 (patch)
treee486e13734eb621f389ca8438a2e146081ae3d18 /recipes/xawtv
parentc9c44dd2fb216ff5185cb87f8424f3192f73b94b (diff)
downloadopenembedded-2caafc8ebec7f0dc641baf7f8dd93a4386d40948.tar.gz
xawtv: update to version 3.95
* added usefull debian-patches * convert sys_siglist to strsignal fixes uclibc build * enable alsa * remove older version 3.93
Diffstat (limited to 'recipes/xawtv')
-rw-r--r--recipes/xawtv/xawtv-3.95/01_gcc4.patch11
-rw-r--r--recipes/xawtv/xawtv-3.95/03_libquicktime.patch32
-rw-r--r--recipes/xawtv/xawtv-3.95/04_man_typo.patch170
-rw-r--r--recipes/xawtv/xawtv-3.95/05_man_section.patch18
-rw-r--r--recipes/xawtv/xawtv-3.95/07_page_size.patch44
-rw-r--r--recipes/xawtv/xawtv-3.95/08_oss_audio.patch12
-rw-r--r--recipes/xawtv/xawtv-3.95/09_audio_unmute.patch13
-rw-r--r--recipes/xawtv/xawtv-3.95/10_radio_fixes.patch80
-rw-r--r--recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch56
-rw-r--r--recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch151
-rw-r--r--recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch28
-rw-r--r--recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch64
-rw-r--r--recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch21
-rw-r--r--recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch11
-rw-r--r--recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch12
-rw-r--r--recipes/xawtv/xawtv-3.95/18_glib2.patch24
-rw-r--r--recipes/xawtv/xawtv-3.95/make.patch (renamed from recipes/xawtv/xawtv-3.93/make.patch)65
-rw-r--r--recipes/xawtv/xawtv-3.95/sys_siglist.patch47
-rw-r--r--recipes/xawtv/xawtv_3.93.bb35
-rw-r--r--recipes/xawtv/xawtv_3.95.bb52
20 files changed, 891 insertions, 55 deletions
diff --git a/recipes/xawtv/xawtv-3.95/01_gcc4.patch b/recipes/xawtv/xawtv-3.95/01_gcc4.patch
new file mode 100644
index 0000000000..ad45a7a2da
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/01_gcc4.patch
@@ -0,0 +1,11 @@
+diff -urNad motv-3.95~/x11/vbi-gui.c motv-3.95/x11/vbi-gui.c
+--- motv-3.95~/x11/vbi-gui.c
++++ motv-3.95/x11/vbi-gui.c
+@@ -44,6 +44,7 @@
+ #include "vbi-x11.h"
+ #include "vbi-gui.h"
+
++#include "grab-ng.h"
+ #include "channel.h"
+
+ static int tt_debug = 1;
diff --git a/recipes/xawtv/xawtv-3.95/03_libquicktime.patch b/recipes/xawtv/xawtv-3.95/03_libquicktime.patch
new file mode 100644
index 0000000000..958a265d8b
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/03_libquicktime.patch
@@ -0,0 +1,32 @@
+diff -urNad xawtv-3.95~/libng/plugins/read-qt.c xawtv-3.95/libng/plugins/read-qt.c
+--- xawtv-3.95~/libng/plugins/read-qt.c
++++ xawtv-3.95/libng/plugins/read-qt.c
+@@ -4,9 +4,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <pthread.h>
+-#include <quicktime/quicktime.h>
+-#include <quicktime/colormodels.h>
+-#include <quicktime/lqt.h>
++#include <lqt/quicktime.h>
++#include <lqt/colormodels.h>
++#include <lqt/lqt.h>
+
+ #include "grab-ng.h"
+
+diff -urNad xawtv-3.95~/libng/plugins/write-qt.c xawtv-3.95/libng/plugins/write-qt.c
+--- xawtv-3.95~/libng/plugins/write-qt.c
++++ xawtv-3.95/libng/plugins/write-qt.c
+@@ -4,9 +4,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <pthread.h>
+-#include <quicktime/quicktime.h>
+-#include <quicktime/colormodels.h>
+-#include <quicktime/lqt.h>
++#include <lqt/quicktime.h>
++#include <lqt/colormodels.h>
++#include <lqt/lqt.h>
+
+ #include "grab-ng.h"
+
diff --git a/recipes/xawtv/xawtv-3.95/04_man_typo.patch b/recipes/xawtv/xawtv-3.95/04_man_typo.patch
new file mode 100644
index 0000000000..ea00df13b5
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/04_man_typo.patch
@@ -0,0 +1,170 @@
+diff -urNad xawtv-3.95~/man/fbtv.1 xawtv-3.95/man/fbtv.1
+--- xawtv-3.95~/man/fbtv.1
++++ xawtv-3.95/man/fbtv.1
+@@ -98,7 +98,7 @@
+ The BT8xx cards can produce images up to 768x576 pixels. In order to
+ have fbtv make use of your entire monitor-size and get maximum image
+ quality, you need to create a 768x576 pixels framebufferconsole. This
+-can be accomplished with the fbset(1) utility, which is availabile at
++can be accomplished with the fbset(1) utility, which is available at
+ various locations. See: http://www.cs.kuleuven.ac.be/~geert/bin/
+ .P
+ Or, you can let fbtv handle the videomode changes with the -m switch.
+diff -urNad xawtv-3.95~/man/pia.1 xawtv-3.95/man/pia.1
+--- xawtv-3.95~/man/pia.1
++++ xawtv-3.95/man/pia.1
+@@ -5,7 +5,7 @@
+ .B pia [ options ] movie
+ .SH DESCRIPTION
+ .B pia
+-is a small X11 tool which playes movie files.
++is a small X11 tool which plays movie files.
+ .SH OPTIONS
+ .B pia
+ understands the usual toolkit options (-geometry + friends).
+@@ -24,7 +24,7 @@
+ Use OSS device <dev> for sound.
+ .TP
+ .B -noxv
+-Disable Xvideo extention.
++Disable Xvideo extension.
+ .TP
+ .B -nogl
+ Disable OpenGL.
+@@ -41,7 +41,7 @@
+ .SH SUPPORTED MOVIE FORMATS
+ Main purpose of this utility is to playback movie files recorded by
+ xawtv, motv and streamer. It should be able to playback every AVI or
+-QuickTime movie written by one of the mentioned utilites. Feel free
++QuickTime movie written by one of the mentioned utilities. Feel free
+ to submit a bug report if this doesn't work for some file.
+ .SS QuickTime
+ .B pia
+diff -urNad xawtv-3.95~/man/record.1 xawtv-3.95/man/record.1
+--- xawtv-3.95~/man/record.1
++++ xawtv-3.95/man/record.1
+@@ -16,7 +16,7 @@
+ .TP
+ .B -o file
+ basename for the output file(s), a number and the .wav
+-extention are added by record. Default is "record".
++extension are added by record. Default is "record".
+ .TP
+ .B -i dev
+ mixer control. This should be the one where you can adjust the record
+diff -urNad xawtv-3.95~/man/rootv.1 xawtv-3.95/man/rootv.1
+--- xawtv-3.95~/man/rootv.1
++++ xawtv-3.95/man/rootv.1
+@@ -1,6 +1,6 @@
+ .TH rootv 1 "(c) 2000-2002 Gerd Knorr"
+ .SH NAME
+-rootv - display TV using the Xvideo extention
++rootv - display TV using the Xvideo extension
+ .SH SYNOPSIS
+ .B rootv [ options ]
+ .SH DESCRIPTION
+@@ -9,7 +9,7 @@
+ but you can also ask it to use the root window (thus the name) or any
+ other window.
+ .B rootv
+-needs the Xvideo extention.
++needs the Xvideo extension.
+ .P
+ .B rootv
+ itself provides no way to control video/audio/tuner. You can use
+diff -urNad xawtv-3.95~/man/subtitles.1 xawtv-3.95/man/subtitles.1
+--- xawtv-3.95~/man/subtitles.1
++++ xawtv-3.95/man/subtitles.1
+@@ -8,7 +8,7 @@
+ fetches the given teletext page with the alevt-cap utility and
+ displays it using xawtv-remote in an endless loop. It's most
+ useful for pages which carry subtitles for the current TV program.
+-It's page 150 in germany.
++It's page 150 in Germany.
+ .SH OPTIONS
+ .TP
+ .B -help
+diff -urNad xawtv-3.95~/man/v4l-conf.8 xawtv-3.95/man/v4l-conf.8
+--- xawtv-3.95~/man/v4l-conf.8
++++ xawtv-3.95/man/v4l-conf.8
+@@ -20,7 +20,7 @@
+ knows three ways to get the informations:
+ .TP 3
+ *
+-Query the X-Server using the XF86 DGA extention. This is the default
++Query the X-Server using the XF86 DGA extension. This is the default
+ if the DISPLAY environment variable is set.
+ .TP 3
+ *
+@@ -63,7 +63,7 @@
+ work because the X-Server lacks DGA support. You can put this into
+ /etc/conf.modules, as "post-install bttv ..." for example.
+ .SH BUGS
+-Hope I havn't any security flaws in there. If you find one, drop me a
++Hope I haven't any security flaws in there. If you find one, drop me a
+ note. Mails with patches are preferred :-)
+ .SH SEE ALSO
+ xawtv(1), fbtv(1)
+diff -urNad xawtv-3.95~/man/webcam.1 xawtv-3.95/man/webcam.1
+--- xawtv-3.95~/man/webcam.1
++++ xawtv-3.95/man/webcam.1
+@@ -150,7 +150,7 @@
+ paper "Correcting Distortion of Image by Image Registration" of Toru
+ Tamaki, Tsuyoshi Yamamura and Noboru Ahnishi. More your lens has an
+ important distortion, more 'distor_k' must be neared of 0. 700 is the
+-défault value. Coefficient k of program is x100 than article.
++default value. Coefficient k of program is x100 than article.
+ .TP
+ .B distor_cx = 192
+ .TP
+diff -urNad xawtv-3.95~/man/xawtv-remote.1 xawtv-3.95/man/xawtv-remote.1
+--- xawtv-3.95~/man/xawtv-remote.1
++++ xawtv-3.95/man/xawtv-remote.1
+@@ -136,14 +136,14 @@
+ .TP
+ .B vtx line1 line2 [ ... ]
+ Display subtitles. It pops up a small window at the bottom of the screen.
+-It is supported to be used as interface for displaying subtitles (often on
+-videotext page 150 in europe, thats why the name) by external programs.
++It is intended to be used as an interface for displaying subtitles (often on
++videotext page 150 in Europe, that's why the name) by external programs.
+ .br
+ Every command line argument is one line, zero lines removes the window.
+ You can colorize the text with the control sequence "ESC foreground
+ background". foreground/background has the range 0-7 (ansi term colors).
+ Example: "\\03347 hello world " is blue on white. "\\033" must be a real
+-escape character, the string does'nt work. With the bash you'll get it
++escape character, the string doesn't work. With the bash you'll get it
+ with ^V ESC. vtx does also understand the ANSI tty escape sequences for
+ color.
+ .TP
+diff -urNad xawtv-3.95~/man/xawtv.1 xawtv-3.95/man/xawtv.1
+--- xawtv-3.95~/man/xawtv.1
++++ xawtv-3.95/man/xawtv.1
+@@ -70,7 +70,7 @@
+ .TP
+ \fB-remote\fP
+ X11 display is remote. This basically disables overlay mode, you
+-might need this if xawtv failes to autodetect a remote X11 display.
++might need this if xawtv fails to autodetect a remote X11 display.
+ .br
+ Resource: xawtv.remote (bool).
+ .TP
+@@ -155,7 +155,7 @@
+ more details and hints on how to setup Xvideo.
+ .SH GETTING STARTED
+ Just start xawtv. Then verify the settings in the options menu (right
+-mouse button) and adjust the settings (TV norm, Video source, freqency
++mouse button) and adjust the settings (TV norm, Video source, frequency
+ table). With the cursor keys you can control the tuner and look for
+ TV Stations. Other useful hotkeys are listed below.
+ .P
+@@ -190,7 +190,7 @@
+ Z Channel Hopper (\fIz\fPapping, tune in every
+ station a few seconds)
+ Ctrl+Z Fast Channel Hopping (grab the images for the
+- Channel Bottons)
++ Channel Buttons)
+
+ up/down tune up/down one channel
+ left/right fine tuning
diff --git a/recipes/xawtv/xawtv-3.95/05_man_section.patch b/recipes/xawtv/xawtv-3.95/05_man_section.patch
new file mode 100644
index 0000000000..06ebee3bce
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/05_man_section.patch
@@ -0,0 +1,18 @@
+diff -urNad xawtv-3.95~/man/es/v4l-conf.8 xawtv-3.95/man/es/v4l-conf.8
+--- xawtv-3.95~/man/es/v4l-conf.8
++++ xawtv-3.95/man/es/v4l-conf.8
+@@ -1,4 +1,4 @@
+-.TH v4l-conf 1 "(c) 1997-99 Gerd Knorr"
++.TH v4l-conf 8 "(c) 1997-99 Gerd Knorr"
+ .SH NOMBRE
+ v4l-conf - configura un driver video4linux
+ .SH SINOPSIS
+diff -urNad xawtv-3.95~/man/v4l-conf.8 xawtv-3.95/man/v4l-conf.8
+--- xawtv-3.95~/man/v4l-conf.8
++++ xawtv-3.95/man/v4l-conf.8
+@@ -1,4 +1,4 @@
+-.TH v4l-conf 1 "(c) 1997-99 Gerd Knorr"
++.TH v4l-conf 8 "(c) 1997-99 Gerd Knorr"
+ .SH NAME
+ v4l-conf - configure a video4linux driver
+ .SH SYNOPSIS
diff --git a/recipes/xawtv/xawtv-3.95/07_page_size.patch b/recipes/xawtv/xawtv-3.95/07_page_size.patch
new file mode 100644
index 0000000000..1580886984
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/07_page_size.patch
@@ -0,0 +1,44 @@
+diff -urN xawtv-3.95.orig/console/fbtools.c xawtv-3.95/console/fbtools.c
+--- xawtv-3.95.orig/console/fbtools.c 2003-02-14 14:14:04.000000000 +0000
++++ xawtv-3.95./console/fbtools.c 2006-08-23 10:57:40.000000000 +0000
+@@ -21,8 +21,6 @@
+ #include <linux/vt.h>
+ #include <linux/fb.h>
+
+-#include <asm/page.h>
+-
+ #include "fbtools.h"
+
+ /* -------------------------------------------------------------------- */
+@@ -424,7 +422,7 @@
+ goto err;
+ }
+ #endif
+- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK);
++ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (sysconf(_SC_PAGE_SIZE)-1);
+ fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
+ PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
+ if (-1L == (long)fb_mem) {
+diff -urN xawtv-3.95.orig/console/matrox.c xawtv-3.95/console/matrox.c
+--- xawtv-3.95.orig/console/matrox.c 2005-02-03 10:40:41.000000000 +0000
++++ xawtv-3.95/console/matrox.c 2006-08-23 11:09:51.000000000 +0000
+@@ -9,7 +9,6 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+
+-#include <asm/page.h> /* PAGE_SIZE */
+ #include <linux/fb.h>
+
+ #include "byteswap.h"
+@@ -226,7 +225,7 @@
+ return -1;
+ }
+ off = (unsigned long)fb_fix.mmio_start -
+- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1));
++ ((unsigned long)fb_fix.mmio_start & ~(sysconf(_SC_PAGE_SIZE)-1));
+ bmmio += off;
+ mmio = (uint32_t*)bmmio;
+ return 0;
+
+
+
diff --git a/recipes/xawtv/xawtv-3.95/08_oss_audio.patch b/recipes/xawtv/xawtv-3.95/08_oss_audio.patch
new file mode 100644
index 0000000000..529fddbceb
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/08_oss_audio.patch
@@ -0,0 +1,12 @@
+diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/snd-oss.c xawtv-3.95.dfsg.1/libng/plugins/snd-oss.c
+--- xawtv-3.95.dfsg.1~/libng/plugins/snd-oss.c 2003-02-14 15:14:05.000000000 +0100
++++ xawtv-3.95.dfsg.1/libng/plugins/snd-oss.c 2007-07-28 23:43:41.000000000 +0200
+@@ -441,7 +441,7 @@
+ for (;;) {
+ rc = read(fd,buffer+count,blocksize-count);
+ if (rc < 0) {
+- if (EINTR == errno)
++ if ((EINTR == errno) || (EAGAIN == errno))
+ continue;
+ perror("oss: read");
+ exit(1);
diff --git a/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch b/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch
new file mode 100644
index 0000000000..9d4f1c5c65
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch
@@ -0,0 +1,13 @@
+diff -urNad xawtv-3.95.dfsg.1~/x11/xt.c xawtv-3.95.dfsg.1/x11/xt.c
+--- xawtv-3.95.dfsg.1~/x11/xt.c 2005-01-11 10:26:43.000000000 +0100
++++ xawtv-3.95.dfsg.1/x11/xt.c 2007-07-29 00:03:50.000000000 +0200
+@@ -313,6 +313,9 @@
+ void
+ ExitCB(Widget widget, XtPointer client_data, XtPointer calldata)
+ {
++ if (cur_attrs[ATTR_ID_MUTE]) {
++ do_va_cmd(2,"volume","mute","off");
++ }
+ audio_off();
+ video_overlay(0);
+ video_close();
diff --git a/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch b/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch
new file mode 100644
index 0000000000..c40a607848
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch
@@ -0,0 +1,80 @@
+diff -urNad xawtv-3.95.dfsg.1~/console/radio.c xawtv-3.95.dfsg.1/console/radio.c
+--- xawtv-3.95.dfsg.1~/console/radio.c 2003-04-16 17:35:13.000000000 +0200
++++ xawtv-3.95.dfsg.1/console/radio.c 2007-07-29 00:12:03.000000000 +0200
+@@ -40,7 +40,8 @@
+ /* JMMV: WINDOWS for radio */
+ int ncurses = 0;
+ int debug = 0;
+-char *device = "/dev/radio";
++char *device_list[4] = {NULL, "/dev/radio", "/dev/v4l/radio0", NULL};
++char **device = &device_list[1];
+ WINDOW *wfreq, *woptions, *wstations, *wcommand;
+ int freqfact = 16;
+
+@@ -186,7 +187,7 @@
+ while (NULL != fgets(file,255,fp)) {
+ if (2 == sscanf(file,"%c=%d",&n,&ifreq) && n >= '1' && n <= '8') {
+ fkeys[n - '1'] = ifreq;
+- } else if (2 == sscanf(file,"%d=%30[^\n]",&ifreq,name) && stations < 99) {
++ } else if (2 == sscanf(file,"%d=%50[^\n]",&ifreq,name) && stations < 99) {
+ freqs[stations] = ifreq;
+ labels[stations] = strdup(name);
+ stations++;
+@@ -371,7 +372,7 @@
+ " -d enable debug output\n"
+ " -m mute radio\n"
+ " -f freq tune given frequency (also unmutes)\n"
+- " -c dev use given device [default: %s]\n"
++ " -c dev try to use given device [defaults: %s and %s]\n"
+ " -s scan\n"
+ " -S scan + write radio.fmmap\n"
+ " -i scan, write initial ~/.radio config file to\n"
+@@ -383,7 +384,7 @@
+ "(c) 1998-2001 Gerd Knorr <kraxel@bytesex.org>\n"
+ "interface by Juli Merino <jmmv@mail.com>\n"
+ "channel scan by Gunther Mayer <Gunther.Mayer@t-online.de>\n",
+- device);
++ device_list[1], device_list[2]);
+ }
+
+ int
+@@ -432,7 +433,8 @@
+ }
+ break;
+ case 'c':
+- device = optarg;
++ device_list[0] = optarg;
++ device = &device_list[0];
+ break;
+ case 'h':
+ usage(stdout);
+@@ -443,9 +445,14 @@
+ }
+ }
+
+- if (-1 == (fd = open(device, O_RDONLY))) {
+- fprintf(stderr,"open %s: %s\n",device,strerror(errno));
+- exit(1);
++ while (-1 == (fd = open(*device, O_RDONLY))) {
++ fprintf(stderr,"Warning: open %s: %s\n",*device,strerror(errno));
++ if(NULL == *(++device)) {
++ fprintf(stderr,"Giving up.\n");
++ exit(1);
++ } else {
++ fprintf(stderr,"Trying alternate device: %s\n", *device);
++ }
+ }
+
+ memset(&tuner,0,sizeof(tuner));
+@@ -627,8 +634,10 @@
+ }
+ if (i != stations) {
+ i += (key == KEY_NPAGE) ? -1 : 1;
+- if (i < 0 || i >= stations)
++ if (i >= stations)
+ i = 0;
++ if (i < 0)
++ i = stations - 1;
+ ifreq = freqs[i];
+ }
+ }
diff --git a/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch b/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch
new file mode 100644
index 0000000000..6ea2502e7d
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch
@@ -0,0 +1,56 @@
+diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c
+--- xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c 2005-02-11 18:56:24.000000000 +0100
++++ xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c 2007-07-29 00:39:54.000000000 +0200
+@@ -509,7 +509,22 @@
+ fprintf(stderr, "v4l2: close\n");
+
+ close(h->fd);
++
++ if (NULL != h->attr) {
++ int i;
++ for (i = 0; i < h->nattr; ++i) {
++ if ((NULL != h->attr[i].choices) &&
++ (stereo != h->attr[i].choices)) {
++ free(h->attr[i].choices);
++ h->attr[i].choices = NULL;
++ }
++ }
++ free(h->attr);
++ h->attr = NULL;
++ }
++
+ free(h);
++ h = NULL;
+ return 0;
+ }
+
+diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv1-v4l.c xawtv-3.95.dfsg.1/libng/plugins/drv1-v4l.c
+--- xawtv-3.95.dfsg.1~/libng/plugins/drv1-v4l.c 2003-02-14 15:14:05.000000000 +0100
++++ xawtv-3.95.dfsg.1/libng/plugins/drv1-v4l.c 2007-07-29 00:39:54.000000000 +0200
+@@ -469,7 +469,26 @@
+ munmap(h->mmap,h->mbuf.size);
+
+ close(h->fd);
++
++ if (NULL != h->attr) {
++ int i;
++ for (i = 0; i < h->nattr; ++i) {
++ if ((NULL != h->attr[i].choices) &&
++ (stereo != h->attr[i].choices)) {
++ free(h->attr[i].choices);
++ h->attr[i].choices = NULL;
++ }
++ }
++ free(h->attr);
++ h->attr = NULL;
++ }
++
++ if (NULL != h->channels) { free(h->channels); h->channels = NULL; }
++ if (NULL != h->buf_v4l) { free(h->buf_v4l); h->buf_v4l = NULL; }
++ if (NULL != h->buf_me) { free(h->buf_me); h->buf_me = NULL; }
++
+ free(h);
++ h = NULL;
+ return 0;
+ }
+
diff --git a/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch b/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch
new file mode 100644
index 0000000000..3b002c9bce
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch
@@ -0,0 +1,151 @@
+diff -urNad xawtv-3.95.dfsg.1~/console/fbtools.c xawtv-3.95.dfsg.1/console/fbtools.c
+--- xawtv-3.95.dfsg.1~/console/fbtools.c 2007-07-29 00:54:44.000000000 +0200
++++ xawtv-3.95.dfsg.1/console/fbtools.c 2007-07-29 00:55:39.000000000 +0200
+@@ -447,7 +447,7 @@
+ fb_activate_current(tty);
+
+ /* cls */
+- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
++ fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length);
+ return fb;
+
+ err:
+@@ -458,15 +458,33 @@
+ void
+ fb_cleanup(void)
+ {
++ struct fb_var_screeninfo var;
++
+ /* restore console */
++ if (0 == ioctl(fb,FBIOGET_VSCREENINFO,&var)) {
++ if (!memcmp(&var, &fb_ovar, sizeof(var))) {
++ goto skip_var;
++ }
++ }
+ if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar))
+ perror("ioctl FBIOPUT_VSCREENINFO");
++skip_var:
+ if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix))
+ perror("ioctl FBIOGET_FSCREENINFO");
+ if (fb_ovar.bits_per_pixel == 8 ||
+ fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
+- if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap))
+- perror("ioctl FBIOPUTCMAP");
++ if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap)) {
++ /*
++ * radeonfb in 15/16bpp returns EINVAL when color
++ * map retrieved by FBIOGETCMAP is programmed back
++ * by FBIOPUTCMAP. It still programs palette
++ * correctly, just instead of ignoring items 64-255
++ * it returns an error.
++ */
++ if (errno != EINVAL) {
++ perror("ioctl FBIOPUTCMAP");
++ }
++ }
+ }
+ close(fb);
+
+diff -urNad xawtv-3.95.dfsg.1~/console/fbtv.c xawtv-3.95.dfsg.1/console/fbtv.c
+--- xawtv-3.95.dfsg.1~/console/fbtv.c 2005-09-30 12:09:22.000000000 +0200
++++ xawtv-3.95.dfsg.1/console/fbtv.c 2007-07-29 00:55:39.000000000 +0200
+@@ -230,6 +230,26 @@
+ }
+
+ static void
++fb_loadpalette(int fd)
++{
++ if (fb_var.bits_per_pixel == 8 ||
++ fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
++ if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap)) {
++ /*
++ * radeonfb in 15/16bpp returns EINVAL when color
++ * map retrieved by FBIOGETCMAP is programmed back
++ * by FBIOPUTCMAP. It still programs palette
++ * correctly, just instead of ignoring items 64-255
++ * it returns an error.
++ */
++ if (errno != EINVAL) {
++ perror("ioctl FBIOPUTCMAP");
++ }
++ }
++ }
++}
++
++static void
+ fb_initcolors(int fd, int gray)
+ {
+ /* get colormap */
+@@ -288,11 +308,7 @@
+ }
+
+ /* set colormap */
+- if (fb_var.bits_per_pixel == 8 ||
+- fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
+- if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap))
+- perror("ioctl FBIOPUTCMAP");
+- }
++ fb_loadpalette(fd);
+ }
+
+ static void
+@@ -511,11 +527,17 @@
+ }
+
+ static void
++clear_video(void)
++{
++ fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length);
++}
++
++static void
+ do_fullscreen(void)
+ {
+ do_va_cmd(2,"capture","off");
+ quiet = !quiet;
+- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
++ clear_video();
+ do_va_cmd(2,"capture","on");
+ }
+
+@@ -553,8 +575,9 @@
+ case FB_ACQ_REQ:
+ switch_last = fb_switch_state;
+ fb_switch_acquire();
+- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
++ clear_video();
+ ioctl(fb,FBIOPAN_DISPLAY,&fb_var);
++ fb_loadpalette(fb);
+ do_va_cmd(2,"capture","on");
+ break;
+ case FB_ACTIVE:
+@@ -748,7 +771,7 @@
+ }
+ #endif
+
+- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
++ clear_video();
+ for (;!sig;) {
+ if ((fb_switch_state == FB_ACTIVE || keep_dma_on) && !quiet) {
+ /* clear first lines */
+@@ -918,7 +941,7 @@
+ audio_off();
+ drv->close(h_drv);
+ if (fb_switch_state == FB_ACTIVE)
+- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
++ clear_video();
+ tty_cleanup();
+ fb_cleanup();
+ exit(0);
+diff -urNad xawtv-3.95.dfsg.1~/console/v4l-conf.c xawtv-3.95.dfsg.1/console/v4l-conf.c
+--- xawtv-3.95.dfsg.1~/console/v4l-conf.c 2005-02-09 13:27:36.000000000 +0100
++++ xawtv-3.95.dfsg.1/console/v4l-conf.c 2007-07-29 00:55:39.000000000 +0200
+@@ -347,7 +347,7 @@
+ /* set values */
+ fb.fmt.width = d->width;
+ fb.fmt.height = d->height;
+- switch (d->bpp) {
++ switch (d->bpp != 16 ? d->bpp : d->depth) {
+ case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; break;
+ #if BYTE_ORDER == BIG_ENDIAN
+ case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555X; break;
diff --git a/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch b/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch
new file mode 100644
index 0000000000..f9c725916c
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch
@@ -0,0 +1,28 @@
+diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/write-qt.c xawtv-3.95.dfsg.1/libng/plugins/write-qt.c
+--- xawtv-3.95.dfsg.1~/libng/plugins/write-qt.c 2007-08-15 16:52:45.538908656 +0200
++++ xawtv-3.95.dfsg.1/libng/plugins/write-qt.c 2007-08-15 16:54:28.400770420 +0200
+@@ -348,10 +348,10 @@
+ info[i]->name,info[i]->long_name);
+ for (j = 0; j < info[i]->num_fourccs; j++)
+ fprintf(stderr," fcc : %s\n",info[i]->fourccs[j]);
+- for (j = 0; j < info[i]->num_encoding_colormodels; j++)
++ for (j = 0; j < lqt_num_colormodels(); j++)
+ fprintf(stderr," cmodel: %d [%s]\n",
+- info[i]->encoding_colormodels[j],
+- lqt_get_colormodel_string(info[i]->encoding_colormodels[j]));
++ lqt_get_colormodel(j),
++ lqt_get_colormodel_string(j));
+ }
+
+ /* sanity checks */
+@@ -378,8 +378,8 @@
+ /* pick colormodel */
+ fmtid = VIDEO_NONE;
+ cmodel = 0;
+- for (j = 0; j < info[i]->num_encoding_colormodels; j++) {
+- cmodel = info[i]->encoding_colormodels[j];
++ for (j = 0; j < lqt_num_colormodels(); j++) {
++ cmodel = lqt_get_colormodel(j);
+ if (cmodel>= sizeof(cmodels)/sizeof(int))
+ continue;
+ if (!cmodels[cmodel])
diff --git a/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch b/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch
new file mode 100644
index 0000000000..5439aebcd6
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch
@@ -0,0 +1,64 @@
+diff -urNad xawtv-3.95.dfsg.1~/console/scantv.c xawtv-3.95.dfsg.1/console/scantv.c
+--- xawtv-3.95.dfsg.1~/console/scantv.c 2005-09-30 12:07:02.000000000 +0200
++++ xawtv-3.95.dfsg.1/console/scantv.c 2007-08-15 17:47:02.000483826 +0200
+@@ -116,6 +116,7 @@
+ "options:\n"
+ " -h print this text\n"
+ " -o outfile set output file. [%s]\n"
++ " -i input set input.\n"
+ " -n norm set tv norm.\n"
+ " -f table set frequency table.\n"
+ " -c device set video device file. [%s]\n"
+@@ -137,6 +138,7 @@
+ unsigned int f,f1,f2,fc;
+ char *name,dummy[32];
+ char *tvnorm = NULL;
++ char *tvinput = NULL;
+ char *freqtab = NULL;
+ char *outfile = NULL;
+ FILE *conf = stdout;
+@@ -144,7 +146,7 @@
+ /* parse options */
+ ng_init();
+ for (;;) {
+- if (-1 == (c = getopt(argc, argv, "hsadn:f:o:c:C:")))
++ if (-1 == (c = getopt(argc, argv, "hsadi:n:f:o:c:C:")))
+ break;
+ switch (c) {
+ case 'd':
+@@ -156,6 +158,9 @@
+ case 'a':
+ fullscan=1;
+ break;
++ case 'i':
++ tvinput = optarg;
++ break;
+ case 'n':
+ tvnorm = optarg;
+ break;
+@@ -203,12 +208,15 @@
+ attr = ng_attr_byid(attrs,ATTR_ID_NORM);
+ i = menu("please select your TV norm",attr->choices,tvnorm);
+ j = menu("please select a frequency table",chanlist_names,freqtab);
++ if (tvinput == NULL) {
++ tvinput = "Television";
++ }
+
+ fprintf(conf,"[global]\n");
+ fprintf(conf,"freqtab = %s\n",chanlist_names[j].str);
+ fprintf(conf,"\n");
+ fprintf(conf,"[defaults]\n");
+- fprintf(conf,"input = Television\n");
++ fprintf(conf,"input = %s\n", tvinput);
+ fprintf(conf,"norm = %s\n",ng_attr_getstr(attr,i));
+ fprintf(conf,"\n");
+ fflush(conf);
+@@ -220,7 +228,7 @@
+ exit(0);
+ }
+ set_defaults();
+- do_va_cmd(2,"setinput","television");
++ do_va_cmd(2,"setinput",tvinput);
+ do_va_cmd(2,"setnorm",ng_attr_getstr(attr,i));
+ do_va_cmd(2,"setfreqtab",chanlist_names[j].str);
+
diff --git a/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch b/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch
new file mode 100644
index 0000000000..0a1ba52891
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch
@@ -0,0 +1,21 @@
+diff -urNad xawtv-3.95.dfsg.1~/x11/xawtv.c xawtv-3.95.dfsg.1/x11/xawtv.c
+--- xawtv-3.95.dfsg.1~/x11/xawtv.c 2003-04-11 11:42:04.000000000 +0200
++++ xawtv-3.95.dfsg.1/x11/xawtv.c 2007-09-26 00:00:57.221442822 +0200
+@@ -1579,11 +1579,16 @@
+ main(int argc, char *argv[])
+ {
+ int i;
++ char * cut;
+ unsigned long freq;
+
+ hello_world("xawtv");
+ progname = strdup(argv[0]);
+-
++
++ /* cut off .bin from command name */
++ if ((cut = strstr(argv[0], ".bin")))
++ *cut = '\0';
++
+ /* toplevel */
+ XtSetLanguageProc(NULL,NULL,NULL);
+ app_shell = XtVaAppInitialize(&app_context, "Xawtv",
diff --git a/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch b/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch
new file mode 100644
index 0000000000..2c48aeee91
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch
@@ -0,0 +1,11 @@
+diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c
+--- xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c 2007-10-16 19:23:11.111287329 +0200
++++ xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c 2007-10-16 19:26:14.641746134 +0200
+@@ -768,6 +768,7 @@
+ /* get it */
+ memset(&buf,0,sizeof(buf));
+ buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
++ buf.memory = V4L2_MEMORY_MMAP;
+ if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0))
+ return -1;
+ h->waiton++;
diff --git a/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch b/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch
new file mode 100644
index 0000000000..c27d95c50b
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch
@@ -0,0 +1,12 @@
+diff -urNad xawtv-3.95.dfsg.1~/man/scantv.1 xawtv-3.95.dfsg.1/man/scantv.1
+--- xawtv-3.95.dfsg.1~/man/scantv.1 2003-02-14 15:14:07.000000000 +0100
++++ xawtv-3.95.dfsg.1/man/scantv.1 2007-11-24 19:13:46.097835274 +0100
+@@ -18,7 +18,7 @@
+ none is given.
+ .TP
+ .B -o outfile
+-specify \fBo\fPutput file. If none is specified, scantv write
++specify \fBo\fPutput file. If none is specified, scantv writes
+ to stdout.
+ .TP
+ .B -c device
diff --git a/recipes/xawtv/xawtv-3.95/18_glib2.patch b/recipes/xawtv/xawtv-3.95/18_glib2.patch
new file mode 100644
index 0000000000..e2a7efc2f2
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/18_glib2.patch
@@ -0,0 +1,24 @@
+diff -urNad xawtv_3.95.dfsg.1~/configure xawtv_3.95.dfsg.1/configure
+--- xawtv_3.95.dfsg.1~/configure 2005-09-30 12:10:03.000000000 +0200
++++ xawtv_3.95.dfsg.1/configure 2007-12-14 15:09:47.132603414 +0100
+@@ -5971,7 +5971,7 @@
+ echo "*** DV disabled"
+ fi
+
+-dashlglib=$(glib-config --libs 2>/dev/null)
++dashlglib=$(pkg-config glib-2.0 --libs 2>/dev/null)
+ if test "$enable_quicktime" != "no"; then
+ echo "$as_me:$LINENO: checking for lqt_query_registry in -lquicktime" >&5
+ echo $ECHO_N "checking for lqt_query_registry in -lquicktime... $ECHO_C" >&6
+diff -urNad xawtv_3.95.dfsg.1~/configure.ac xawtv_3.95.dfsg.1/configure.ac
+--- xawtv_3.95.dfsg.1~/configure.ac 2004-08-18 17:48:09.000000000 +0200
++++ xawtv_3.95.dfsg.1/configure.ac 2007-12-14 15:08:24.003866177 +0100
+@@ -223,7 +223,7 @@
+ echo "*** DV disabled"
+ fi
+
+-dashlglib=$(glib-config --libs 2>/dev/null)
++dashlglib=$(pkg-config glib-2.0 --libs 2>/dev/null)
+ if test "$enable_quicktime" != "no"; then
+ AC_CHECK_LIB(quicktime, lqt_query_registry,
+ FOUND_LQT="yes"; AC_DEFINE(HAVE_LIBQUICKTIME,1,"have libquicktime"),,
diff --git a/recipes/xawtv/xawtv-3.93/make.patch b/recipes/xawtv/xawtv-3.95/make.patch
index 481e945bea..5df8368b68 100644
--- a/recipes/xawtv/xawtv-3.93/make.patch
+++ b/recipes/xawtv/xawtv-3.95/make.patch
@@ -1,16 +1,20 @@
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/common/Subdir.mk 2003-02-14 09:14:04.000000000 -0500
-+++ xawtv-3.93/common/Subdir.mk 2004-06-08 16:50:35.382555000 -0400
+Index: xawtv-3.95/common/Subdir.mk
+===================================================================
+--- xawtv-3.95.orig/common/Subdir.mk 2003-02-14 15:14:04.000000000 +0100
++++ xawtv-3.95/common/Subdir.mk 2011-02-26 22:40:51.864893305 +0100
@@ -17,7 +17,7 @@
# RegEdit.c is good old K&R ...
common/RegEdit.o: CFLAGS += -Wno-missing-prototypes -Wno-strict-prototypes
-common/channel-no-x11.o: CFLAGS += -DNO_X11=1
-+common/channel-no-x11.o: DEFS += -DNO_X11=1
++common/channel-no-x11.o: DEFS += -DNO_X11=1
common/channel-no-x11.o: common/channel.c
@$(echo_compile_c)
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/configure.ac 2004-03-10 11:34:37.000000000 -0500
-+++ xawtv-3.93/configure.ac 2004-06-08 17:01:42.023414000 -0400
+Index: xawtv-3.95/configure.ac
+===================================================================
+--- xawtv-3.95.orig/configure.ac 2011-02-26 22:40:51.814868305 +0100
++++ xawtv-3.95/configure.ac 2011-02-26 22:40:51.864893305 +0100
@@ -150,6 +150,12 @@
ATHENA=""
FSLIB=""
@@ -24,8 +28,10 @@
AC_SUBST(X_CFLAGS)
AC_SUBST(X_PRE_LIBS)
AC_SUBST(X_EXTRA_LIBS)
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/console/Subdir.mk 2003-02-14 09:14:04.000000000 -0500
-+++ xawtv-3.93/console/Subdir.mk 2004-06-08 16:54:22.296488000 -0400
+Index: xawtv-3.95/console/Subdir.mk
+===================================================================
+--- xawtv-3.95.orig/console/Subdir.mk 2003-02-14 15:14:04.000000000 +0100
++++ xawtv-3.95/console/Subdir.mk 2011-02-26 22:44:38.017913306 +0100
@@ -84,11 +84,11 @@
console/v4l-conf : LDLIBS += $(ATHENA_LIBS)
@@ -43,8 +49,19 @@
# global targets
all:: $(TARGETS-console) $(TARGETS-v4l-conf)
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/libng/contrib-plugins/Subdir.mk 2003-02-14 09:14:05.000000000 -0500
-+++ xawtv-3.93/libng/contrib-plugins/Subdir.mk 2004-06-08 16:53:10.545928000 -0400
+@@ -96,7 +96,7 @@
+ install::
+ $(INSTALL_PROGRAM) $(TARGETS-console) $(bindir)
+ ifeq ($(FOUND_OS),linux)
+- $(INSTALL_PROGRAM) $(SUID_ROOT) $(TARGETS-v4l-conf) $(bindir)
++ $(INSTALL_PROGRAM) $(TARGETS-v4l-conf) $(bindir)
+ endif
+
+ distclean::
+Index: xawtv-3.95/libng/contrib-plugins/Subdir.mk
+===================================================================
+--- xawtv-3.95.orig/libng/contrib-plugins/Subdir.mk 2003-02-14 15:14:05.000000000 +0100
++++ xawtv-3.95/libng/contrib-plugins/Subdir.mk 2011-02-26 22:40:51.864893305 +0100
@@ -18,7 +18,7 @@
# linear-blend has mmx support ...
@@ -54,8 +71,10 @@
endif
# global targets
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/Makefile.in 2004-04-22 10:52:29.000000000 -0400
-+++ xawtv-3.93/Makefile.in 2004-06-08 17:06:40.828711000 -0400
+Index: xawtv-3.95/Makefile.in
+===================================================================
+--- xawtv-3.95.orig/Makefile.in 2004-04-22 16:52:29.000000000 +0200
++++ xawtv-3.95/Makefile.in 2011-02-26 22:40:51.864893305 +0100
@@ -28,12 +28,13 @@
# for CFLAGS
@@ -109,8 +128,10 @@
#########################################################
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/mk/Compile.mk 2003-02-14 09:14:08.000000000 -0500
-+++ xawtv-3.93/mk/Compile.mk 2004-06-08 16:53:52.030861000 -0400
+Index: xawtv-3.95/mk/Compile.mk
+===================================================================
+--- xawtv-3.95.orig/mk/Compile.mk 2003-02-14 15:14:08.000000000 +0100
++++ xawtv-3.95/mk/Compile.mk 2011-02-26 22:40:51.864893305 +0100
@@ -20,8 +20,8 @@
depfile = mk/$(subst /,_,$*).dep
depfiles = mk/*.dep
@@ -122,20 +143,24 @@
fixup_deps = sed -e "s|.*\.o:|$@:|" < $(tmpdep) > $(depfile) && rm -f $(tmpdep)
link_app = $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
---- tmp/base/xawtv-3.93-r0/xawtv-3.93/x11/Subdir.mk 2004-01-12 12:56:17.000000000 -0500
-+++ xawtv-3.93/x11/Subdir.mk 2004-06-08 16:53:36.097733000 -0400
-@@ -110,14 +110,14 @@
+Index: xawtv-3.95/x11/Subdir.mk
+===================================================================
+--- xawtv-3.95.orig/x11/Subdir.mk 2005-01-05 11:25:03.000000000 +0100
++++ xawtv-3.95/x11/Subdir.mk 2011-02-26 22:40:51.864893305 +0100
+@@ -110,15 +110,15 @@
x11/propwatch : LDLIBS += $(ATHENA_LIBS)
# linker flags
-x11/xawtv : LDFLAGS := $(DLFLAGS)
-x11/motv : LDFLAGS := $(DLFLAGS)
+-x11/mtt : LDFLAGS := $(DLFLAGS)
-x11/v4lctl : LDFLAGS := $(DLFLAGS)
-x11/pia : LDFLAGS := $(DLFLAGS)
-+x11/xawtv : LDLIBS += $(DLFLAGS)
-+x11/motv : LDLIBS += $(DLFLAGS)
-+x11/v4lctl : LDLIBS += $(DLFLAGS)
-+x11/pia : LDLIBS += $(DLFLAGS)
++x11/xawtv : LDFLAGS += $(DLFLAGS)
++x11/motv : LDFLAGS += $(DLFLAGS)
++x11/mtt : LDFLAGS += $(DLFLAGS)
++x11/v4lctl : LDFLAGS += $(DLFLAGS)
++x11/pia : LDFLAGS += $(DLFLAGS)
# compile flags
-x11/complete-xaw.o : CFLAGS += -DATHENA=1
diff --git a/recipes/xawtv/xawtv-3.95/sys_siglist.patch b/recipes/xawtv/xawtv-3.95/sys_siglist.patch
new file mode 100644
index 0000000000..f97b0bf492
--- /dev/null
+++ b/recipes/xawtv/xawtv-3.95/sys_siglist.patch
@@ -0,0 +1,47 @@
+Index: xawtv-3.95/console/fbtools.c
+===================================================================
+--- xawtv-3.95.orig/console/fbtools.c 2011-02-26 22:38:35.406698306 +0100
++++ xawtv-3.95/console/fbtools.c 2011-02-26 22:39:48.986803306 +0100
+@@ -534,6 +534,6 @@
+
+ /* cleanup */
+ fb_cleanup();
+- fprintf(stderr,"Oops: %s\n",sys_siglist[termsig]);
++ fprintf(stderr,"Oops: %s\n", strsignal(termsig));
+ exit(42);
+ }
+Index: xawtv-3.95/console/record.c
+===================================================================
+--- xawtv-3.95.orig/console/record.c 2003-04-03 12:51:00.000000000 +0200
++++ xawtv-3.95/console/record.c 2011-02-26 22:39:34.836398305 +0100
+@@ -428,7 +428,7 @@
+ {
+ if (verbose)
+ fprintf(stderr,"\n%s - exiting\n",
+- sys_siglist[signal]);
++ strsignal(signal));
+ stop = 1;
+ }
+
+Index: xawtv-3.95/x11/rootv.c
+===================================================================
+--- xawtv-3.95.orig/x11/rootv.c 2003-02-14 15:14:08.000000000 +0100
++++ xawtv-3.95/x11/rootv.c 2011-02-26 22:38:35.810233306 +0100
+@@ -133,7 +133,7 @@
+ termsig = signal;
+ if (verbose)
+ fprintf(stderr,"received signal %d [%s]\n",
+- termsig,sys_siglist[termsig]);
++ termsig, strsignal(termsig));
+ }
+
+ static void usage(FILE *fp)
+@@ -423,7 +423,7 @@
+ }
+ if (verbose && termsig)
+ fprintf(stderr,"exiting on signal %d [%s]\n",
+- termsig,sys_siglist[termsig]);
++ termsig, strsignal(termsig));
+ if (do_mute && have_mute)
+ XvSetPortAttribute(dpy,port,XV_MUTE,1);
+ XvStopVideo(dpy,port,win);
diff --git a/recipes/xawtv/xawtv_3.93.bb b/recipes/xawtv/xawtv_3.93.bb
deleted file mode 100644
index 39d4af4cb1..0000000000
--- a/recipes/xawtv/xawtv_3.93.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-LICENSE = "GPL"
-SECTION = "x11/utils"
-DESCRIPTION = "XawTV is a simple Xaw-based TV program which uses the bttw \
-driver or video4linux. It also contains various command-line utilities for \
-grabbing images and AVI movies, tuning in TV stations, etc."
-DEPENDS = "libxaw libxmu libxt libxpm libxext virtual/libx11 ncurses libxft fs jpeg"
-PR = "r1"
-
-SRC_URI = "http://dl.bytesex.org/releases/xawtv/xawtv-${PV}.tar.gz \
- file://make.patch"
-S = "${WORKDIR}/xawtv-${PV}"
-
-inherit autotools
-
-# FIXME: libXaw needs a full x11, not diet
-BROKEN = "1"
-
-EXTRA_OECONF = "--disable-xfree-ext \
- --disable-xvideo \
- --disable-lirc \
- --disable-quicktime \
- --disable-motif \
- --disable-aa \
- --disable-alsa \
- --disable-zvbi \
- --disable-gl \
- --disable-dv \
- --disable-mmx \
- --enable-xft \
- --x-includes=${STAGING_INCDIR} \
- --x-libraries=${STAGING_LIBDIR}"
-EXTRA_OEMAKE += " 'verbose=yes'"
-
-SRC_URI[md5sum] = "8d2731e6e95f173f41a0ddc875d55804"
-SRC_URI[sha256sum] = "d5e333bc74c0a534bf96f40ea89b7e700f137d46f1fdbaea13fa552ad6227af8"
diff --git a/recipes/xawtv/xawtv_3.95.bb b/recipes/xawtv/xawtv_3.95.bb
new file mode 100644
index 0000000000..3d6351c57e
--- /dev/null
+++ b/recipes/xawtv/xawtv_3.95.bb
@@ -0,0 +1,52 @@
+LICENSE = "GPL"
+SECTION = "x11/utils"
+DESCRIPTION = "XawTV is a simple Xaw-based TV program which uses the bttw \
+driver or video4linux. It also contains various command-line utilities for \
+grabbing images and AVI movies, tuning in TV stations, etc."
+DEPENDS = "alsa-lib libxaw libxmu libxt libxpm libxext virtual/libx11 ncurses libxft fs jpeg"
+PR = "r0"
+
+SRC_URI = "http://dl.bytesex.org/releases/xawtv/xawtv-${PV}.tar.gz \
+ file://01_gcc4.patch \
+ file://04_man_typo.patch \
+ file://05_man_section.patch \
+ file://07_page_size.patch \
+ file://08_oss_audio.patch \
+ file://09_audio_unmute.patch \
+ file://10_radio_fixes.patch \
+ file://11_plugins_memory_leaks.patch \
+ file://12_fbtv_radeonfb.patch \
+ file://13_libquicktime_compat.patch \
+ file://14_scantv_input_override.patch \
+ file://15_xawtv_bin_cutoff.patch \
+ file://16_xawtv_v4l2_buffer.patch \
+ file://17_scantv_man_typo.patch \
+ file://18_glib2.patch \
+ file://make.patch \
+ file://sys_siglist.patch \
+ "
+
+S = "${WORKDIR}/xawtv-${PV}"
+
+inherit autotools
+
+# FIXME: libXaw needs a full x11, not diet
+BROKEN = "1"
+
+EXTRA_OECONF = "--disable-xfree-ext \
+ --disable-xvideo \
+ --disable-lirc \
+ --disable-quicktime \
+ --disable-motif \
+ --disable-aa \
+ --disable-zvbi \
+ --disable-gl \
+ --disable-dv \
+ --disable-mmx \
+ --enable-xft \
+ --x-includes=${STAGING_INCDIR} \
+ --x-libraries=${STAGING_LIBDIR}"
+EXTRA_OEMAKE += " 'verbose=yes'"
+
+SRC_URI[md5sum] = "ad25e03f7e128b318e392cb09f52207d"
+SRC_URI[sha256sum] = "1204212c59d10df4e29a9a0ddce96cab78342859ec44bf6fd1c5f260b5c7216f"