Skip site navigation (1)Skip section navigation (2)
Date:      Wed,  8 Jan 2003 02:01:48 +0100 (CET)
From:      Simon Barner <barner@in.tum.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46847: new port: multimedia/nxtvepg (electronic tv programme guide, bktr)
Message-ID:  <20030108010148.5F0AD20FD1@kiste.foo.bar>

next in thread | raw e-mail | index | archive | help

>Number:         46847
>Category:       ports
>Synopsis:       new port: multimedia/nxtvepg (electronic tv programme guide, bktr)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 07 17:10:03 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Simon Barner
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD kiste.foo.bar 4.7-STABLE FreeBSD 4.7-STABLE #0: Sun Nov 24 15:24:21 CET 2002 simon@kiste.foo.bar:/usr/src/sys/compile/KISTE i386


	AMD K6-400, 192 mb
	
>Description:
	This is a new port for nxtvepg, an electronic tv programme guide that
	extracts its information from special teletext signals.
	
	The programming will need a working tv tuner card that is supported by the
	bktr(4) driver.
	
>How-To-Repeat:
	
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nxtvepg
#	nxtvepg/files
#	nxtvepg/files/patch-Makefile
#	nxtvepg/files/patch-epgctl-debug.h
#	nxtvepg/files/patch-epgdb-epgnetio.c
#	nxtvepg/files/patch-epgui-menucmd.c
#	nxtvepg/files/patch-epgvbi-btdrv4linux.c
#	nxtvepg/files/patch-tcl2c.c
#	nxtvepg/pkg-descr
#	nxtvepg/pkg-comment
#	nxtvepg/distinfo
#	nxtvepg/Makefile
#	nxtvepg/pkg-plist
#
echo c - nxtvepg
mkdir -p nxtvepg > /dev/null 2>&1
echo c - nxtvepg/files
mkdir -p nxtvepg/files > /dev/null 2>&1
echo x - nxtvepg/files/patch-Makefile
sed 's/^X//' >nxtvepg/files/patch-Makefile << 'END-of-nxtvepg/files/patch-Makefile'
X--- Makefile.orig	Sun Dec  8 21:18:25 2002
X+++ Makefile	Wed Jan  8 00:31:16 2003
X@@ -32,12 +32,24 @@
X include Makefile.win32
X else
X 
X+ifndef X11BASE
X+  X11BASE=/usr/X11R6
X+endif
X+
X+ifndef LOCALBASE
X+  LOCALBASE=/usr/local
X+endif
X+
X+ifndef PREFIX
X+  PREFIX=$(X11BASE)
X+endif
X+
X ROOT    =
X-prefix  = /usr/local
X+prefix  = $(PREFIX)
X exec_prefix = ${prefix}
X bindir  = $(ROOT)${exec_prefix}/bin
X mandir  = $(ROOT)${prefix}/man/man1
X-resdir  = $(ROOT)/usr/X11R6/lib/X11
X+resdir  = $(ROOT)$(X11BASE)/lib/X11
X 
X # if you have perl set the path here, else just leave it alone
X PERL    = /usr/bin/perl
X@@ -45,22 +57,25 @@
X # select Tcl/Tk version
X TCL_VER = 8.3
X 
X-LDLIBS  = -ltk$(TCL_VER) -ltcl$(TCL_VER) -L/usr/X11R6/lib -lX11 -lXmu -lm -ldl
X+LDLIBS  = -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/tcl83 -L$(LOCALBASE)/lib/tk83\
X+          -ltk83 -ltcl83 -L$(X11BASE)/lib -lX11 -lXmu -lm
X 
X # use static libraries for debugging only
X #LDLIBS += -Ldbglib -static
X 
X-INCS   += -I. -I/usr/X11R6/include
X+INCS   += -I. -I$(X11BASE)/include -I$(LOCALBASE)/include/tcl8.3\
X+              -I$(LOCALBASE)/include/tk8.3 -I $(LOCALBASE)//include
X+	      
X # path to Tcl/Tk headers, if not properly installed
X #INCS   += -I/usr/local/tcl/tcl8.0/generic -I/usr/local/tcl/tk8.0/generic
X 
X # path to Tcl/Tk script library (Tk is usually in X11/lib/tk#.#)
X-DEFS   += -DTK_LIBRARY_PATH=\"/usr/lib/tk$(TCL_VER)\"
X-DEFS   += -DTCL_LIBRARY_PATH=\"/usr/lib/tcl$(TCL_VER)\"
X+DEFS   += -DTK_LIBRARY_PATH=\"$(LOCALBASE)/lib/tk$(TCL_VER)\"
X+DEFS   += -DTCL_LIBRARY_PATH=\"$(LOCALBASE)/lib/tcl$(TCL_VER)\"
X 
X # enable use of multi-threading
X DEFS   += -DUSE_THREADS
X-LDLIBS += -lpthread
X+LDLIBS += -pthread
X 
X # enable use of daemon and client/server connection
X DEFS   += -DUSE_DAEMON
X@@ -68,10 +83,10 @@
X # The database directory can be either in the user's $HOME (or relative to any
X # other env variable) or at a global place like /var/spool (world-writable)
X # -> uncomment 2 lines below to put the databases in the user's home
X-#USER_DBDIR  = .nxtvdb
X-#DEFS       += -DEPG_DB_ENV=\"HOME\" -DEPG_DB_DIR=\"$(USER_DBDIR)\"
X+USER_DBDIR  = .nxtvdb
X+DEFS       += -DEPG_DB_ENV=\"HOME\" -DEPG_DB_DIR=\"$(USER_DBDIR)\"
X ifndef USER_DBDIR
X-SYS_DBDIR    = /usr/tmp/nxtvdb
X+SYS_DBDIR    = /var/tmp/nxtvdb
X DEFS        += -DEPG_DB_DIR=\"$(SYS_DBDIR)\"
X INST_DB_DIR  = $(ROOT)$(SYS_DBDIR)
X INST_DB_PERM = 0777
X@@ -79,8 +94,8 @@
X 
X WARN    = -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
X #WARN  += -Wpointer-arith -Werror
X-CC      = gcc
X-CFLAGS  = -pipe $(WARN) $(INCS) $(DEFS) -O6
X+CC      ?= gcc
X+CFLAGS  += -pipe $(WARN) $(INCS) $(DEFS)
X #LDLIBS += -pg
X 
X # ----- don't change anything below ------------------------------------------
X@@ -109,18 +124,7 @@
X nxtvepg: $(OBJS)
X 	$(CC) $(LDFLAGS) -o nxtvepg $(OBJS) $(LDLIBS)
X 
X-install: nxtvepg nxtvepg.1 Nxtvepg.ad
X-	test -d $(bindir) || mkdirhier $(bindir)
X-	test -d $(mandir) || mkdirhier $(mandir)
X-	test -d $(resdir) || mkdirhier $(resdir)
X-ifndef USER_DBDIR
X-	test -d $(INST_DB_DIR) || mkdirhier $(INST_DB_DIR)
X-	chmod $(INST_DB_PERM) $(INST_DB_DIR)
X-endif
X-	install -c -m 0755 nxtvepg     $(bindir)
X-	install -c -m 0644 nxtvepg.1   $(mandir)
X-	install -c -m 0644 Nxtvepg.ad  $(resdir)/app-defaults/Nxtvepg
X-	rm -f $(mandir)/nxtvepg.1x
X+install:
X 
X .SUFFIXES: .c .o .tcl
X 
END-of-nxtvepg/files/patch-Makefile
echo x - nxtvepg/files/patch-epgctl-debug.h
sed 's/^X//' >nxtvepg/files/patch-epgctl-debug.h << 'END-of-nxtvepg/files/patch-epgctl-debug.h'
X--- epgctl/debug.h.orig	Tue Sep 17 17:23:00 2002
X+++ epgctl/debug.h	Sun Jan  5 23:11:30 2003
X@@ -207,7 +207,7 @@
X #define xmalloc(SIZE)  chk_malloc((SIZE),__FILE__,__LINE__)
X #define xfree(PTR)     chk_free(PTR)
X #else
X-#include <malloc.h>
X+#include <stdlib.h>
X void * xmalloc( size_t size );
X #define xfree(PTR)     free(PTR)
X #endif
END-of-nxtvepg/files/patch-epgctl-debug.h
echo x - nxtvepg/files/patch-epgdb-epgnetio.c
sed 's/^X//' >nxtvepg/files/patch-epgdb-epgnetio.c << 'END-of-nxtvepg/files/patch-epgdb-epgnetio.c'
X--- epgdb/epgnetio.c.orig	Sun Nov 17 19:14:32 2002
X+++ epgdb/epgnetio.c	Sun Jan  5 23:43:08 2003
X@@ -65,7 +65,7 @@
X #include "epgdb/epgdbsav.h"
X #include "epgdb/epgnetio.h"
X 
X-#if defined(linux) || defined(__NetBSD__)
X+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
X #define HAVE_GETADDRINFO
X #endif
X 
END-of-nxtvepg/files/patch-epgdb-epgnetio.c
echo x - nxtvepg/files/patch-epgui-menucmd.c
sed 's/^X//' >nxtvepg/files/patch-epgui-menucmd.c << 'END-of-nxtvepg/files/patch-epgui-menucmd.c'
X--- epgui/menucmd.c.orig	Sat Nov 30 14:46:44 2002
X+++ epgui/menucmd.c	Sun Jan  5 23:41:49 2003
X@@ -2312,7 +2312,7 @@
X    }
X    else
X    {
X-      #ifdef __NetBSD__
X+      #if defined(__NetBSD__) || defined(__FreeBSD__)
X       // On NetBSD BtDriver_GetCardName fetches its data from a struct which is filled here
X       BtDriver_ScanDevices(TRUE);
X       #endif
END-of-nxtvepg/files/patch-epgui-menucmd.c
echo x - nxtvepg/files/patch-epgvbi-btdrv4linux.c
sed 's/^X//' >nxtvepg/files/patch-epgvbi-btdrv4linux.c << 'END-of-nxtvepg/files/patch-epgvbi-btdrv4linux.c'
X--- epgvbi/btdrv4linux.c.orig	Mon Nov 25 20:30:52 2002
X+++ epgvbi/btdrv4linux.c	Mon Jan  6 16:01:47 2003
X@@ -195,25 +195,26 @@
X         switch (j) {
X         case 0: //i map 0 to tuner
X           input_id=METEOR_DEV1;
X-          input_name ="tuner";
X+          input_name = "tuner";
X           break;
X         case 1:
X           input_id=METEOR_DEV0;
X-          input_name="video";
X+          input_name = "video";
X           break;
X         case 2:
X           input_id=METEOR_DEV_SVIDEO;
X-          input_name="svideo";
X+          input_name = "svideo";
X           break;
X         case 3:
X           input_id=METEOR_DEV2;
X-          input_name ="csvideo";
X+          input_name = "csvideo";
X           break;
X         }
X+		
X         if (ioctl(fd,METEORSINPUT,&input_id)==0) {
X-          pVbiBuf->tv_cards[i].inputs[j].inputID=input_id;
X+	      pVbiBuf->tv_cards[i].inputs[j].inputID=input_id;
X           pVbiBuf->tv_cards[i].inputs[j].isTuner=(input_id==METEOR_DEV1);
X-          strncpy((char*)pVbiBuf->tv_cards[i].inputs[j].name,input_name, DEV_MAX_NAME_LEN);
X+          strncpy((char*)pVbiBuf->tv_cards[i].inputs[j].name,input_name, 20);
X           pVbiBuf->tv_cards[i].inputs[j].isAvailable=1;
X         }
X         else
X@@ -354,6 +355,14 @@
X    #else //  __NetBSD__ || __FreeBSD__
X    if (tuner_fd != -1)
X    {
X+      // unmute tuner
X+      int mute_arg = AUDIO_UNMUTE;
X+      if (ioctl (tuner_fd, BT848_SAUDIO, &mute_arg) == 0) {
X+         dprintf0("Unmuting tuner.\n");
X+      }
X+      else 
X+         SystemErrorMessage_Set(&pSysErrorText, errno, "unmuting the tuner (ioctl AUDIO_UNMUTE)", NULL);
X+
X       close(tuner_fd);
X       tuner_fd = -1;
X    }
X@@ -433,17 +442,20 @@
X    int cardIndex = pVbiBuf->cardIndex;
X 
X    // XXX TODO: need to set TV norm
X-
X-   if ((cardIndex<MAX_CARDS) && (inputIdx<MAX_INPUTS))
X-     if (pVbiBuf->tv_cards[cardIndex].isAvailable)
X-       if (!pVbiBuf->tv_cards[cardIndex].isBusy)
X-         if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isAvailable) {
X-           result=TRUE;
X-           pVbiBuf->inputIndex=inputIdx;
X-           if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isTuner)
X-             *pIsTuner=TRUE;
X-
X-         }
X+	if ((cardIndex<MAX_CARDS) && (inputIdx<MAX_INPUTS)) {
X+		if (pVbiBuf->tv_cards[cardIndex].isAvailable) {
X+			if (!pVbiBuf->tv_cards[cardIndex].isBusy) {
X+				if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isAvailable) {
X+					result=TRUE;
X+					pVbiBuf->inputIndex=inputIdx;
X+					if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isTuner) {
X+						*pIsTuner=TRUE;
X+					}
X+
X+				}
X+			}
X+		}
X+	}
X 
X    return result;
X #endif
X@@ -522,17 +534,27 @@
X       {
X          if (tuner_fd == -1)
X          {
X+           int mute_arg = AUDIO_MUTE;
X            assert(devKeptOpen == FALSE);
X            if (!pVbiBuf->tv_cards[pVbiBuf->cardIndex].isBusy) {
X              sprintf(devName, TUNERNAME "%u", pVbiBuf->cardIndex);
X              tuner_fd = open(devName, O_RDONLY);
X-             if (tuner_fd == -1)
X+             if (tuner_fd == -1) {
X                SystemErrorMessage_Set(&pSysErrorText, errno, "open tuner device  ", devName, ": ", NULL);
X+			  }
X              else
X                dprintf1("BtDriver-TuneChannel: opened tuner device, fd=%d\n", tuner_fd);
X            }
X            else
X              SystemErrorMessage_Set(&pSysErrorText, 0, "tuner device ", devName, " is busy (-> close other video apps)", NULL);
X+
X+           // mute tuner
X+           if (ioctl (tuner_fd, BT848_SAUDIO, &mute_arg) == 0) {
X+              dprintf0("Muting tuner.\n");
X+           }
X+           else
X+              SystemErrorMessage_Set(&pSysErrorText, errno, "muting the tuner (ioctl AUDIO_UNMUTE)", NULL);
X+
X          }
X          if (tuner_fd != -1)
X          {
X@@ -553,6 +575,7 @@
X             }
X             else
X                devKeptOpen = TRUE;
X+			   
X          }
X       }
X    }
X@@ -1180,9 +1203,14 @@
X    uint  line;
X 
X    #if defined(__NetBSD__) || defined(__FreeBSD__)
X-   // wait 10 seconds for the read to complete. After this time, close
X+   // wait 180 seconds for the read to complete. After this time, close
X    // dev/vbi in the signal handler, avoiding endless blocking
X-   alarm(10);
X+   
X+   // Changed to 180 because of channel gap at my tv provider: [Simon]
X+   // E2 E3 ... E12 <huge gap> S2 ... S?
X+   //
X+   // Otherwisely, the application exits with an alarm during the gap
X+   alarm(180);
X    #endif
X 
X    stat = read(vbi_fdin, rawbuf, bufSize);
X@@ -1232,7 +1260,7 @@
X   int result=FALSE;
X   int c;
X   int close_fd=0;
X-
X+  
X   width=100;
X   height=100;
X   geo.rows = height;
X@@ -1319,6 +1347,7 @@
X     }
X 
X     ioctl(tuner_fd, TVTUNER_SETTYPE, &c);
X+
X     if (close_fd) {
X       close(tuner_fd);
X       tuner_fd=-1;
END-of-nxtvepg/files/patch-epgvbi-btdrv4linux.c
echo x - nxtvepg/files/patch-tcl2c.c
sed 's/^X//' >nxtvepg/files/patch-tcl2c.c << 'END-of-nxtvepg/files/patch-tcl2c.c'
X--- tcl2c.c.orig	Sun Nov  3 13:15:11 2002
X+++ tcl2c.c	Sun Jan  5 23:11:30 2003
X@@ -43,6 +43,7 @@
X 
X #include <stdlib.h>
X #include <stdio.h>
X+#include <time.h>
X #include <errno.h>
X 
X #define FALSE 0
END-of-nxtvepg/files/patch-tcl2c.c
echo x - nxtvepg/pkg-descr
sed 's/^X//' >nxtvepg/pkg-descr << 'END-of-nxtvepg/pkg-descr'
Xnxtvepg - Decoder, Browser and Analyzer for the Nextview
X          Electronic Programme Guide
X
Xnxtvepg is an X11 application to decode, analyze and browse TV programme
Xschedules transmitted on analog TV channels as defined in ETS 300 707:
X"Protocol for a TV Guide using electronic data transmission" by the European
XTelecommunications Standards Institute.
X
Xnxtvepg enables you to obtain free TV programme listings for all of the major
Xnetworks in Germany, Austria, France and Switzerland.
X
XCurrently Nextview EPG is transmitted by the following TV networks (note that
Xeach of these EPGs cover not only the provider's programme but also that of many
Xother networks): Kabel1, 3Sat, RTL-II (Germany and Austria), SF1, TSR1, TSI1,
XEuroNews (Switzerland), Canal+, M6 (France), TRT-1 (Turkey).
X
XYou will need a bktr(4) compatible tv tuner card with teletext support in order
Xto use nxtvepg.
X
XIt is recommended to check the card's setup before using nxtvepg, e.g. with the
Xfollowing applications from the ports collection:
Xgraphic/fxtv for tv tuner and misc/alevtv for Teletext support.
X
XWWW: http://nxtvepg.sourceforge.net/
END-of-nxtvepg/pkg-descr
echo x - nxtvepg/pkg-comment
sed 's/^X//' >nxtvepg/pkg-comment << 'END-of-nxtvepg/pkg-comment'
XViewer for Nextview Electronic TV Programme Guide (needs bktr driver)
END-of-nxtvepg/pkg-comment
echo x - nxtvepg/distinfo
sed 's/^X//' >nxtvepg/distinfo << 'END-of-nxtvepg/distinfo'
XMD5 (nxtvepg-2.4.2.tar.gz) = f711308b4e81c8bc1d2384b2d98d45d9
END-of-nxtvepg/distinfo
echo x - nxtvepg/Makefile
sed 's/^X//' >nxtvepg/Makefile << 'END-of-nxtvepg/Makefile'
X# New ports collection makefile for:	nxtvepg-2.4.2
X# Date created:		07 Jan 2003
X# Whom:			Simon Barner <barner@gmx.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	nxtvepg
XPORTVERSION=	2.4.2
XCATEGORIES=	multimedia
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=${PORTNAME}
X
XMAINTAINER=	Simon Barner <barner@gmx.de>
X
XLIB_DEPENDS=	tk83.1:${PORTSDIR}/x11-toolkits/tk83
X
XUSE_GMAKE=	yes
XUSE_XLIB=	yes
XUSE_X_PREFIX=	yes
X
XMAN1=		nxtvepg.1
XPORTDOCS=	README TODO CHANGES manual.html
X
X.include <bsd.port.pre.mk>
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/nxtvepg ${PREFIX}/bin
X	${INSTALL_DATA}    ${WRKSRC}/Nxtvepg.ad ${PREFIX}/lib/X11/app-defaults/Nxtvepg
X	${INSTALL_MAN}     ${WRKSRC}/nxtvepg.1 ${PREFIX}/man/man1
X
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X.for file in ${PORTDOCS}
X	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.post.mk>
END-of-nxtvepg/Makefile
echo x - nxtvepg/pkg-plist
sed 's/^X//' >nxtvepg/pkg-plist << 'END-of-nxtvepg/pkg-plist'
Xbin/nxtvepg
Xlib/X11/app-defaults/Nxtvepg
X%%PORTDOCS%%share/doc/nxtvepg/README
X%%PORTDOCS%%share/doc/nxtvepg/TODO
X%%PORTDOCS%%share/doc/nxtvepg/CHANGES
X%%PORTDOCS%%share/doc/nxtvepg/manual.html
X@dirrm share/doc/nxtvepg
X@dirrm share/doc
END-of-nxtvepg/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030108010148.5F0AD20FD1>