aboutsummaryrefslogtreecommitdiff
path: root/multimedia/nxtvepg/files
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-10-06 01:50:23 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-10-06 01:50:23 +0000
commitf38ff5f695ef5b56ebdfb77a1410afd426ef1593 (patch)
treebea2b127639c048a0b436655b6ed08f7f7ca3a2f /multimedia/nxtvepg/files
parent9d359e41974d6c38d77d5caec3c43a72293704a1 (diff)
downloadports-f38ff5f695ef5b56ebdfb77a1410afd426ef1593.tar.gz
ports-f38ff5f695ef5b56ebdfb77a1410afd426ef1593.zip
Notes
Diffstat (limited to 'multimedia/nxtvepg/files')
-rw-r--r--multimedia/nxtvepg/files/patch-Makefile105
-rw-r--r--multimedia/nxtvepg/files/patch-epgctl::debug.h11
-rw-r--r--multimedia/nxtvepg/files/patch-epgdb::epgnetio.c11
-rw-r--r--multimedia/nxtvepg/files/patch-epgui::menucmd.c11
-rw-r--r--multimedia/nxtvepg/files/patch-epgvbi::btdrv4linux.c153
-rw-r--r--multimedia/nxtvepg/files/patch-tcl2c.c19
6 files changed, 310 insertions, 0 deletions
diff --git a/multimedia/nxtvepg/files/patch-Makefile b/multimedia/nxtvepg/files/patch-Makefile
new file mode 100644
index 000000000000..d9651c5abdf2
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-Makefile
@@ -0,0 +1,105 @@
+--- Makefile.orig Sun Dec 8 21:18:25 2002
++++ Makefile Wed Jan 8 00:31:16 2003
+@@ -32,12 +32,24 @@
+ include Makefile.win32
+ else
+
++ifndef X11BASE
++ X11BASE=/usr/X11R6
++endif
++
++ifndef LOCALBASE
++ LOCALBASE=/usr/local
++endif
++
++ifndef PREFIX
++ PREFIX=$(X11BASE)
++endif
++
+ ROOT =
+-prefix = /usr/local
++prefix = $(PREFIX)
+ exec_prefix = ${prefix}
+ bindir = $(ROOT)${exec_prefix}/bin
+ mandir = $(ROOT)${prefix}/man/man1
+-resdir = $(ROOT)/usr/X11R6/lib/X11
++resdir = $(ROOT)$(X11BASE)/lib/X11
+
+ # 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 @@
+ # 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
+-#USER_DBDIR = .nxtvdb
+-#DEFS += -DEPG_DB_ENV=\"HOME\" -DEPG_DB_DIR=\"$(USER_DBDIR)\"
++USER_DBDIR = .nxtvdb
++DEFS += -DEPG_DB_ENV=\"HOME\" -DEPG_DB_DIR=\"$(USER_DBDIR)\"
+ ifndef USER_DBDIR
+-SYS_DBDIR = /usr/tmp/nxtvdb
++SYS_DBDIR = /var/tmp/nxtvdb
+ 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
+
diff --git a/multimedia/nxtvepg/files/patch-epgctl::debug.h b/multimedia/nxtvepg/files/patch-epgctl::debug.h
new file mode 100644
index 000000000000..496eb72eb01d
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-epgctl::debug.h
@@ -0,0 +1,11 @@
+--- 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
diff --git a/multimedia/nxtvepg/files/patch-epgdb::epgnetio.c b/multimedia/nxtvepg/files/patch-epgdb::epgnetio.c
new file mode 100644
index 000000000000..ecdbc06caadb
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-epgdb::epgnetio.c
@@ -0,0 +1,11 @@
+--- 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
+
diff --git a/multimedia/nxtvepg/files/patch-epgui::menucmd.c b/multimedia/nxtvepg/files/patch-epgui::menucmd.c
new file mode 100644
index 000000000000..b75ea9b94194
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-epgui::menucmd.c
@@ -0,0 +1,11 @@
+--- 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
diff --git a/multimedia/nxtvepg/files/patch-epgvbi::btdrv4linux.c b/multimedia/nxtvepg/files/patch-epgvbi::btdrv4linux.c
new file mode 100644
index 000000000000..59f258bf5a75
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-epgvbi::btdrv4linux.c
@@ -0,0 +1,153 @@
+--- 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 @@
+ int result=FALSE;
+ int c;
+ int close_fd=0;
+-
++
+ 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;
diff --git a/multimedia/nxtvepg/files/patch-tcl2c.c b/multimedia/nxtvepg/files/patch-tcl2c.c
new file mode 100644
index 000000000000..52f2eb3497fc
--- /dev/null
+++ b/multimedia/nxtvepg/files/patch-tcl2c.c
@@ -0,0 +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 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <time.h>
+ #include <errno.h>
+
+ #define FALSE 0
+@@ -123,6 +124,8 @@
+ scriptName = malloc(fileNameLen + 1);
+ strncpy(outNameC, argv[1], fileNameLen - 4);
+ strncpy(outNameH, argv[1], fileNameLen - 4);
++ outNameC[fileNameLen-4]=0;
++ outNameH[fileNameLen-4]=0;
+ baseName = (char *)strrchr(argv[1], '/');
+ if (baseName != NULL)
+ {