aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/Makefile1
-rw-r--r--multimedia/vdr-plugin-vnsiserver/Makefile39
-rw-r--r--multimedia/vdr-plugin-vnsiserver/distinfo2
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-Makefile33
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.c20
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.h12
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-recplayer.c13
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-responsepacket.c10
-rw-r--r--multimedia/vdr-plugin-vnsiserver/files/patch-server.c18
-rw-r--r--multimedia/vdr-plugin-vnsiserver/pkg-descr7
-rw-r--r--multimedia/vdr-plugin-vnsiserver/pkg-plist5
11 files changed, 160 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile
index 0ea88fa9e8ab..4ef93593a6f8 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -347,6 +347,7 @@
SUBDIR += vdr-plugin-softdevice
SUBDIR += vdr-plugin-streamdev
SUBDIR += vdr-plugin-upnp
+ SUBDIR += vdr-plugin-vnsiserver
SUBDIR += vic
SUBDIR += vlc
SUBDIR += vodcatcher
diff --git a/multimedia/vdr-plugin-vnsiserver/Makefile b/multimedia/vdr-plugin-vnsiserver/Makefile
new file mode 100644
index 000000000000..16689f1c6583
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: vdr-plugin-vnsiserver
+# Date created: Tue Oct 5 21:13:30 CEST 2010
+# Whom: Juergen Lock <nox@freebsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= vdr-plugin-vnsiserver
+PORTVERSION= 0.0.2s20100808.0952
+PORTREVISION= 6
+CATEGORIES= multimedia
+MASTER_SITES= http://ppa.launchpad.net/yavdr/testing-vdr/ubuntu/pool/main/v/vdr-plugin-vnsiserver/
+DISTNAME= ${PORTNAME}_${DISTVERSIONPREFIX}${DISTVERSION:S/s20/+svn20/}${DISTVERSIONSUFFIX}.orig
+
+MAINTAINER= nox@FreeBSD.org
+COMMENT= Video Disk Recorder - VNSI server plugin
+
+PATCH_STRIP= -p1
+HAVE_CONFIGURE= yes
+PORTDOCS= COPYING README
+MAKE_JOBS_SAFE= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:S/s20/+svn20/}${DISTVERSIONSUFFIX}
+
+.include "${.CURDIR}/../vdr/Makefile.plugins"
+
+post-patch: post-patch-plugin
+
+post-install:
+ @${MKDIR} ${PREFIX}/etc/vdr/plugins/${PLUGIN}
+ @${INSTALL_DATA} ${WRKSRC}/${PLUGIN}/allowed_hosts.conf ${PREFIX}/etc/vdr/plugins/${PLUGIN}/allowed_hosts.conf.sample
+ @if [ ! -f ${PREFIX}/etc/vdr/plugins/${PLUGIN}/allowed_hosts.conf ]; then \
+ ${INSTALL_DATA} -o ${VDR_USER} -g ${VDR_GROUP} ${WRKSRC}/${PLUGIN}/allowed_hosts.conf ${PREFIX}/etc/vdr/plugins/${PLUGIN}; \
+ fi
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR})
+.endif
+
+.include <bsd.port.mk>
diff --git a/multimedia/vdr-plugin-vnsiserver/distinfo b/multimedia/vdr-plugin-vnsiserver/distinfo
new file mode 100644
index 000000000000..b491bf2a0359
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/distinfo
@@ -0,0 +1,2 @@
+SHA256 (vdr/vdr-plugin-vnsiserver_0.0.2+svn20100808.0952.orig.tar.gz) = 3763fe0cc853c7e9e22196f4bab5bbf7ce56efac82c44de1e3ab1c6f40a9e375
+SIZE (vdr/vdr-plugin-vnsiserver_0.0.2+svn20100808.0952.orig.tar.gz) = 110497
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-Makefile b/multimedia/vdr-plugin-vnsiserver/files/patch-Makefile
new file mode 100644
index 000000000000..1fdc0f623903
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-Makefile
@@ -0,0 +1,33 @@
+--- a/Makefile
++++ b/Makefile
+@@ -45,7 +45,11 @@ PACKAGE = vdr-$(ARCHIVE)
+
+ ### Includes and Defines (add further entries here):
+
++ifdef FREEBSD
++INCLUDES += -I$(VDRDIR)
++else
+ INCLUDES += -I$(VDRDIR)/include
++endif
+
+ DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+
+@@ -109,7 +113,11 @@ i18n: $(I18Nmsgs) $(I18Npot)
+
+ libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) -shared $(LIBS) $(OBJS) -o $@
++ifdef FREEBSD
++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION)
++else
+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
++endif
+
+ dist: clean
+ @-rm -rf $(TMPDIR)/$(ARCHIVE)
+@@ -121,3 +129,6 @@ dist: clean
+
+ clean:
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
++
++install:
++ ${INSTALL_PROGRAM} $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION) $(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION)
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.c b/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.c
new file mode 100644
index 000000000000..42c1cd5e50f7
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.c
@@ -0,0 +1,20 @@
+--- a/cxsocket.c
++++ b/cxsocket.c
+@@ -35,7 +35,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ # include <sys/sendfile.h>
+ #endif
+ #include <netinet/tcp.h>
+@@ -191,7 +191,7 @@ bool cxSocket::set_multicast(int ttl)
+
+ bool cxSocket::set_cork(bool state)
+ {
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__FreeBSD__)
+ return false;
+ #else
+ int iCork = state ? 1 : 0;
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.h b/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.h
new file mode 100644
index 000000000000..0f296448ea69
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-cxsocket.h
@@ -0,0 +1,12 @@
+--- a/cxsocket.h
++++ b/cxsocket.h
+@@ -29,6 +29,9 @@
+ #ifndef __CXSOCKET_H
+ #define __CXSOCKET_H
+
++#ifdef __FreeBSD__
++#include <netinet/in.h>
++#endif
+ #include <inttypes.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-recplayer.c b/multimedia/vdr-plugin-vnsiserver/files/patch-recplayer.c
new file mode 100644
index 000000000000..a58fcdd5d785
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-recplayer.c
@@ -0,0 +1,13 @@
+--- a/recplayer.c
++++ b/recplayer.c
+@@ -189,8 +189,10 @@ unsigned long cRecPlayer::getBlock(unsig
+ fseek(m_file, filePosition, SEEK_SET);
+ fread(&buffer[got], getFromThisSegment, 1, m_file);
+
++#ifndef __FreeBSD__
+ // Tell linux not to bother keeping the data in the FS cache
+ posix_fadvise(m_file->_fileno, filePosition, getFromThisSegment, POSIX_FADV_DONTNEED);
++#endif
+
+ got += getFromThisSegment;
+ currentPosition += getFromThisSegment;
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-responsepacket.c b/multimedia/vdr-plugin-vnsiserver/files/patch-responsepacket.c
new file mode 100644
index 000000000000..2fce82ada736
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-responsepacket.c
@@ -0,0 +1,10 @@
+--- a/responsepacket.c
++++ b/responsepacket.c
+@@ -27,6 +27,7 @@
+ #include <arpa/inet.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <inttypes.h>
+
+ #include "responsepacket.h"
+ #include "vdrcommand.h"
diff --git a/multimedia/vdr-plugin-vnsiserver/files/patch-server.c b/multimedia/vdr-plugin-vnsiserver/files/patch-server.c
new file mode 100644
index 000000000000..b07abaf2986d
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/files/patch-server.c
@@ -0,0 +1,18 @@
+--- a/server.c
++++ b/server.c
+@@ -151,6 +151,7 @@ void cServer::NewClientConnected(int fd)
+ int val = 1;
+ setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
+
++#ifdef SOL_TCP
+ val = 30;
+ setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &val, sizeof(val));
+
+@@ -162,6 +163,7 @@ void cServer::NewClientConnected(int fd)
+
+ val = 1;
+ setsockopt(fd, SOL_TCP, TCP_NODELAY, &val, sizeof(val));
++#endif
+
+ isyslog("VNSI: Client with ID %d connected: %s", m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));
+ cConnection *connection = new cConnection(this, fd, m_IdCnt, cxSocket::ip2txt(sin.sin_addr.s_addr, sin.sin_port, buf));
diff --git a/multimedia/vdr-plugin-vnsiserver/pkg-descr b/multimedia/vdr-plugin-vnsiserver/pkg-descr
new file mode 100644
index 000000000000..b9d2fe8ca489
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/pkg-descr
@@ -0,0 +1,7 @@
+http://www.vdr-wiki.de/wiki/index.php/Vnsi-server-plugin
+
+VDR-Network-Streaming-Interface plugin (untested, currently used by
+the XBMC pvr-testing2 branch which hasn't been ported to FreeBSD yet
+at the time of writing.)
+
+WWW: http://www.vdr-portal.de/board/thread.php?threadid=95292
diff --git a/multimedia/vdr-plugin-vnsiserver/pkg-plist b/multimedia/vdr-plugin-vnsiserver/pkg-plist
new file mode 100644
index 000000000000..ca3b139dc200
--- /dev/null
+++ b/multimedia/vdr-plugin-vnsiserver/pkg-plist
@@ -0,0 +1,5 @@
+lib/vdr/libvdr-vnsiserver.so.1.7.17
+@unexec if cmp -s %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf.sample %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf; then rm -f %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf; fi
+etc/vdr/plugins/vnsiserver/allowed_hosts.conf.sample
+@exec if [ ! -f %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf ] ; then cp -p %D/%F %B/allowed_hosts.conf; fi
+@dirrmtry etc/vdr/plugins/vnsiserver