summaryrefslogtreecommitdiff
path: root/multimedia/fxtv
diff options
context:
space:
mode:
authorMIHIRA Sanpei Yoshiro <sanpei@FreeBSD.org>2011-11-27 11:56:22 +0000
committerMIHIRA Sanpei Yoshiro <sanpei@FreeBSD.org>2011-11-27 11:56:22 +0000
commit991b898e7243d26367b1162dafac85d9a7a68e07 (patch)
treea9cce23d899c029642919ecc464ab757f0de6e35 /multimedia/fxtv
parent93e420afe5e0cb510cb65c366a750548a5871a21 (diff)
downloadfreebsd-ports-991b898e7243d26367b1162dafac85d9a7a68e07.zip
Re-add multimedia/fxtv and mplex
- update Mastersite - take maintainership from ports@FreeBSD.org. Feature safe: yes
Diffstat (limited to 'multimedia/fxtv')
-rw-r--r--multimedia/fxtv/Makefile45
-rw-r--r--multimedia/fxtv/files/patch-ab11
-rw-r--r--multimedia/fxtv/files/patch-ac11
-rw-r--r--multimedia/fxtv/files/patch-ad13
-rw-r--r--multimedia/fxtv/files/patch-ae11
-rw-r--r--multimedia/fxtv/files/patch-app_rsrc.h188
-rw-r--r--multimedia/fxtv/files/patch-haup__remote.c24
-rw-r--r--multimedia/fxtv/files/patch-pixelview__remote.c24
-rw-r--r--multimedia/fxtv/files/patch-tvcapture.c25
-rw-r--r--multimedia/fxtv/files/patch-tvcapture.h21
-rw-r--r--multimedia/fxtv/files/patch-tvmenu.c20
-rw-r--r--multimedia/fxtv/files/patch-tvscreen.c13
-rw-r--r--multimedia/fxtv/files/patch-videolib_videolib.c38
-rw-r--r--multimedia/fxtv/files/patch-xutil.c15
-rw-r--r--multimedia/fxtv/pkg-descr12
-rw-r--r--multimedia/fxtv/pkg-plist13
16 files changed, 484 insertions, 0 deletions
diff --git a/multimedia/fxtv/Makefile b/multimedia/fxtv/Makefile
new file mode 100644
index 000000000000..7afdf3fbdba3
--- /dev/null
+++ b/multimedia/fxtv/Makefile
@@ -0,0 +1,45 @@
+# New ports collection makefile for: fxtv
+# Date created: Thu Nov 4 19:54:04 EST 1999
+# Whom: Randall Hopper <aa8vb@nc.rr.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= fxtv
+PORTVERSION= 1.03
+PORTREVISION= 11
+CATEGORIES= multimedia
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+MASTER_SITE_SUBDIR= sanpei
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sanpei@FreeBSD.org
+COMMENT= X-based TV Display and Capture Application (for use with bt848 driver)
+
+LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
+ Xaw3d:${PORTSDIR}/x11-toolkits/Xaw3d
+
+USE_XORG= ice sm x11 xaw xext xmu xt xpm xxf86vm xxf86dga
+USE_GMAKE= yes
+MAKE_FLAGS= -e
+MAN1= fxtv.1
+
+ONLY_FOR_ARCHS= alpha i386 ia64 amd64
+
+OPTIONS= EXTRA "Extra programs required to record/playback/save" off
+
+.include <bsd.port.pre.mk>
+
+# This program does not actually require the programs below unless you
+# use audio/video recording and/or playback and save to a non-raw format.
+.if defined(WITH_EXTRA)
+RUN_DEPENDS+= sox:${PORTSDIR}/audio/sox \
+ mpg123:${PORTSDIR}/audio/mpg123 \
+ mpeg_encode:${PORTSDIR}/multimedia/mpeg_encode \
+ mplex:${PORTSDIR}/multimedia/mplex
+.endif
+
+pre-install:
+ ${CP} ${WRKSRC}/fxtv.1 ${WRKSRC}/fxtv.man
+
+.include <bsd.port.post.mk>
diff --git a/multimedia/fxtv/files/patch-ab b/multimedia/fxtv/files/patch-ab
new file mode 100644
index 000000000000..e93539ed64f2
--- /dev/null
+++ b/multimedia/fxtv/files/patch-ab
@@ -0,0 +1,11 @@
+--- Makefile.orig Tue Feb 13 09:08:59 2001
++++ Makefile Sat Mar 10 17:36:25 2001
+@@ -62,7 +62,7 @@
+ ifneq ($(DEBUG),NO)
+ override CFLAGS = -DDEBUG -g
+ else
+- override CFLAGS = -DNDEBUG -O2
++ override CFLAGS += -DNDEBUG #-O2
+ endif
+ C_WARN_FLAG = -Wall
+ override CFLAGS += $(C_WARN_FLAG) $(INC) $(CF_VERS)
diff --git a/multimedia/fxtv/files/patch-ac b/multimedia/fxtv/files/patch-ac
new file mode 100644
index 000000000000..393b25bf1dc1
--- /dev/null
+++ b/multimedia/fxtv/files/patch-ac
@@ -0,0 +1,11 @@
+--- videolib/Makefile.orig Tue Feb 13 06:04:45 2001
++++ videolib/Makefile Sat Mar 10 17:39:59 2001
+@@ -15,7 +15,7 @@
+ ifneq ($(DEBUG),NO)
+ override CFLAGS = -DDEBUG -g
+ else
+- override CFLAGS = -DNDEBUG -O2
++ override CFLAGS += -DNDEBUG #-O2
+ endif
+ C_WARN_FLAG = -Wall
+ override CFLAGS += $(C_WARN_FLAG) $(INC)
diff --git a/multimedia/fxtv/files/patch-ad b/multimedia/fxtv/files/patch-ad
new file mode 100644
index 000000000000..cecee252f3a3
--- /dev/null
+++ b/multimedia/fxtv/files/patch-ad
@@ -0,0 +1,13 @@
+--- voxware.h.orig Sat Sep 7 16:51:45 2002
++++ voxware.h Sat Sep 7 16:51:58 2002
+@@ -30,9 +30,7 @@
+ #ifndef __VOXWARE_H
+ #define __VOXWARE_H
+
+-#if defined(__FreeBSD__)
+-# include <machine/soundcard.h>
+-#elif defined(linux) || defined(__bsdi__)
++#if defined(linux) || defined(__bsdi__) || defined(__FreeBSD__)
+ # include <sys/soundcard.h>
+ #elif defined(__NetBSD__) || defined(__OpenBSD__)
+ # include <soundcard.h>
diff --git a/multimedia/fxtv/files/patch-ae b/multimedia/fxtv/files/patch-ae
new file mode 100644
index 000000000000..8bc5c1c8fb3c
--- /dev/null
+++ b/multimedia/fxtv/files/patch-ae
@@ -0,0 +1,11 @@
+--- remote.c.orig Sat Sep 7 16:54:12 2002
++++ remote.c Sat Sep 7 16:54:24 2002
+@@ -65,7 +65,7 @@
+ /* ******************** Local defines ************** */
+
+ /* FIXME: Remove this old code someday */
+-#ifdef 0
++#if 0
+ # define OLD_DEV_SYSMOUSE_STUFF
+ #endif
+
diff --git a/multimedia/fxtv/files/patch-app_rsrc.h b/multimedia/fxtv/files/patch-app_rsrc.h
new file mode 100644
index 000000000000..275df30b01ea
--- /dev/null
+++ b/multimedia/fxtv/files/patch-app_rsrc.h
@@ -0,0 +1,188 @@
+--- app_rsrc.h.orig 2001-02-12 22:17:53.000000000 +0100
++++ app_rsrc.h
+@@ -525,96 +525,95 @@ static XtResource Resources[] = {
+ };
+
+
+-#define OPTION_HELP_STR "\
+- BSD X TV (fxtv), Version " VERS_STR ".
+- Written by Randall Hopper
+-
+-Please mail Fxtv and Bt848 driver-related comments and help requests to the
+-multimedia@freebsd.org list. Feel free to subscribe and contribute
+-(listserv: majordomo@freebsd.org).
+-
+-Available options:
+-
+--driverDefaults - Use appearance parms from driver on startup
+--colorbars - Turn on colorbar display (for testing)
+--hue [-90...90] - Initial Hue ; def=0
+--brightness [-50..50] - Initial Brightness (%); def=0
+--contrast [0..200] - Initial Contrast (%); def=100
+--satU [0..200] - U Saturation (%); def=100
+--satV [0..284] - V Saturation (%); def=100
+--aspectlock - Enable 4:3 aspect lock on video window
+-
+--deviceNumber <#> - bktr/tuner device numbers; def=0
+--inputFormat <fmt> - Tuner signal input format (ntsc,ntscm,ntscj,
+- palbdghi,pal,palm,paln,secam,palncomb,rsvd)
+-
+--tunerMode [cable|antenna] - Tuner Mode
+--defaultInput <input> - Startup tuner signal input
+- [tuner|video|svideo|csvideo|dev3]
+--defaultAudioInput <input> - Startup TV card audio input
+- [tuner|external|internal|auto]
+--defaultChannel <#> - Startup Channel Number
+--cableStationList <...> - List of cable station presets (see rsrc file)
+--antennaStationList <...> - List of antenna station presets
+--cableFreqSet <freqset> - Freq set for cable (def = cableirc)
+- [nabcst|cableirc|cablehrc|weurope|jpnbcst|
+- jpncable|xussr|australia|france]
+--antennaFreqSet <freqset> - Freq set for antenna (def = nabcst)
+-
+--noAudio - Suppress playing audio through soundcard
+--dspDevice - Override default DSP device (def=/dev/dsp)
+--mixerDevice - Override default mixer device (def=/dev/mixer)
+--mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video)
+-
+--stationInWinTitle - Display station text in window title
+--stationInWinIcon - Display station text in window icon
+-
+--stationAnnotFont <fontpat> - Font pattern for station annot (see rsrc file)
+--stationAnnotColor <color> - Color for station annot
+--stationAnnotDelay <msec> - How long to display (0 = never; -1 = always)
+--stationAnnotIDOnly - Display station ID alone (when available)
+-
+--tunerModeAnnot{Font,Color,Delay}
+--inputDevAnnot{Font,Color,Delay}
+--volumeDevAnnot{Font,Color,Delay}
+--muteDevAnnot{Font,Color,Delay}
+- - Other annotation options (see stationAnnot)
+-
+--remoteType - Type of attached remote control
+- [None|X10|Hauppauge|PixelView]
+-
+--recCmdMpeg2 - MPEG-2 Audio record command
+--recCmdMpeg3 - MPEG-3 Audio record command
+--playCmdMpeg2 - MPEG-2 Audio play command
+--playCmdMpeg3 - MPEG-3 Audio play command
+-
+--videoCnvtScript - Video conversion workhorse script for vid encod.
+-
+--bswap2Bpp - Byte/word swap options for direct video
+--nobswap2Bpp (used to match driver's pixel format with
+--bswap3Bpp the video card's)
+--nobswap3Bpp
+--bswap4Bpp 2Bpp - 15/16-bpp modes
+--nobswap4Bpp 3Bpp - packed 24bpp modes
+--bwwap4Bpp 4Bpp - unpacked 24bpp modes
+--nowswap4Bpp
+-
+--Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode
+--Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode
+-
+--videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to
+- use for video capture; spreads load across disks
+-
+--noafc - Disable AFC
+--disableDirectV - Disable DMA transfers straight to video card
+--debug <area> - Debug Msgs
+- {startup,driver,subproc,events,video,frame}
+--help - Display program options
+-
+-NOTE: All command line options are accessible as X resources as well.
+- The X resources have the same names as the command-line options.
+- See the sample Fxtv class resource file for details.
+-"
++#define OPTION_HELP_STR \
++" BSD X TV (fxtv), Version " VERS_STR ".\n" \
++" Written by Randall Hopper\n" \
++"\n" \
++"Please mail Fxtv and Bt848 driver-related comments and help requests to the\n" \
++"multimedia@freebsd.org list. Feel free to subscribe and contribute\n" \
++"(listserv: majordomo@freebsd.org).\n" \
++"\n" \
++"Available options:\n" \
++"\n" \
++"-driverDefaults - Use appearance parms from driver on startup\n" \
++"-colorbars - Turn on colorbar display (for testing)\n" \
++"-hue [-90...90] - Initial Hue ; def=0\n" \
++"-brightness [-50..50] - Initial Brightness (%); def=0\n" \
++"-contrast [0..200] - Initial Contrast (%); def=100\n" \
++"-satU [0..200] - U Saturation (%); def=100\n" \
++"-satV [0..284] - V Saturation (%); def=100\n" \
++"-aspectlock - Enable 4:3 aspect lock on video window\n" \
++"\n" \
++"-deviceNumber <#> - bktr/tuner device numbers; def=0\n" \
++"-inputFormat <fmt> - Tuner signal input format (ntsc,ntscm,ntscj,\n" \
++" palbdghi,pal,palm,paln,secam,palncomb,rsvd)\n" \
++"\n" \
++"-tunerMode [cable|antenna] - Tuner Mode\n" \
++"-defaultInput <input> - Startup tuner signal input\n" \
++" [tuner|video|svideo|csvideo|dev3]\n" \
++"-defaultAudioInput <input> - Startup TV card audio input\n" \
++" [tuner|external|internal|auto]\n" \
++"-defaultChannel <#> - Startup Channel Number\n" \
++"-cableStationList <...> - List of cable station presets (see rsrc file)\n" \
++"-antennaStationList <...> - List of antenna station presets\n" \
++"-cableFreqSet <freqset> - Freq set for cable (def = cableirc)\n" \
++" [nabcst|cableirc|cablehrc|weurope|jpnbcst|\n" \
++" jpncable|xussr|australia|france]\n" \
++"-antennaFreqSet <freqset> - Freq set for antenna (def = nabcst)\n" \
++"\n" \
++"-noAudio - Suppress playing audio through soundcard\n" \
++"-dspDevice - Override default DSP device (def=/dev/dsp)\n" \
++"-mixerDevice - Override default mixer device (def=/dev/mixer)\n" \
++"-mixerChannel - Audio mixer (line,line1/2/3,cd,mic,video)\n" \
++"\n" \
++"-stationInWinTitle - Display station text in window title\n" \
++"-stationInWinIcon - Display station text in window icon\n" \
++"\n" \
++"-stationAnnotFont <fontpat> - Font pattern for station annot (see rsrc file)\n" \
++"-stationAnnotColor <color> - Color for station annot\n" \
++"-stationAnnotDelay <msec> - How long to display (0 = never; -1 = always)\n" \
++"-stationAnnotIDOnly - Display station ID alone (when available)\n" \
++"\n" \
++"-tunerModeAnnot{Font,Color,Delay}\n" \
++"-inputDevAnnot{Font,Color,Delay}\n" \
++"-volumeDevAnnot{Font,Color,Delay}\n" \
++"-muteDevAnnot{Font,Color,Delay}\n" \
++" - Other annotation options (see stationAnnot)\n" \
++"\n" \
++"-remoteType - Type of attached remote control\n" \
++" [None|X10|Hauppauge|PixelView]\n" \
++"\n" \
++"-recCmdMpeg2 - MPEG-2 Audio record command\n" \
++"-recCmdMpeg3 - MPEG-3 Audio record command\n" \
++"-playCmdMpeg2 - MPEG-2 Audio play command\n" \
++"-playCmdMpeg3 - MPEG-3 Audio play command\n" \
++"\n" \
++"-videoCnvtScript - Video conversion workhorse script for vid encod.\n" \
++"\n" \
++"-bswap2Bpp - Byte/word swap options for direct video\n" \
++"-nobswap2Bpp (used to match driver's pixel format with\n" \
++"-bswap3Bpp the video card's)\n" \
++"-nobswap3Bpp\n" \
++"-bswap4Bpp 2Bpp - 15/16-bpp modes\n" \
++"-nobswap4Bpp 3Bpp - packed 24bpp modes\n" \
++"-bwwap4Bpp 4Bpp - unpacked 24bpp modes\n" \
++"-nowswap4Bpp\n" \
++"\n" \
++"-Bpp24bit [3|4] - Set frame buffer Bytes-per-pixel for 24bpp mode\n" \
++"-Bpp32bit [3|4] - Set frame buffer Bytes-per-pixel for 32bpp mode\n" \
++"\n" \
++"-videoCapFile[1-4] - Optional paths (0-4) to scratch file paths to\n" \
++" use for video capture; spreads load across disks\n" \
++"\n" \
++"-noafc - Disable AFC\n" \
++"-disableDirectV - Disable DMA transfers straight to video card\n" \
++"-debug <area> - Debug Msgs\n" \
++" {startup,driver,subproc,events,video,frame}\n" \
++"-help - Display program options\n" \
++"\n" \
++"NOTE: All command line options are accessible as X resources as well.\n" \
++" The X resources have the same names as the command-line options.\n" \
++" See the sample Fxtv class resource file for details.\n"
+
+ static String fallback_resources[] = {
+ /*"Fxtv.geometry: +10+10",*/
diff --git a/multimedia/fxtv/files/patch-haup__remote.c b/multimedia/fxtv/files/patch-haup__remote.c
new file mode 100644
index 000000000000..198567f1b7e5
--- /dev/null
+++ b/multimedia/fxtv/files/patch-haup__remote.c
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- haup_remote.c.orig
++++ haup_remote.c
+@@ -38,9 +38,16 @@
+ #include <sys/fcntl.h>
+ #ifdef __NetBSD__
+ # include <dev/ic/bt8xx.h>
++#endif
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#if __FreeBSD_version > 500000
++#include <dev/bktr/ioctl_meteor.h>
++#include <dev/bktr/ioctl_bt848.h>
+ #else
+-# include <machine/ioctl_meteor.h>
+-# include <machine/ioctl_bt848.h>
++#include <machine/ioctl_bt848.h>
++#include <machine/ioctl_meteor.h>
++#endif
+ #endif
+ #include "haup_remote.h"
+
diff --git a/multimedia/fxtv/files/patch-pixelview__remote.c b/multimedia/fxtv/files/patch-pixelview__remote.c
new file mode 100644
index 000000000000..a6be8213c55b
--- /dev/null
+++ b/multimedia/fxtv/files/patch-pixelview__remote.c
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- pixelview_remote.c.orig
++++ pixelview_remote.c
+@@ -39,9 +39,16 @@
+ #include <sys/fcntl.h>
+ #ifdef __NetBSD__
+ # include <dev/ic/bt8xx.h>
++#endif
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#if __FreeBSD_version > 500000
++#include <dev/bktr/ioctl_bt848.h>
++#include <dev/bktr/ioctl_meteor.h>
+ #else
+-# include <machine/ioctl_meteor.h>
+-# include <machine/ioctl_bt848.h>
++#include <machine/ioctl_meteor.h>
++#include <machine/ioctl_bt848.h>
++#endif
+ #endif
+ #include "pixelview_remote.h"
+
diff --git a/multimedia/fxtv/files/patch-tvcapture.c b/multimedia/fxtv/files/patch-tvcapture.c
new file mode 100644
index 000000000000..5d9e182246aa
--- /dev/null
+++ b/multimedia/fxtv/files/patch-tvcapture.c
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- tvcapture.c.orig
++++ tvcapture.c
+@@ -34,11 +34,18 @@
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <sys/types.h>
+ #include <sys/mman.h>
+ #ifdef __NetBSD__
+ # include <dev/ic/bt8xx.h>
++#endif
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#if __FreeBSD_version > 500000
++#include <dev/bktr/ioctl_bt848.h>
+ #else
+-# include <machine/ioctl_bt848.h>
++#include <machine/ioctl_bt848.h>
++#endif
+ #endif
+ #include <signal.h>
+ #include <sys/ioctl.h>
diff --git a/multimedia/fxtv/files/patch-tvcapture.h b/multimedia/fxtv/files/patch-tvcapture.h
new file mode 100644
index 000000000000..43044afb32a6
--- /dev/null
+++ b/multimedia/fxtv/files/patch-tvcapture.h
@@ -0,0 +1,21 @@
+
+$FreeBSD$
+
+--- tvcapture.h.orig
++++ tvcapture.h
+@@ -34,8 +34,14 @@
+ #include <X11/Intrinsic.h>
+ #ifdef __NetBSD__
+ # include <dev/ic/bt8xx.h>
++#endif
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#if __FreeBSD_version > 500000
++#include <dev/bktr/ioctl_meteor.h>
+ #else
+-# include <machine/ioctl_meteor.h>
++#include <machine/ioctl_meteor.h>
++#endif
+ #endif
+ #include "tvtypes.h"
+
diff --git a/multimedia/fxtv/files/patch-tvmenu.c b/multimedia/fxtv/files/patch-tvmenu.c
new file mode 100644
index 000000000000..d21ff995ded8
--- /dev/null
+++ b/multimedia/fxtv/files/patch-tvmenu.c
@@ -0,0 +1,20 @@
+--- tvmenu.c.orig Mon Feb 12 22:19:33 2001
++++ tvmenu.c Sun Nov 27 01:55:24 2005
+@@ -552,7 +552,7 @@
+ Widget popup_win, new_popup_item = NULL;
+ Cardinal num_children, i;
+ WidgetList children;
+- String actual_station, temp_station;
++ String actual_station = NULL, temp_station = NULL;
+ #ifdef FIXME
+ Pixmap pix;
+ #endif
+@@ -589,7 +589,7 @@
+
+ XtVaSetValues(children[i], XtNleftBitmap, pix, NULL);
+ #else
+- if ( strcmp( actual_station, temp_station ) == 0 )
++ if ( strcmp( actual_station==NULL ? "" : actual_station, temp_station==NULL ? "" : temp_station ) == 0 )
+ new_popup_item = children[i];
+ #endif
+ }
diff --git a/multimedia/fxtv/files/patch-tvscreen.c b/multimedia/fxtv/files/patch-tvscreen.c
new file mode 100644
index 000000000000..d9637b830f7f
--- /dev/null
+++ b/multimedia/fxtv/files/patch-tvscreen.c
@@ -0,0 +1,13 @@
+--- tvscreen.c.ORI Sun May 21 15:49:47 2000
++++ tvscreen.c Wed Jun 7 10:19:30 2006
+@@ -480,6 +480,9 @@
+ dga_avail = FALSE;
+
+ #ifdef HAVE_XFREE86
++ if ( App_res.disable_direct_v )
++ SUPRINTF(( "Will not init DGA since -disableDirectV was given.\n" ));
++ else
+ if ( !XUTILXServerIsLocal( TVDISPLAY ) )
+ SUPRINTF(( "XF86DGA not available...X Server isn't local.\n" ));
+ else {
+
diff --git a/multimedia/fxtv/files/patch-videolib_videolib.c b/multimedia/fxtv/files/patch-videolib_videolib.c
new file mode 100644
index 000000000000..4da6856d39c8
--- /dev/null
+++ b/multimedia/fxtv/files/patch-videolib_videolib.c
@@ -0,0 +1,38 @@
+--- videolib/videolib.c.orig 1999-11-03 03:22:04.000000000 +0100
++++ videolib/videolib.c 2007-09-05 18:31:05.000000000 +0200
+@@ -479,9 +479,8 @@
+ *(p++) = (*src16 >> 8) | (*src16 << 8);
+ src16++;
+ }
+- for ( i = dst_line_pad; i > 0; i-- )
+- *(((VL_UINT8 *)p)++) = 0x00;
+- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
++ memset(p, 0, dst_line_pad);
++ dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+ }
+
+ src16 = dst_line = (VL_UINT16 *) dst->buf;
+@@ -513,9 +512,9 @@
+ if ( src_padded )
+ src16 = (VL_UINT16 *)( (VL_UINT8 *)src16 + dst_line_pad );
+ else
+- for ( i = dst_line_pad; i > 0; i-- )
+- *(((VL_UINT8 *)dst)++) = 0x00;
+- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
++ memset(dst, 0, dst_line_pad);
++ dst += dst_line_pad / sizeof(VL_IMAGE);
++ dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+ }
+
+ if ( !dst_swap_b ) { /* More ugliness */
+@@ -527,8 +526,8 @@
+ *(p++) = (*src16 >> 8) | (*src16 << 8);
+ src16++;
+ }
+- (VL_UINT8 *)dst_line += dst->geom.bytes_per_line;
+- (VL_UINT8 *)src16 += dst->geom.bytes_per_line;
++ dst_line += dst->geom.bytes_per_line / sizeof(VL_UINT16);
++ src16 += dst->geom.bytes_per_line / sizeof(VL_UINT16);
+ }
+ }
+ }
diff --git a/multimedia/fxtv/files/patch-xutil.c b/multimedia/fxtv/files/patch-xutil.c
new file mode 100644
index 000000000000..ae4b0a06c6fc
--- /dev/null
+++ b/multimedia/fxtv/files/patch-xutil.c
@@ -0,0 +1,15 @@
+--- ./xutil.c.orig Fri Nov 5 09:38:54 1999
++++ ./xutil.c Tue Oct 9 03:41:54 2007
+@@ -1500,8 +1500,10 @@
+ /**********************************************************************/
+
+ vinfo_pref.screen = screen;
+- visual = XGetVisualInfo( display, VisualScreenMask, &vinfo_pref,
+- &num_visuals );
++ vinfo_pref.depth = DefaultDepth( display, screen );
++ visual = XGetVisualInfo( display,
++ VisualScreenMask | VisualDepthMask,
++ &vinfo_pref, &num_visuals );
+ if ( num_visuals == 0 ) {
+ fprintf( stderr, "XGetVisualInfo() says no visuals available!\n" );
+ exit(1);
diff --git a/multimedia/fxtv/pkg-descr b/multimedia/fxtv/pkg-descr
new file mode 100644
index 000000000000..d15f1ede0b28
--- /dev/null
+++ b/multimedia/fxtv/pkg-descr
@@ -0,0 +1,12 @@
+Fxtv is an X11-based FreeBSD app that provides TV-in-a-window and
+image/audio/video capture capabilities for Brooktree Bt848/849/878/879
+and Pinnacle PCTV tuner/capture cards.
+
+To use this app, you need a capture card supported by the bktr(4) driver.
+Examples include the Hauppauge Wincast/TV, the STB TV PCI, and the
+Intel Smart Video Recorder III. See the 'bktr' man page
+for more information.
+
+Refer to the README for details on usage.
+
+WWW: http://people.FreeBSD.org/~rhh/fxtv/
diff --git a/multimedia/fxtv/pkg-plist b/multimedia/fxtv/pkg-plist
new file mode 100644
index 000000000000..22e59c47f156
--- /dev/null
+++ b/multimedia/fxtv/pkg-plist
@@ -0,0 +1,13 @@
+bin/fxtv
+lib/X11/app-defaults/Fxtv
+lib/X11/fxtv/README
+lib/X11/fxtv/bitmaps/mini-camera.xpm
+lib/X11/fxtv/bitmaps/mini-down.xbm
+lib/X11/fxtv/bitmaps/mini-resize.xpm
+lib/X11/fxtv/bitmaps/mini-sound.xbm
+lib/X11/fxtv/bitmaps/mini-up.xbm
+lib/X11/fxtv/bitmaps/radio_off.xbm
+lib/X11/fxtv/bitmaps/radio_on.xbm
+lib/X11/fxtv/fxtv_cnvt.sh
+@dirrm lib/X11/fxtv/bitmaps
+@dirrm lib/X11/fxtv