Submitted by:	maintainer via ports@ list
Reviewed by:
Approved by:
Obtained from:
MFC after:
Upgrade nxtvepg to 2.6.0, contains new features since last version:

o Implemented reminders
o Added weekday scale to the right of the programme list
o Added new programme list attribute type "weekday color"
o Added an expire time filter to the filter menu

Some more feature improvements too, please refer to:

	http://nxtvepg.sourceforge.net/changelog.html
This commit is contained in:
Foxfair Hu 2003-10-22 03:06:21 +00:00
parent ea655c60f0
commit c6c24e03c7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=91861
10 changed files with 77 additions and 260 deletions

View file

@ -6,25 +6,33 @@
#
PORTNAME= nxtvepg
PORTVERSION= 2.4.2
CATEGORIES= multimedia tcl83 tk83
PORTVERSION= 2.6.0
CATEGORIES= multimedia tcl84 tk84
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=${PORTNAME}
MAINTAINER= barner@gmx.de
COMMENT= Viewer for Nextview Electronic TV Programme Guide (needs bktr driver)
LIB_DEPENDS= tk83.1:${PORTSDIR}/x11-toolkits/tk83
LIB_DEPENDS= tk84.1:${PORTSDIR}/x11-toolkits/tk84
USE_GMAKE= yes
USE_XLIB= yes
USE_X_PREFIX= yes
MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
MAN1= nxtvepg.1
PORTDOCS= README TODO CHANGES manual.html
.include <bsd.port.pre.mk>
pre-everything::
.if ${OSVERSION} < 500000
ONLY_FOR_ARCHS= i386
.else
ONLY_FOR_ARCHS= alpha i386 ia64
.endif
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/nxtvepg ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/Nxtvepg.ad ${PREFIX}/lib/X11/app-defaults/Nxtvepg

View file

@ -1 +1 @@
MD5 (nxtvepg-2.4.2.tar.gz) = f711308b4e81c8bc1d2384b2d98d45d9
MD5 (nxtvepg-2.6.0.tar.gz) = 9d7efd6b19f95274c002f19b92bcd9da

View file

@ -1,7 +1,7 @@
--- Makefile.orig Sun Dec 8 21:18:25 2002
+++ Makefile Wed Jan 8 00:31:16 2003
@@ -32,12 +32,24 @@
include Makefile.win32
--- Makefile.orig Thu Oct 9 21:09:22 2003
+++ Makefile Tue Oct 21 12:57:04 2003
@@ -43,12 +43,24 @@
include Makefile.bsd
else
+ifndef X11BASE
@ -27,38 +27,7 @@
# if you have perl set the path here, else just leave it alone
PERL = /usr/bin/perl
@@ -45,22 +57,25 @@
# select Tcl/Tk version
TCL_VER = 8.3
-LDLIBS = -ltk$(TCL_VER) -ltcl$(TCL_VER) -L/usr/X11R6/lib -lX11 -lXmu -lm -ldl
+LDLIBS = -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/tcl83 -L$(LOCALBASE)/lib/tk83\
+ -ltk83 -ltcl83 -L$(X11BASE)/lib -lX11 -lXmu -lm
# use static libraries for debugging only
#LDLIBS += -Ldbglib -static
-INCS += -I. -I/usr/X11R6/include
+INCS += -I. -I$(X11BASE)/include -I$(LOCALBASE)/include/tcl8.3\
+ -I$(LOCALBASE)/include/tk8.3 -I $(LOCALBASE)//include
+
# path to Tcl/Tk headers, if not properly installed
#INCS += -I/usr/local/tcl/tcl8.0/generic -I/usr/local/tcl/tk8.0/generic
# path to Tcl/Tk script library (Tk is usually in X11/lib/tk#.#)
-DEFS += -DTK_LIBRARY_PATH=\"/usr/lib/tk$(TCL_VER)\"
-DEFS += -DTCL_LIBRARY_PATH=\"/usr/lib/tcl$(TCL_VER)\"
+DEFS += -DTK_LIBRARY_PATH=\"$(LOCALBASE)/lib/tk$(TCL_VER)\"
+DEFS += -DTCL_LIBRARY_PATH=\"$(LOCALBASE)/lib/tcl$(TCL_VER)\"
# enable use of multi-threading
DEFS += -DUSE_THREADS
-LDLIBS += -lpthread
+LDLIBS += -pthread
# enable use of daemon and client/server connection
DEFS += -DUSE_DAEMON
@@ -68,10 +83,10 @@
@@ -92,10 +104,10 @@
# The database directory can be either in the user's $HOME (or relative to any
# other env variable) or at a global place like /var/spool (world-writable)
# -> uncomment 2 lines below to put the databases in the user's home
@ -72,34 +41,3 @@
DEFS += -DEPG_DB_DIR=\"$(SYS_DBDIR)\"
INST_DB_DIR = $(ROOT)$(SYS_DBDIR)
INST_DB_PERM = 0777
@@ -79,8 +94,8 @@
WARN = -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
#WARN += -Wpointer-arith -Werror
-CC = gcc
-CFLAGS = -pipe $(WARN) $(INCS) $(DEFS) -O6
+CC ?= gcc
+CFLAGS += -pipe $(WARN) $(INCS) $(DEFS)
#LDLIBS += -pg
# ----- don't change anything below ------------------------------------------
@@ -109,18 +124,7 @@
nxtvepg: $(OBJS)
$(CC) $(LDFLAGS) -o nxtvepg $(OBJS) $(LDLIBS)
-install: nxtvepg nxtvepg.1 Nxtvepg.ad
- test -d $(bindir) || mkdirhier $(bindir)
- test -d $(mandir) || mkdirhier $(mandir)
- test -d $(resdir) || mkdirhier $(resdir)
-ifndef USER_DBDIR
- test -d $(INST_DB_DIR) || mkdirhier $(INST_DB_DIR)
- chmod $(INST_DB_PERM) $(INST_DB_DIR)
-endif
- install -c -m 0755 nxtvepg $(bindir)
- install -c -m 0644 nxtvepg.1 $(mandir)
- install -c -m 0644 Nxtvepg.ad $(resdir)/app-defaults/Nxtvepg
- rm -f $(mandir)/nxtvepg.1x
+install:
.SUFFIXES: .c .o .tcl

View file

@ -0,0 +1,46 @@
--- Makefile.bsd.orig Mon Apr 21 00:10:22 2003
+++ Makefile.bsd Tue Oct 21 15:10:24 2003
@@ -46,17 +46,20 @@
# other settings
# On FreeBSD there is only a modified tclsh with a message to launch
# tclsh8.3 or tclsh8.4 , so this is hardcoded here
-TCL_VER = 8.3
+TCL_VER = 8.4
LDLIBS = -L$(LOCALBASE)/lib\
-L$(X11BASE)/lib\
- -ltk83 -ltcl83 -lX11 -lXmu -lm
+ -ltk84 -ltcl84 -lX11 -lXmu -lm
INCS += -I$(LOCALBASE)/include/tcl$(TCL_VER)\
-I$(LOCALBASE)/include/tk$(TCL_VER)
-WANT_THREADS = 1 # uncomment to force process based implementation
-
-PTHREAD = -pthread
+WANT_THREADS = 1 # comment out to force process based implementation
+ifeq ($(OS), FreeBSD)
+PTHREAD = $(PTHREAD_LIBS)
+else
+PTHREAD = -pthread
+endif
### Common part for all UN*X variants ###
@@ -77,7 +80,7 @@
endif
# other settings
-OPTFLAGS = -O6 -pipe -g
+OPTFLAGS = -O -pipe -g
# use static libraries for debugging only
#LDLIBS += -Ldbglib -static
@@ -143,7 +146,7 @@
$(ECHO) " system db dir: $(SYS_DBDIR)"
endif
ifdef WANT_THREADS
- $(ECHO) " Concurrency implementation based on: threads"
+ $(ECHO) " Concurrency implementation based on: threads (using $(PTHREAD))"
else
$(ECHO) " Concurrency implementation based on: processes"
endif

View file

@ -1,11 +0,0 @@
--- epgctl/debug.h.orig Tue Sep 17 17:23:00 2002
+++ epgctl/debug.h Sun Jan 5 23:11:30 2003
@@ -207,7 +207,7 @@
#define xmalloc(SIZE) chk_malloc((SIZE),__FILE__,__LINE__)
#define xfree(PTR) chk_free(PTR)
#else
-#include <malloc.h>
+#include <stdlib.h>
void * xmalloc( size_t size );
#define xfree(PTR) free(PTR)
#endif

View file

@ -1,11 +0,0 @@
--- epgdb/epgnetio.c.orig Sun Nov 17 19:14:32 2002
+++ epgdb/epgnetio.c Sun Jan 5 23:43:08 2003
@@ -65,7 +65,7 @@
#include "epgdb/epgdbsav.h"
#include "epgdb/epgnetio.h"
-#if defined(linux) || defined(__NetBSD__)
+#if defined(linux) || defined(__NetBSD__) || defined(__FreeBSD__)
#define HAVE_GETADDRINFO
#endif

View file

@ -1,11 +0,0 @@
--- epgui/menucmd.c.orig Sat Nov 30 14:46:44 2002
+++ epgui/menucmd.c Sun Jan 5 23:41:49 2003
@@ -2312,7 +2312,7 @@
}
else
{
- #ifdef __NetBSD__
+ #if defined(__NetBSD__) || defined(__FreeBSD__)
// On NetBSD BtDriver_GetCardName fetches its data from a struct which is filled here
BtDriver_ScanDevices(TRUE);
#endif

View file

@ -1,140 +1,6 @@
--- epgvbi/btdrv4linux.c.orig Mon Nov 25 20:30:52 2002
+++ epgvbi/btdrv4linux.c Mon Jan 6 16:01:47 2003
@@ -195,25 +195,26 @@
switch (j) {
case 0: //i map 0 to tuner
input_id=METEOR_DEV1;
- input_name ="tuner";
+ input_name = "tuner";
break;
case 1:
input_id=METEOR_DEV0;
- input_name="video";
+ input_name = "video";
break;
case 2:
input_id=METEOR_DEV_SVIDEO;
- input_name="svideo";
+ input_name = "svideo";
break;
case 3:
input_id=METEOR_DEV2;
- input_name ="csvideo";
+ input_name = "csvideo";
break;
}
+
if (ioctl(fd,METEORSINPUT,&input_id)==0) {
- pVbiBuf->tv_cards[i].inputs[j].inputID=input_id;
+ pVbiBuf->tv_cards[i].inputs[j].inputID=input_id;
pVbiBuf->tv_cards[i].inputs[j].isTuner=(input_id==METEOR_DEV1);
- strncpy((char*)pVbiBuf->tv_cards[i].inputs[j].name,input_name, DEV_MAX_NAME_LEN);
+ strncpy((char*)pVbiBuf->tv_cards[i].inputs[j].name,input_name, 20);
pVbiBuf->tv_cards[i].inputs[j].isAvailable=1;
}
else
@@ -354,6 +355,14 @@
#else // __NetBSD__ || __FreeBSD__
if (tuner_fd != -1)
{
+ // unmute tuner
+ int mute_arg = AUDIO_UNMUTE;
+ if (ioctl (tuner_fd, BT848_SAUDIO, &mute_arg) == 0) {
+ dprintf0("Unmuting tuner.\n");
+ }
+ else
+ SystemErrorMessage_Set(&pSysErrorText, errno, "unmuting the tuner (ioctl AUDIO_UNMUTE)", NULL);
+
close(tuner_fd);
tuner_fd = -1;
}
@@ -433,17 +442,20 @@
int cardIndex = pVbiBuf->cardIndex;
// XXX TODO: need to set TV norm
-
- if ((cardIndex<MAX_CARDS) && (inputIdx<MAX_INPUTS))
- if (pVbiBuf->tv_cards[cardIndex].isAvailable)
- if (!pVbiBuf->tv_cards[cardIndex].isBusy)
- if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isAvailable) {
- result=TRUE;
- pVbiBuf->inputIndex=inputIdx;
- if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isTuner)
- *pIsTuner=TRUE;
-
- }
+ if ((cardIndex<MAX_CARDS) && (inputIdx<MAX_INPUTS)) {
+ if (pVbiBuf->tv_cards[cardIndex].isAvailable) {
+ if (!pVbiBuf->tv_cards[cardIndex].isBusy) {
+ if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isAvailable) {
+ result=TRUE;
+ pVbiBuf->inputIndex=inputIdx;
+ if (pVbiBuf->tv_cards[cardIndex].inputs[inputIdx].isTuner) {
+ *pIsTuner=TRUE;
+ }
+
+ }
+ }
+ }
+ }
return result;
#endif
@@ -522,17 +534,27 @@
{
if (tuner_fd == -1)
{
+ int mute_arg = AUDIO_MUTE;
assert(devKeptOpen == FALSE);
if (!pVbiBuf->tv_cards[pVbiBuf->cardIndex].isBusy) {
sprintf(devName, TUNERNAME "%u", pVbiBuf->cardIndex);
tuner_fd = open(devName, O_RDONLY);
- if (tuner_fd == -1)
+ if (tuner_fd == -1) {
SystemErrorMessage_Set(&pSysErrorText, errno, "open tuner device ", devName, ": ", NULL);
+ }
else
dprintf1("BtDriver-TuneChannel: opened tuner device, fd=%d\n", tuner_fd);
}
else
SystemErrorMessage_Set(&pSysErrorText, 0, "tuner device ", devName, " is busy (-> close other video apps)", NULL);
+
+ // mute tuner
+ if (ioctl (tuner_fd, BT848_SAUDIO, &mute_arg) == 0) {
+ dprintf0("Muting tuner.\n");
+ }
+ else
+ SystemErrorMessage_Set(&pSysErrorText, errno, "muting the tuner (ioctl AUDIO_UNMUTE)", NULL);
+
}
if (tuner_fd != -1)
{
@@ -553,6 +575,7 @@
}
else
devKeptOpen = TRUE;
+
}
}
}
@@ -1180,9 +1203,14 @@
uint line;
#if defined(__NetBSD__) || defined(__FreeBSD__)
- // wait 10 seconds for the read to complete. After this time, close
+ // wait 180 seconds for the read to complete. After this time, close
// dev/vbi in the signal handler, avoiding endless blocking
- alarm(10);
+
+ // Changed to 180 because of channel gap at my tv provider: [Simon]
+ // E2 E3 ... E12 <huge gap> S2 ... S?
+ //
+ // Otherwisely, the application exits with an alarm during the gap
+ alarm(180);
#endif
stat = read(vbi_fdin, rawbuf, bufSize);
@@ -1232,7 +1260,7 @@
--- epgvbi/btdrv4linux.c.orig Thu Oct 9 21:18:17 2003
+++ epgvbi/btdrv4linux.c Tue Oct 21 13:04:23 2003
@@ -1520,7 +1520,7 @@
int result=FALSE;
int c;
int close_fd=0;
@ -143,11 +9,3 @@
width=100;
height=100;
geo.rows = height;
@@ -1319,6 +1347,7 @@
}
ioctl(tuner_fd, TVTUNER_SETTYPE, &c);
+
if (close_fd) {
close(tuner_fd);
tuner_fd=-1;

View file

@ -1,19 +1,19 @@
--- tcl2c.c.orig Sun Nov 3 04:15:11 2002
+++ tcl2c.c Sun Oct 5 18:45:58 2003
@@ -43,6 +43,7 @@
--- tcl2c.c.orig Tue Sep 23 21:49:35 2003
+++ tcl2c.c Tue Oct 21 13:14:35 2003
@@ -50,6 +50,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <time.h>
#include <errno.h>
#define FALSE 0
@@ -123,6 +124,8 @@
#include <time.h>
#include <ctype.h>
@@ -429,6 +430,8 @@
scriptName = malloc(fileNameLen + 1);
strncpy(outNameC, argv[1], fileNameLen - 4);
strncpy(outNameH, argv[1], fileNameLen - 4);
strncpy(outNameC, inFileName, fileNameLen - 4);
strncpy(outNameH, inFileName, fileNameLen - 4);
+ outNameC[fileNameLen-4]=0;
+ outNameH[fileNameLen-4]=0;
baseName = (char *)strrchr(argv[1], '/');
baseName = (char *)strrchr(inFileName, '/');
if (baseName != NULL)
{

View file

@ -19,6 +19,6 @@ to use nxtvepg.
It is recommended to check the card's setup before using nxtvepg, e.g. with the
following applications from the ports collection:
graphic/fxtv for tv tuner and misc/alevtv for Teletext support.
multimedia/fxtv for tv tuner and misc/alevtv for Teletext support.
WWW: http://nxtvepg.sourceforge.net/