Package-Name: xawtv
Gentoo-Package: media-tv/xawtv
Requires: XFree86|Xorg ncurses
Homepage: http://linux.bytesex.org/xawtv/
Source: http://dl.bytesex.org/releases/xawtv//(xawtv-\d+\.\d+\.tar\.gz)/[\0-\377]*?xawtv-(\d+.\d+).tar.gz $1
Zap-Before-Install: 1
Repack:
	tar xzvfp "$(SOURCE)"
Compile:
	cp -p COPYING Changes README* TODO "$(PREFIX)/"
	$(MAKE) -f ../Makefile configure CUSTOM_CFLAGS="-I/usr/include/ncurses" CONFIGURE_OPTS="--enable-xfree-ext"
	$(MAKE)
	$(MAKE) install
Install:
	# v4l-conf needs root for ioctl(VIDIOC_S_FBUF)
	chmod u+s "$(PREFIX)"/bin/v4l-conf
	$(MAKE) instbin BIN="dump-mixers fbtv motv ntsc-cc pia propwatch radio record rootv showqt showriff streamer subtitles v4l-conf v4l-info v4lctl webcam xawtv xawtv-remote"
	$(MAKE) instman SECTION=1 MAN="alevtd dump-mixers fbtv motv mtt ntsc-cc pia propwatch radio record rootv scantv showriff streamer subtitles ttv v4lctl webcam xawtv xawtv-remote"
	$(MAKE) instman SECTION=5 MAN=xawtvrc
	$(MAKE) instman SECTION=8 MAN=v4l-conf
	rm -f /usr/share/xawtv
	ln -s "$(PREFIX)"/share/xawtv /usr/share/
Patch: <<EOT
######## begin include-pathname-fix.diff
--- ../xawtv-3.95-orig/console/fs.h	2003-02-14 23:14:04 +0900
+++ console/fs.h	2007-11-25 00:59:15 +0900
@@ -1,5 +1,5 @@
 #ifndef X_DISPLAY_MISSING
-# include <FSlib.h>
+# include <X11/fonts/FSlib.h>
 
 struct fs_font {
     Font               font;
######## end include-pathname-fix.diff
######## begin yuv420p-avi.diff
--- ../xawtv-3.95-orig/libng/writefile.c	2004-12-07 02:52:42 +0900
+++ libng/writefile.c	2007-11-25 01:02:05 +0900
@@ -587,6 +587,10 @@
 	ext:   "raw",
 	fmtid: VIDEO_YUV422P,
     },{
+	name:  "420p",
+	ext:   "raw",
+	fmtid: VIDEO_YUV420P,
+    },{
 	name:  "4mpeg",
 	desc:  "yuv4mpeg (mpeg2enc >= 1.6)",
 	ext:   "yuv",
######## end yuv420p-avi.diff
EOT

/pkg/xawtv/
/usr/bin/dump-mixers
/usr/bin/fbtv
/usr/bin/motv
/usr/bin/ntsc-cc
/usr/bin/pia
/usr/bin/propwatch
/usr/bin/radio
/usr/bin/record
/usr/bin/rootv
/usr/bin/showqt
/usr/bin/showriff
/usr/bin/streamer
/usr/bin/subtitles
/usr/bin/v4l-conf
/usr/bin/v4l-info
/usr/bin/v4lctl
/usr/bin/webcam
/usr/bin/xawtv
/usr/bin/xawtv-remote
/usr/man/man1/alevtd.1.gz
/usr/man/man1/dump-mixers.1.gz
/usr/man/man1/fbtv.1.gz
/usr/man/man1/motv.1.gz
/usr/man/man1/mtt.1.gz
/usr/man/man1/ntsc-cc.1.gz
/usr/man/man1/pia.1.gz
/usr/man/man1/propwatch.1.gz
/usr/man/man1/radio.1.gz
/usr/man/man1/record.1.gz
/usr/man/man1/rootv.1.gz
/usr/man/man1/scantv.1.gz
/usr/man/man1/showriff.1.gz
/usr/man/man1/streamer.1.gz
/usr/man/man1/subtitles.1.gz
/usr/man/man1/ttv.1.gz
/usr/man/man1/v4lctl.1.gz
/usr/man/man1/webcam.1.gz
/usr/man/man1/xawtv.1.gz
/usr/man/man1/xawtv-remote.1.gz
/usr/man/man5/xawtvrc.5.gz
/usr/man/man8/v4l-conf.8.gz
/usr/share/xawtv
