diff options
Diffstat (limited to 'multimedia/tvheadend/files')
-rw-r--r-- | multimedia/tvheadend/files/patch-src__capmt.c | 69 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src__main.c | 16 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src__rawtsinput.c | 14 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src__trap.c | 18 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src__tvhtime.h | 11 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-src__v4l.c | 20 | ||||
-rw-r--r-- | multimedia/tvheadend/files/patch-support__posix.mk | 20 | ||||
-rw-r--r-- | multimedia/tvheadend/files/tvheadend.in | 26 |
8 files changed, 17 insertions, 177 deletions
diff --git a/multimedia/tvheadend/files/patch-src__capmt.c b/multimedia/tvheadend/files/patch-src__capmt.c deleted file mode 100644 index 2915a2f21575..000000000000 --- a/multimedia/tvheadend/files/patch-src__capmt.c +++ /dev/null @@ -1,69 +0,0 @@ ---- src/capmt.c.orig 2013-06-02 11:30:50.000000000 +0200 -+++ src/capmt.c 2013-06-02 11:35:53.395592208 +0200 -@@ -33,10 +33,10 @@ - #include <sys/un.h> - #include <netdb.h> - #include <netinet/in.h> --#include <linux/ioctl.h> - #include <linux/dvb/ca.h> - #include <fcntl.h> - -+#include "config.h" - #include "tvheadend.h" - #include "dvb/dvb.h" - #include "tcp.h" -@@ -53,6 +53,12 @@ - #include "ffdecsa/FFdecsa.h" - #endif - -+#if defined(PLATFORM_LINUX) -+#include <linux/ioctl.h> -+#elif defined(PLATFORM_FREEBSD) -+#include <sys/ioccom.h> -+#endif -+ - // ca_pmt_list_management values: - #define CAPMT_LIST_MORE 0x00 // append a 'MORE' CAPMT object the list and start receiving the next object - #define CAPMT_LIST_FIRST 0x01 // clear the list when a 'FIRST' CAPMT object is received, and start receiving the next object -@@ -75,8 +81,10 @@ - #define CW_DUMP(buf, len, format, ...) \ - printf(format, __VA_ARGS__); int j; for (j = 0; j < len; ++j) printf("%02X ", buf[j]); printf("\n"); - -+#ifdef PLATFORM_LINUX - #ifdef __GNUC__ - #include <features.h> -+#endif - #if __GNUC_PREREQ(4, 3) - #pragma GCC diagnostic ignored "-Warray-bounds" - #endif -@@ -405,7 +413,7 @@ - capmt_service_t *ct; - service_t *t; - int ret, bufsize; -- int *request; -+ long *request; - ca_descr_t *ca; - ca_pid_t *cpd; - int process_key, process_next, cai; -@@ -476,10 +484,10 @@ - // parsing data - if (capmt->capmt_oscam) { - cai = i; -- request = (int *) &buffer; -+ request = (long *) &buffer; - if (*request == CA_SET_PID) { - cpd = (ca_pid_t *)&buffer[sizeof(int)]; -- tvhlog(LOG_DEBUG, "capmt", "CA_SET_PID cai %d req %d (%d %04x)", cai, *request, cpd->index, cpd->pid); -+ tvhlog(LOG_DEBUG, "capmt", "CA_SET_PID cai %d req %ld (%d %04x)", cai, *request, cpd->index, cpd->pid); - - if (cpd->index >=0 && cpd->index < MAX_INDEX) { - ca_info[cai][cpd->index][0] = (cpd->pid >> 0) & 0xff; -@@ -490,7 +498,7 @@ - tvhlog(LOG_ERR, "capmt", "Invalid index %d in CA_SET_PID (%d) for ca id %d", cpd->index, MAX_INDEX, cai); - } else if (*request == CA_SET_DESCR) { - ca = (ca_descr_t *)&buffer[sizeof(int)]; -- tvhlog(LOG_DEBUG, "capmt", "CA_SET_DESCR cai %d req %d par %d idx %d %02x%02x%02x%02x%02x%02x%02x%02x", cai, *request, ca->parity, ca->index, ca->cw[0], ca->cw[1], ca->cw[2], ca->cw[3], ca->cw[4], ca->cw[5], ca->cw[6], ca->cw[7]); -+ tvhlog(LOG_DEBUG, "capmt", "CA_SET_DESCR cai %d req %ld par %d idx %d %02x%02x%02x%02x%02x%02x%02x%02x", cai, *request, ca->parity, ca->index, ca->cw[0], ca->cw[1], ca->cw[2], ca->cw[3], ca->cw[4], ca->cw[5], ca->cw[6], ca->cw[7]); - if (ca->index == -1) // skipping removal request - continue; - diff --git a/multimedia/tvheadend/files/patch-src__main.c b/multimedia/tvheadend/files/patch-src__main.c deleted file mode 100644 index 898d77528777..000000000000 --- a/multimedia/tvheadend/files/patch-src__main.c +++ /dev/null @@ -1,16 +0,0 @@ ---- src/main.c.orig 2013-07-14 13:20:52.000000000 +0200 -+++ src/main.c 2013-07-15 08:18:16.497236179 +0200 -@@ -901,8 +901,13 @@ - snprintf(path, sizeof(path), "/sys/class/%s/device/speed", dev); - - if(readlinefromfile(path, l, sizeof(l))) { -+#if defined(PLATFORM_FREEBSD) -+ // Assume USB2.0 on FreeBSD because there are no supported PCI devices -+ return HOSTCONNECTION_USB480; -+#else - // Unable to read speed, assume it's PCI - return HOSTCONNECTION_PCI; -+#endif - } else { - speed = atoi(l); - diff --git a/multimedia/tvheadend/files/patch-src__rawtsinput.c b/multimedia/tvheadend/files/patch-src__rawtsinput.c deleted file mode 100644 index 878be595601a..000000000000 --- a/multimedia/tvheadend/files/patch-src__rawtsinput.c +++ /dev/null @@ -1,14 +0,0 @@ ---- src/rawtsinput.c.orig 2013-04-18 16:23:19.000000000 +0200 -+++ src/rawtsinput.c 2013-04-23 13:12:48.224810259 +0200 -@@ -276,7 +276,11 @@ - slp.tv_sec = d / 1000000; - slp.tv_nsec = (d % 1000000) * 1000; - -+#ifdef clock_nanosleep - clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &slp, NULL); -+#else -+ nanosleep(&slp, NULL); -+#endif - didsleep = 1; - } - t->s_pcr_last = pcr; diff --git a/multimedia/tvheadend/files/patch-src__trap.c b/multimedia/tvheadend/files/patch-src__trap.c deleted file mode 100644 index 6031c49d7a79..000000000000 --- a/multimedia/tvheadend/files/patch-src__trap.c +++ /dev/null @@ -1,18 +0,0 @@ ---- src/trap.c.orig 2013-07-26 18:17:22.000000000 +0200 -+++ src/trap.c 2013-09-01 16:07:04.247691694 +0200 -@@ -33,6 +33,7 @@ - #include <limits.h> - #if ENABLE_EXECINFO - #include <execinfo.h> -+#include <dlfcn.h> - #endif - #include <stdio.h> - #include <stdarg.h> -@@ -47,6 +48,7 @@ - - #define MAXFRAMES 100 - -+extern char **environ; - static char line1[200]; - static char tmpbuf[1024]; - static char libs[1024]; diff --git a/multimedia/tvheadend/files/patch-src__tvhtime.h b/multimedia/tvheadend/files/patch-src__tvhtime.h deleted file mode 100644 index 5f09bc311486..000000000000 --- a/multimedia/tvheadend/files/patch-src__tvhtime.h +++ /dev/null @@ -1,11 +0,0 @@ ---- src/tvhtime.h.orig 2013-07-26 16:17:22.000000000 +0000 -+++ src/tvhtime.h 2014-04-22 12:26:51.000000000 +0000 -@@ -18,7 +18,7 @@ - */ - - #ifndef __TVH_TIME_H__ --#define __TVH_TIME_H_ -+#define __TVH_TIME_H__ - - extern uint32_t tvhtime_update_enabled; - extern uint32_t tvhtime_ntp_enabled; diff --git a/multimedia/tvheadend/files/patch-src__v4l.c b/multimedia/tvheadend/files/patch-src__v4l.c deleted file mode 100644 index 2a09024f3ff5..000000000000 --- a/multimedia/tvheadend/files/patch-src__v4l.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src/v4l.c.orig 2012-11-07 11:46:15.000000000 +0100 -+++ src/v4l.c 2012-12-19 21:55:37.554141683 +0100 -@@ -458,7 +458,7 @@ - "%s: Standard #%d: %016llx %s, frameperiod: %d/%d, %d lines", - path, - standard.index, -- standard.id, -+ (long long unsigned int)standard.id, - standard.name, - standard.frameperiod.numerator, - standard.frameperiod.denominator, -@@ -499,7 +499,7 @@ - type, - input.audioset, - input.tuner, -- input.std, -+ (long long unsigned int)input.std, - f & V4L2_IN_ST_NO_POWER ? "[No power] " : "", - f & V4L2_IN_ST_NO_SIGNAL ? "[No signal] " : "", - f & V4L2_IN_ST_NO_COLOR ? "[No color] " : ""); diff --git a/multimedia/tvheadend/files/patch-support__posix.mk b/multimedia/tvheadend/files/patch-support__posix.mk deleted file mode 100644 index d4b708e46bfc..000000000000 --- a/multimedia/tvheadend/files/patch-support__posix.mk +++ /dev/null @@ -1,20 +0,0 @@ ---- support/posix.mk.orig 2013-05-05 14:49:47.000000000 +0200 -+++ support/posix.mk 2013-05-05 15:50:33.514989222 +0200 -@@ -7,8 +7,8 @@ - install: ${PROG} ${MAN} - install -d ${DESTDIR}${bindir} - install ${PROG} ${DESTDIR}${bindir}/tvheadend -- install -d ${DESTDIR}${mandir} -- install ${MAN} ${DESTDIR}${mandir}/tvheadend.1 -+ install -d ${DESTDIR}${mandir}/man1 -+ install ${MAN} ${DESTDIR}${mandir}/man1/tvheadend.1 - - for bundle in ${BUNDLES}; do \ - mkdir -p ${DESTDIR}${datadir}/tvheadend/$$bundle ;\ -@@ -19,5 +19,5 @@ - - uninstall: - rm -f ${DESTDIR}${bindir}/tvheadend -- rm -f ${DESTDIR}${mandir}/tvheadend.1 -+ rm -f ${DESTDIR}${mandir}/man1/tvheadend.1 - rm -rf ${DESTDIR}${datadir}/tvheadend diff --git a/multimedia/tvheadend/files/tvheadend.in b/multimedia/tvheadend/files/tvheadend.in index 402cfea04e1a..372533a24ba2 100644 --- a/multimedia/tvheadend/files/tvheadend.in +++ b/multimedia/tvheadend/files/tvheadend.in @@ -11,33 +11,41 @@ # tvheadend_enable (bool): Set to "NO" by default. # Set it to "YES" to enable tvheadend. # tvheadend_user (str): User account to run with. -# tvheadend_group (str): Group to run with. +# tvheadend_group (str): Group to run as. # tvheadend_flags (str): Custom flags for tvheadend. . /etc/rc.subr -: ${tvheadend_enable="NO"} +name=tvheadend +rcvar=tvheadend_enable +load_rc_config $name + +: ${tvheadend_enable:=NO} : ${tvheadend_user="%%TVHUSER%%"} : ${tvheadend_group="%%TVHGROUP%%"} -name=tvheadend -rcvar=tvheadend_enable pidfile="/var/run/${name}.pid" confdir="%%PREFIX%%/etc/tvheadend" +logdir="/var/log/tvheadend" command="%%PREFIX%%/bin/tvheadend" -command_args="-f -p ${pidfile} -u ${tvheadend_user} -g ${tvheadend_group} -c ${confdir}" + +command_args="-f -p ${pidfile} -c ${confdir} -l ${logdir}/tvheadend.log -u ${tvheadend_user} -g ${tvheadend_group}" start_precmd="${name}_prestart" +# TvHeadend looks for EPG Grabber executables 'tv_grab_*' on $PATH, so PATH must include %%PREFIX%%/bin +PATH=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/sbin:%%PREFIX%%/bin + tvheadend_prestart() { if [ ! -f "${pidfile}" ]; then - /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 644 /dev/null ${pidfile} + /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_user} -m 644 /dev/null ${pidfile} fi if [ ! -d "${confdir}" ]; then - /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_group} -m 755 -d ${confdir} + /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_user} -m 755 -d ${confdir} + fi + if [ ! -d "${logdir}" ]; then + /usr/bin/install -o ${tvheadend_user} -g ${tvheadend_user} -m 755 -d ${logdir} fi } -load_rc_config $name - run_rc_command "$1" |