FreeBSD Bugzilla – Attachment 244843 Details for
Bug 273788
[NEW PORT] multimedia/vdr: The Video Disk Recorder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
multimedia/vdr
0001-multimedia-vdr.patch (text/plain), 49.36 KB, created by
Stefan Rumetshofer
on 2023-09-14 16:44:17 UTC
(
hide
)
Description:
multimedia/vdr
Filename:
MIME Type:
Creator:
Stefan Rumetshofer
Created:
2023-09-14 16:44:17 UTC
Size:
49.36 KB
patch
obsolete
>From 2228b0eedd46af20956b47bdc0b0be73f6a1ef23 Mon Sep 17 00:00:00 2001 >From: Charlie Root <root@saturn.lan> >Date: Thu, 14 Sep 2023 16:11:11 +0200 >Subject: [PATCH] multimedia/vdr > >--- > multimedia/vdr/Makefile | 78 +++++++++ > multimedia/vdr/distinfo | 3 + > multimedia/vdr/files/patch-Makefile | 42 +++++ > .../patch-PLUGINS_src_epgtableid0_Makefile | 30 ++++ > .../files/patch-PLUGINS_src_hello_Makefile | 38 ++++ > .../files/patch-PLUGINS_src_osddemo_Makefile | 30 ++++ > .../files/patch-PLUGINS_src_pictures_Makefile | 38 ++++ > .../patch-PLUGINS_src_servicedemo_Makefile | 32 ++++ > .../patch-PLUGINS_src_skincurses_Makefile | 38 ++++ > .../files/patch-PLUGINS_src_status_Makefile | 30 ++++ > .../patch-PLUGINS_src_svdrpdemo_Makefile | 30 ++++ > multimedia/vdr/files/patch-channels.c | 34 ++++ > multimedia/vdr/files/patch-ci.c | 27 +++ > multimedia/vdr/files/patch-config.c | 12 ++ > multimedia/vdr/files/patch-config.h | 32 ++++ > multimedia/vdr/files/patch-diseqc.c | 16 ++ > multimedia/vdr/files/patch-epg.c | 16 ++ > multimedia/vdr/files/patch-i18n.h | 14 ++ > multimedia/vdr/files/patch-lirc.c | 13 ++ > multimedia/vdr/files/patch-menu.h | 21 +++ > multimedia/vdr/files/patch-plugin.c | 11 ++ > multimedia/vdr/files/patch-recording.c | 56 ++++++ > multimedia/vdr/files/patch-sources.c | 17 ++ > multimedia/vdr/files/patch-svdrp.c | 27 +++ > multimedia/vdr/files/patch-thread.c | 69 ++++++++ > multimedia/vdr/files/patch-timers.c | 31 ++++ > multimedia/vdr/files/patch-tools.c | 81 +++++++++ > multimedia/vdr/files/patch-tools.h | 26 +++ > multimedia/vdr/files/patch-vdr.c | 82 +++++++++ > multimedia/vdr/files/remote.conf | 116 +++++++++++++ > multimedia/vdr/files/vdr-waitdvb.in | 37 ++++ > multimedia/vdr/files/vdr.in | 44 +++++ > multimedia/vdr/pkg-descr | 6 + > multimedia/vdr/pkg-plist | 162 ++++++++++++++++++ > 34 files changed, 1339 insertions(+) > create mode 100644 multimedia/vdr/Makefile > create mode 100644 multimedia/vdr/distinfo > create mode 100644 multimedia/vdr/files/patch-Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_epgtableid0_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_hello_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_osddemo_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_pictures_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_servicedemo_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_skincurses_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_status_Makefile > create mode 100644 multimedia/vdr/files/patch-PLUGINS_src_svdrpdemo_Makefile > create mode 100644 multimedia/vdr/files/patch-channels.c > create mode 100644 multimedia/vdr/files/patch-ci.c > create mode 100644 multimedia/vdr/files/patch-config.c > create mode 100644 multimedia/vdr/files/patch-config.h > create mode 100644 multimedia/vdr/files/patch-diseqc.c > create mode 100644 multimedia/vdr/files/patch-epg.c > create mode 100644 multimedia/vdr/files/patch-i18n.h > create mode 100644 multimedia/vdr/files/patch-lirc.c > create mode 100644 multimedia/vdr/files/patch-menu.h > create mode 100644 multimedia/vdr/files/patch-plugin.c > create mode 100644 multimedia/vdr/files/patch-recording.c > create mode 100644 multimedia/vdr/files/patch-sources.c > create mode 100644 multimedia/vdr/files/patch-svdrp.c > create mode 100644 multimedia/vdr/files/patch-thread.c > create mode 100644 multimedia/vdr/files/patch-timers.c > create mode 100644 multimedia/vdr/files/patch-tools.c > create mode 100644 multimedia/vdr/files/patch-tools.h > create mode 100644 multimedia/vdr/files/patch-vdr.c > create mode 100644 multimedia/vdr/files/remote.conf > create mode 100644 multimedia/vdr/files/vdr-waitdvb.in > create mode 100644 multimedia/vdr/files/vdr.in > create mode 100644 multimedia/vdr/pkg-descr > create mode 100644 multimedia/vdr/pkg-plist > >diff --git a/multimedia/vdr/Makefile b/multimedia/vdr/Makefile >new file mode 100644 >index 000000000..480477f51 >--- /dev/null >+++ b/multimedia/vdr/Makefile >@@ -0,0 +1,78 @@ >+PORTNAME= vdr >+PORTVERSION= 2.6.4 >+PORTREVISION= 0 >+CATEGORIES= multimedia >+MASTER_SITES= http://git.tvdr.de/ >+DIST_SUBDIR= vdr >+ >+MAINTAINER= sterum77@gmail.com >+COMMENT= Video Disk Recorder >+WWW= http://www.tvdr.de/ >+ >+LICENSE= GPLv2+ >+LICENSE_FILE= ${WRKSRC}/COPYING >+ >+BUILD_DEPENDS= v4l_compat>=1.0.20120501:multimedia/v4l_compat \ >+ ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:x11-fonts/fontconfig >+LIB_DEPENDS= libfreetype.so:print/freetype2 >+RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:x11-fonts/fontconfig \ >+ xorg-fonts-truetype>=0:x11-fonts/xorg-fonts-truetype >+ >+USES= gettext gmake iconv:wchar_t jpeg pkgconfig shebangfix >+SHEBANG_FILES= svdrpsend >+ >+CONFDIR= ${ETCDIR} >+MAKE_ARGS= CC="${CC}" \ >+ CXX="${CXX}" \ >+ VDR_USER=${VDR_USER} \ >+ PREFIX=${PREFIX} \ >+ CONFDIR=${CONFDIR} \ >+ ARGSDIR=${CONFDIR}/conf.d \ >+ VIDEODIR=/video \ >+ OSTYPE=FreeBSD \ >+ LIRC_DEVICE=/var/run/lirc/lircd \ >+ LIBDIR=/usr/local/lib/vdr \ >+ PCDIR=$(PREFIX)/libdata/pkgconfig \ >+ VDRDIR=${WRKSRC} \ >+ TMPDIR=/tmp >+ALL_TARGET= vdr i18n plugins >+ >+VDR_USER= vdr >+VDR_GROUP= vdr >+ >+VIDEODIR= /video >+SUB_LIST= VIDEODIR=${VIDEODIR} >+SUB_FILES= vdr-waitdvb >+USE_RC_SUBR= vdr >+USERS= ${VDR_USER} >+GROUPS= ${VDR_GROUP} >+PLIST_SUB= VDR_USER=${VDR_USER} \ >+ VDR_GROUP=${VDR_GROUP} >+ >+PORTDOCS= INSTALL MANUAL README HISTORY >+ >+OPTIONS_DEFINE= DOCS >+ >+.include <bsd.port.options.mk> >+ >+.if ${OPSYS} == DragonFly >+IGNORE= will not work due to lack of driver support >+.endif >+ >+do-fetch: >+ @if [ ! -f "${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}" ]; then \ >+ ${MKDIR} ${DISTDIR}/${DIST_SUBDIR}; \ >+ ${FETCH_CMD} '${MASTER_SITES}?p=vdr.git;a=snapshot;h=refs/tags/${PORTVERSION}' \ >+ -o "${DISTDIR}/${DIST_SUBDIR}/${DISTFILES}"; \ >+ fi >+ >+post-install: >+ @${MKDIR} ${STAGEDIR}${CONFDIR}/plugins >+ ${INSTALL_DATA} ${FILESDIR}/remote.conf ${STAGEDIR}${CONFDIR}/remote.conf >+ ${INSTALL_SCRIPT} ${WRKDIR}/vdr-waitdvb ${STAGEDIR}${PREFIX}/bin >+ >+post-install-DOCS-on: >+ @${MKDIR} ${STAGEDIR}${DOCSDIR} >+ (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) >+ >+.include <bsd.port.mk> >diff --git a/multimedia/vdr/distinfo b/multimedia/vdr/distinfo >new file mode 100644 >index 000000000..47679ef3c >--- /dev/null >+++ b/multimedia/vdr/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1694415302 >+SHA256 (vdr/vdr-2.6.4.tar.gz) = 226b8989bf166690ecfc4feba4fd680857ac30a9dde7b5201359a250a5148785 >+SIZE (vdr/vdr-2.6.4.tar.gz) = 1291584 >diff --git a/multimedia/vdr/files/patch-Makefile b/multimedia/vdr/files/patch-Makefile >new file mode 100644 >index 000000000..b677a2437 >--- /dev/null >+++ b/multimedia/vdr/files/patch-Makefile >@@ -0,0 +1,42 @@ >+--- Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ Makefile 2023-09-10 17:18:22.602388000 +0200 >+@@ -22,7 +22,7 @@ >+ CDEFINES = -D_GNU_SOURCE >+ CDEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE >+ >+-LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell $(PKG_CONFIG) --libs freetype2 fontconfig) >++LIBS = -ljpeg -lpthread -lintl -ldl -liconv -lrt -lexecinfo $(shell $(PKG_CONFIG) --libs freetype2 fontconfig) >+ INCLUDES ?= $(shell $(PKG_CONFIG) --cflags freetype2 fontconfig) >+ >+ # Directories: >+@@ -31,6 +31,8 @@ >+ LSIDIR ?= $(CWD)/libsi >+ PLUGINDIR ?= $(CWD)/PLUGINS >+ >++PREFIX ?= /usr/local >++ >+ # Failsafe defaults for "make LCLBLD=1": >+ ifdef LCLBLD >+ DESTDIR ?= $(CWD) >+@@ -213,6 +215,7 @@ >+ >+ $(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr.mo: $(PODIR)/%.mo >+ @echo IN $@ >++ @mkdir -p $(dir $@) >+ $(Q)install -D -m644 $< $@ >+ >+ .PHONY: i18n >+@@ -288,12 +291,11 @@ >+ >+ install-bin: vdr >+ @mkdir -p $(DESTDIR)$(BINDIR) >+- @cp --remove-destination vdr svdrpsend $(DESTDIR)$(BINDIR) >++ @cp -f vdr svdrpsend $(DESTDIR)$(BINDIR) >+ >+ # Configuration files: >+ >+ install-dirs: >+- @mkdir -p $(DESTDIR)$(VIDEODIR) >+ @mkdir -p $(DESTDIR)$(CONFDIR) >+ @mkdir -p $(DESTDIR)$(ARGSDIR) >+ @mkdir -p $(DESTDIR)$(CACHEDIR) >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_epgtableid0_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_epgtableid0_Makefile >new file mode 100644 >index 000000000..8bac87f49 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_epgtableid0_Makefile >@@ -0,0 +1,30 @@ >+--- PLUGINS/src/epgtableid0/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/epgtableid0/Makefile 2023-08-30 10:03:23.379961000 +0200 >+@@ -27,6 +27,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -47,7 +49,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -81,7 +83,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_hello_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_hello_Makefile >new file mode 100644 >index 000000000..b8c835d11 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_hello_Makefile >@@ -0,0 +1,38 @@ >+--- PLUGINS/src/hello/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/hello/Makefile 2023-09-02 10:54:57.630805000 +0200 >+@@ -28,6 +28,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -48,7 +50,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -97,6 +99,7 @@ >+ @touch $@ >+ >+ $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo >++ @mkdir -p $(dir $@) >+ install -D -m644 $< $@ >+ >+ .PHONY: i18n >+@@ -111,7 +114,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib install-i18n >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_osddemo_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_osddemo_Makefile >new file mode 100644 >index 000000000..da189c5eb >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_osddemo_Makefile >@@ -0,0 +1,30 @@ >+--- PLUGINS/src/osddemo/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/osddemo/Makefile 2023-08-30 10:04:04.285784000 +0200 >+@@ -27,6 +27,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -47,7 +49,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -81,7 +83,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_pictures_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_pictures_Makefile >new file mode 100644 >index 000000000..b30b83ed4 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_pictures_Makefile >@@ -0,0 +1,38 @@ >+--- PLUGINS/src/pictures/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/pictures/Makefile 2023-08-30 10:11:55.237259000 +0200 >+@@ -28,6 +28,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -48,7 +50,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -97,6 +99,7 @@ >+ @touch $@ >+ >+ $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo >++ @mkdir -p $(dir $@) >+ install -D -m644 $< $@ >+ >+ .PHONY: i18n >+@@ -111,7 +114,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib install-i18n >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_servicedemo_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_servicedemo_Makefile >new file mode 100644 >index 000000000..91c44ad1c >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_servicedemo_Makefile >@@ -0,0 +1,32 @@ >+--- PLUGINS/src/servicedemo/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/servicedemo/Makefile 2023-08-30 10:04:47.393735000 +0200 >+@@ -28,6 +28,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -44,7 +46,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -82,8 +84,9 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@ >+ >+ install-lib: libvdr-$(PLUGIN1).so libvdr-$(PLUGIN2).so >+- install -D libvdr-$(PLUGIN1).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN1).so.$(APIVERSION) >+- install -D libvdr-$(PLUGIN2).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN2).so.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f libvdr-$(PLUGIN1).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN1).so.$(APIVERSION) >++ @cp -f libvdr-$(PLUGIN2).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN2).so.$(APIVERSION) >+ >+ install: install-lib >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_skincurses_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_skincurses_Makefile >new file mode 100644 >index 000000000..1e2a1bf37 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_skincurses_Makefile >@@ -0,0 +1,38 @@ >+--- PLUGINS/src/skincurses/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/skincurses/Makefile 2023-08-30 10:12:35.681962000 +0200 >+@@ -28,6 +28,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -48,7 +50,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -97,6 +99,7 @@ >+ @touch $@ >+ >+ $(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo >++ @mkdir -p $(dir $@) >+ install -D -m644 $< $@ >+ >+ .PHONY: i18n >+@@ -111,7 +114,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib install-i18n >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_status_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_status_Makefile >new file mode 100644 >index 000000000..e2d0b2907 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_status_Makefile >@@ -0,0 +1,30 @@ >+--- PLUGINS/src/status/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/status/Makefile 2023-08-30 10:05:31.002339000 +0200 >+@@ -27,6 +27,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -47,7 +49,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -81,7 +83,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib >+ >diff --git a/multimedia/vdr/files/patch-PLUGINS_src_svdrpdemo_Makefile b/multimedia/vdr/files/patch-PLUGINS_src_svdrpdemo_Makefile >new file mode 100644 >index 000000000..f2ed1b565 >--- /dev/null >+++ b/multimedia/vdr/files/patch-PLUGINS_src_svdrpdemo_Makefile >@@ -0,0 +1,30 @@ >+--- PLUGINS/src/svdrpdemo/Makefile.orig 2023-02-17 12:04:45.000000000 +0100 >++++ PLUGINS/src/svdrpdemo/Makefile 2023-08-30 10:05:49.830316000 +0200 >+@@ -27,6 +27,8 @@ >+ >+ export CFLAGS = $(call PKGCFG,cflags) >+ export CXXFLAGS = $(call PKGCFG,cxxflags) >++CFLAGS += -fPIC >++CXXFLAGS += -fPIC >+ >+ ### The version number of VDR's plugin API: >+ >+@@ -47,7 +49,7 @@ >+ >+ ### Includes and Defines (add further entries here): >+ >+-INCLUDES += >++INCLUDES += -I/usr/local/include >+ >+ DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' >+ >+@@ -81,7 +83,8 @@ >+ $(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ >+ >+ install-lib: $(SOFILE) >+- install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >++ @mkdir -p $(DESTDIR)$(LIBDIR) >++ @cp -f $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION) >+ >+ install: install-lib >+ >diff --git a/multimedia/vdr/files/patch-channels.c b/multimedia/vdr/files/patch-channels.c >new file mode 100644 >index 000000000..6b4be1a24 >--- /dev/null >+++ b/multimedia/vdr/files/patch-channels.c >@@ -0,0 +1,34 @@ >+--- channels.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ channels.c 2023-08-28 12:05:41.726626000 +0200 >+@@ -27,7 +27,12 @@ >+ int tid; >+ int sid; >+ int rid = 0; >++#ifdef __FreeBSD__ >++ sourcebuf = MALLOC(char, 256); >++ int fields = sscanf(s, "%255[^-]-%d-%d-%d-%d", sourcebuf, &nid, &tid, &sid, &rid); >++#else >+ int fields = sscanf(s, "%m[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid); >++#endif >+ if (fields == 4 || fields == 5) { >+ int source = cSource::FromString(sourcebuf); >+ free(sourcebuf); >+@@ -636,7 +641,18 @@ >+ char *apidbuf = NULL; >+ char *tpidbuf = NULL; >+ char *caidbuf = NULL; >++#ifdef __FreeBSD__ >++ namebuf = MALLOC(char, 256); >++ parambuf = MALLOC(char, 256); >++ sourcebuf = MALLOC(char, 256); >++ vpidbuf = MALLOC(char, 256); >++ apidbuf = MALLOC(char, 256); >++ tpidbuf = MALLOC(char, 256); >++ caidbuf = MALLOC(char, 256); >++ int fields = sscanf(s, "%255[^:]:%d :%255[^:]:%255[^:] :%d :%255[^:]:%255[^:]:%255[^:]:%255[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, tpidbuf, caidbuf, &sid, &nid, &tid, &rid); >++#else >+ int fields = sscanf(s, "%m[^:]:%d :%m[^:]:%m[^:] :%d :%m[^:]:%m[^:]:%m[^:]:%m[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpidbuf, &caidbuf, &sid, &nid, &tid, &rid); >++#endif >+ if (fields >= 9) { >+ if (fields == 9) { >+ // allow reading of old format >diff --git a/multimedia/vdr/files/patch-ci.c b/multimedia/vdr/files/patch-ci.c >new file mode 100644 >index 000000000..5360c363c >--- /dev/null >+++ b/multimedia/vdr/files/patch-ci.c >@@ -0,0 +1,27 @@ >+--- ci.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ ci.c 2023-08-26 17:45:29.456353000 +0200 >+@@ -10,7 +10,11 @@ >+ #include "ci.h" >+ #include <ctype.h> >+ #include <linux/dvb/ca.h> >++#ifdef __FreeBSD__ >++#include <stdlib.h> >++#else >+ #include <malloc.h> >++#endif >+ #include <netinet/in.h> >+ #include <poll.h> >+ #include <stdio.h> >+@@ -26,6 +30,12 @@ >+ #include "libsi/si.h" >+ #include "skins.h" >+ #include "tools.h" >++ >++/* FreeBSD has it's own version of isnumber(), >++ but VDR's version is incompatible */ >++#ifdef __FreeBSD__ >++#undef isnumber >++#endif >+ >+ // Set these to 'true' for debug output: >+ static bool DumpTPDUDataTransfer = false; >diff --git a/multimedia/vdr/files/patch-config.c b/multimedia/vdr/files/patch-config.c >new file mode 100644 >index 000000000..7c231a050 >--- /dev/null >+++ b/multimedia/vdr/files/patch-config.c >@@ -0,0 +1,12 @@ >+--- config.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ config.c 2023-08-26 17:48:21.754843000 +0200 >+@@ -10,6 +10,9 @@ >+ #include "config.h" >+ #include <ctype.h> >+ #include <stdlib.h> >++#ifdef __FreeBSD__ >++#include <netinet/in.h> >++#endif >+ #include "device.h" >+ #include "i18n.h" >+ #include "interface.h" >diff --git a/multimedia/vdr/files/patch-config.h b/multimedia/vdr/files/patch-config.h >new file mode 100644 >index 000000000..ab2605489 >--- /dev/null >+++ b/multimedia/vdr/files/patch-config.h >@@ -0,0 +1,32 @@ >+--- config.h.orig 2023-02-17 12:04:45.000000000 +0100 >++++ config.h 2023-08-26 17:43:24.643487000 +0200 >+@@ -16,6 +16,9 @@ >+ #include <string.h> >+ #include <time.h> >+ #include <unistd.h> >++#ifdef __FreeBSD__ >++#include <limits.h> >++#endif >+ #include "i18n.h" >+ #include "font.h" >+ #include "tools.h" >+@@ -268,7 +271,7 @@ >+ int MenuScrollWrap; >+ int MenuKeyCloses; >+ int MarkInstantRecord; >+- char NameInstantRecord[NAME_MAX + 1]; >++ char NameInstantRecord[_POSIX_NAME_MAX + 1]; >+ int InstantRecordTime; >+ int LnbSLOF; >+ int LnbFrequLo; >+@@ -296,8 +299,8 @@ >+ int EPGLinger; >+ int SVDRPTimeout; >+ int SVDRPPeering; >+- char SVDRPHostName[HOST_NAME_MAX]; >+- char SVDRPDefaultHost[HOST_NAME_MAX]; >++ char SVDRPHostName[_POSIX_HOST_NAME_MAX]; >++ char SVDRPDefaultHost[_POSIX_HOST_NAME_MAX]; >+ int ZapTimeout; >+ int ChannelEntryTimeout; >+ int RcRepeatDelay; >diff --git a/multimedia/vdr/files/patch-diseqc.c b/multimedia/vdr/files/patch-diseqc.c >new file mode 100644 >index 000000000..4a9f3c168 >--- /dev/null >+++ b/multimedia/vdr/files/patch-diseqc.c >@@ -0,0 +1,16 @@ >+--- diseqc.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ diseqc.c 2023-08-28 11:55:25.581766000 +0200 >+@@ -228,7 +228,13 @@ >+ devices = CurrentDevices; >+ bool result = false; >+ char *sourcebuf = NULL; >++#ifdef __FreeBSD__ >++ sourcebuf = MALLOC(char, 256); >++ commands = MALLOC(char, 256); >++ int fields = sscanf(s, "%255[^ ] %d %c %d %255[^\n]", sourcebuf, &slof, &polarization, &lof, commands); >++#else >+ int fields = sscanf(s, "%m[^ ] %d %c %d %m[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands); >++#endif >+ if (fields == 4) >+ commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %m argument results in an empty string >+ if (4 <= fields && fields <= 5) { >diff --git a/multimedia/vdr/files/patch-epg.c b/multimedia/vdr/files/patch-epg.c >new file mode 100644 >index 000000000..094499446 >--- /dev/null >+++ b/multimedia/vdr/files/patch-epg.c >@@ -0,0 +1,16 @@ >+--- epg.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ epg.c 2023-08-28 11:03:28.844523000 +0200 >+@@ -31,7 +31,13 @@ >+ bool tComponent::FromString(const char *s) >+ { >+ unsigned int Stream, Type; >++#ifdef __FreeBSD__ >++ if (description == NULL) >++ description = MALLOC(char, 256); >++ int n = sscanf(s, "%X %02X %7s %255[^\n]", &Stream, &Type, language, description); // 7 = MAXLANGCODE2 - 1 >++#else >+ int n = sscanf(s, "%X %02X %7s %m[^\n]", &Stream, &Type, language, &description); // 7 = MAXLANGCODE2 - 1 >++#endif >+ if (n != 4 || isempty(description)) { >+ free(description); >+ description = NULL; >diff --git a/multimedia/vdr/files/patch-i18n.h b/multimedia/vdr/files/patch-i18n.h >new file mode 100644 >index 000000000..99df6ae16 >--- /dev/null >+++ b/multimedia/vdr/files/patch-i18n.h >@@ -0,0 +1,14 @@ >+--- i18n.h.orig 2023-02-17 12:04:45.000000000 +0100 >++++ i18n.h 2023-08-26 17:40:08.876330000 +0200 >+@@ -46,7 +46,11 @@ >+ ///< have an actual locale installed. The rest are just dummy entries >+ ///< to allow having three letter language codes for other languages >+ ///< that have no actual locale on this system. >++#ifdef __FreeBSD__ >++const char *I18nTranslate(const char *s, const char *Plugin = NULL) __format_arg(1); >++#else >+ const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1); >++#endif >+ ///< Translates the given string (with optional Plugin context) into >+ ///< the current language. If no translation is available, the original >+ ///< string will be returned. >diff --git a/multimedia/vdr/files/patch-lirc.c b/multimedia/vdr/files/patch-lirc.c >new file mode 100644 >index 000000000..e3d454373 >--- /dev/null >+++ b/multimedia/vdr/files/patch-lirc.c >@@ -0,0 +1,13 @@ >+--- lirc.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ lirc.c 2023-08-26 17:28:00.719667000 +0200 >+@@ -10,8 +10,10 @@ >+ */ >+ >+ #include "lirc.h" >++#ifndef __FreeBSD__ >+ #include <linux/version.h> >+ #define HAVE_KERNEL_LIRC (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) >++#endif >+ // cLircUsrRemote >+ #include <netinet/in.h> >+ #include <sys/socket.h> >diff --git a/multimedia/vdr/files/patch-menu.h b/multimedia/vdr/files/patch-menu.h >new file mode 100644 >index 000000000..200a1e0b7 >--- /dev/null >+++ b/multimedia/vdr/files/patch-menu.h >@@ -0,0 +1,21 @@ >+--- menu.h.orig 2023-02-17 12:04:45.000000000 +0100 >++++ menu.h 2023-08-26 17:46:51.967641000 +0200 >+@@ -18,6 +18,9 @@ >+ #include "menuitems.h" >+ #include "recorder.h" >+ #include "skins.h" >++#ifdef __FreeBSD__ >++#include <limits.h> >++#endif >+ >+ class cMenuText : public cOsdMenu { >+ private: >+@@ -78,7 +81,7 @@ >+ int channel; >+ bool addIfConfirmed; >+ cStringList svdrpServerNames; >+- char remote[HOST_NAME_MAX]; >++ char remote[_POSIX_HOST_NAME_MAX]; >+ cMenuEditStrItem *pattern; >+ cMenuEditStrItem *file; >+ cMenuEditDateItem *day; >diff --git a/multimedia/vdr/files/patch-plugin.c b/multimedia/vdr/files/patch-plugin.c >new file mode 100644 >index 000000000..3cff1c62a >--- /dev/null >+++ b/multimedia/vdr/files/patch-plugin.c >@@ -0,0 +1,11 @@ >+--- plugin.c.orig 2023-09-09 21:58:40.000805000 +0200 >++++ plugin.c 2023-09-10 10:23:37.163978000 +0200 >+@@ -224,6 +224,8 @@ >+ esyslog("attempt to load plugin '%s' twice!", fileName); >+ return false; >+ } >++ >++ dlerror(); >+ handle = dlopen(fileName, RTLD_NOW); >+ const char *error = dlerror(); >+ if (!error) { >diff --git a/multimedia/vdr/files/patch-recording.c b/multimedia/vdr/files/patch-recording.c >new file mode 100644 >index 000000000..6033bc664 >--- /dev/null >+++ b/multimedia/vdr/files/patch-recording.c >@@ -0,0 +1,56 @@ >+--- recording.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ recording.c 2023-08-26 17:53:29.479580000 +0200 >+@@ -19,6 +19,9 @@ >+ #include <string.h> >+ #include <sys/stat.h> >+ #include <unistd.h> >++#ifdef __FreeBSD__ >++#include <limits.h> >++#endif >+ #include "channels.h" >+ #include "cutter.h" >+ #include "i18n.h" >+@@ -2978,7 +2981,11 @@ >+ // Search for a PAT packet from the end of the file: >+ cPatPmtParser PatPmtParser; >+ sprintf(pFileNumber, RECORDFILESUFFIXTS, Number); >++#ifdef __FreeBSD__ >++ int fd = open(fileName, O_RDONLY, DEFFILEMODE); >++#else >+ int fd = open(fileName, O_RDONLY | O_LARGEFILE, DEFFILEMODE); >++#endif >+ if (fd >= 0) { >+ off_t pos = lseek(fd, -TS_SIZE, SEEK_END); >+ while (pos >= 0) { >+@@ -3019,14 +3026,22 @@ >+ int BlockingFlag = blocking ? 0 : O_NONBLOCK; >+ if (record) { >+ dsyslog("recording to '%s'", fileName); >++#ifdef __FreeBSD__ >++ file = cVideoDirectory::OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag); >++#else >+ file = cVideoDirectory::OpenVideoFile(fileName, O_RDWR | O_CREAT | O_LARGEFILE | BlockingFlag); >++#endif >+ if (!file) >+ LOG_ERROR_STR(fileName); >+ } >+ else { >+ if (access(fileName, R_OK) == 0) { >+ dsyslog("playing '%s'", fileName); >++#ifdef __FreeBSD__ >++ file = cUnbufferedFile::Create(fileName, O_RDONLY | BlockingFlag); >++#else >+ file = cUnbufferedFile::Create(fileName, O_RDONLY | O_LARGEFILE | BlockingFlag); >++#endif >+ if (!file) >+ LOG_ERROR_STR(fileName); >+ } >+@@ -3299,7 +3314,7 @@ >+ cString FileName = AddDirectory(Directory, TIMERRECFILE); >+ const char *Id = NULL; >+ if (FILE *f = fopen(FileName, "r")) { >+- char buf[HOST_NAME_MAX + 10]; // +10 for numeric timer id and '@' >++ char buf[_POSIX_HOST_NAME_MAX + 10]; // +10 for numeric timer id and '@' >+ if (fgets(buf, sizeof(buf), f)) { >+ stripspace(buf); >+ Id = buf; >diff --git a/multimedia/vdr/files/patch-sources.c b/multimedia/vdr/files/patch-sources.c >new file mode 100644 >index 000000000..f9b8d75fa >--- /dev/null >+++ b/multimedia/vdr/files/patch-sources.c >@@ -0,0 +1,17 @@ >+--- sources.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ sources.c 2023-08-28 11:10:48.346038000 +0200 >+@@ -31,7 +31,14 @@ >+ bool cSource::Parse(const char *s) >+ { >+ char *codeBuf = NULL; >++#ifdef __FreeBSD__ >++ codeBuf = MALLOC(char, 10); >++ if (description == NULL) >++ description = MALLOC(char, 256); >++ if (2 == sscanf(s, "%9[^ ] %255[^\n]", codeBuf, description)) >++#else >+ if (2 == sscanf(s, "%m[^ ] %m[^\n]", &codeBuf, &description)) >++#endif >+ code = FromString(codeBuf); >+ free(codeBuf); >+ return code != stNone && description && *description; >diff --git a/multimedia/vdr/files/patch-svdrp.c b/multimedia/vdr/files/patch-svdrp.c >new file mode 100644 >index 000000000..cbd14047b >--- /dev/null >+++ b/multimedia/vdr/files/patch-svdrp.c >@@ -0,0 +1,27 @@ >+--- svdrp.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ svdrp.c 2023-08-26 17:56:29.409754000 +0200 >+@@ -40,6 +40,12 @@ >+ #include "timers.h" >+ #include "videodir.h" >+ >++/* FreeBSD has it's own version of isnumber(), >++ but VDR's version is incompatible */ >++#ifdef __FreeBSD__ >++#undef isnumber >++#endif >++ >+ static bool DumpSVDRPDataTransfer = false; >+ >+ #define dbgsvdrp(a...) if (DumpSVDRPDataTransfer) fprintf(stderr, a) >+@@ -55,6 +61,11 @@ >+ }; >+ >+ // --- cIpAddress ------------------------------------------------------------ >++ >++#ifdef __FreeBSD__ >++#undef INADDR_ANY >++#define INADDR_ANY 0x00000000 >++#endif >+ >+ class cIpAddress { >+ private: >diff --git a/multimedia/vdr/files/patch-thread.c b/multimedia/vdr/files/patch-thread.c >new file mode 100644 >index 000000000..701973d2c >--- /dev/null >+++ b/multimedia/vdr/files/patch-thread.c >@@ -0,0 +1,69 @@ >+--- thread.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ thread.c 2023-08-26 18:58:06.225795000 +0200 >+@@ -12,11 +12,19 @@ >+ #include <dlfcn.h> >+ #include <errno.h> >+ #include <execinfo.h> >++#ifdef __FreeBSD__ >++#include <pthread_np.h> >++#include <signal.h> >++#include <stdlib.h> >++#else >+ #include <linux/unistd.h> >+ #include <malloc.h> >++#endif >+ #include <stdarg.h> >+ #include <stdlib.h> >++#ifndef __FreeBSD__ >+ #include <sys/prctl.h> >++#endif >+ #include <sys/resource.h> >+ #include <sys/syscall.h> >+ #include <sys/time.h> >+@@ -160,7 +168,9 @@ >+ writeLockThreadId = 0; >+ pthread_rwlockattr_t attr; >+ pthread_rwlockattr_init(&attr); >++#ifndef __FreeBSD__ >+ pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP); >++#endif >+ pthread_rwlock_init(&rwlock, &attr); >+ } >+ >+@@ -210,7 +220,11 @@ >+ locked = 0; >+ pthread_mutexattr_t attr; >+ pthread_mutexattr_init(&attr); >++#ifdef __FreeBSD__ >++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); >++#else >+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); >++#endif >+ pthread_mutex_init(&mutex, &attr); >+ } >+ >+@@ -260,8 +274,12 @@ >+ >+ void cThread::SetIOPriority(int Priority) >+ { >++#ifdef __FreeBSD__ >++ esyslog("ERROR: syscall(SYS_ioprio_set ...) unsupported on FreeBSD"); >++#else >+ if (syscall(SYS_ioprio_set, 1, 0, (Priority & 0xff) | (3 << 13)) < 0) // idle class >+ LOG_ERROR; >++#endif >+ } >+ >+ void cThread::SetDescription(const char *Description, ...) >+@@ -371,7 +389,11 @@ >+ >+ tThreadId cThread::ThreadId(void) >+ { >++#ifdef __FreeBSD__ >++ return reinterpret_cast<long>(::pthread_self()); >++#else >+ return syscall(__NR_gettid); >++#endif >+ } >+ >+ void cThread::SetMainThreadId(void) >diff --git a/multimedia/vdr/files/patch-timers.c b/multimedia/vdr/files/patch-timers.c >new file mode 100644 >index 000000000..a4b8cb3ff >--- /dev/null >+++ b/multimedia/vdr/files/patch-timers.c >@@ -0,0 +1,31 @@ >+--- timers.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ timers.c 2023-08-28 11:21:42.017824000 +0200 >+@@ -21,6 +21,12 @@ >+ // format characters in order to allow any number of blanks after a numeric >+ // value! >+ >++/* FreeBSD has it's own version of isnumber(), >++ but VDR's version is incompatible */ >++#ifdef __FreeBSD__ >++#undef isnumber >++#endif >++ >+ // --- cTimer ---------------------------------------------------------------- >+ >+ cTimer::cTimer(bool Instant, bool Pause, const cChannel *Channel) >+@@ -454,7 +460,15 @@ >+ s = s2; >+ } >+ bool result = false; >++#ifdef __FreeBSD__ >++ channelbuffer = MALLOC(char, 256); >++ daybuffer = MALLOC(char, 256); >++ filebuffer = MALLOC(char, 256); >++ aux = MALLOC(char, 256); >++ if (8 <= sscanf(s, "%u :%255[^:]:%255[^:]:%d :%d :%d :%d :%255[^:\n]:%255[^\n]", &flags, channelbuffer, daybuffer, &start, &stop, &priority, &lifetime, filebuffer, aux)) { >++#else >+ if (8 <= sscanf(s, "%u :%m[^:]:%m[^:]:%d :%d :%d :%d :%m[^:\n]:%m[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) { >++#endif >+ if (aux && !*skipspace(aux)) { >+ free(aux); >+ aux = NULL; >diff --git a/multimedia/vdr/files/patch-tools.c b/multimedia/vdr/files/patch-tools.c >new file mode 100644 >index 000000000..9204c89c1 >--- /dev/null >+++ b/multimedia/vdr/files/patch-tools.c >@@ -0,0 +1,81 @@ >+--- tools.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ tools.c 2023-08-26 19:05:51.313225000 +0200 >+@@ -21,13 +21,27 @@ >+ #include <locale.h> >+ #include <stdlib.h> >+ #include <sys/time.h> >++#ifdef __FreeBSD__ >++#include <sys/param.h> >++#include <sys/mount.h> >++#else >+ #include <sys/vfs.h> >++#endif >+ #include <time.h> >+ #include <unistd.h> >++#ifdef __FreeBSD__ >++#include <limits.h> >++#endif >+ #include <utime.h> >+ #include "i18n.h" >+ #include "thread.h" >+ >++/* FreeBSD has it's own version of isnumber(), >++ but VDR's version is incompatible */ >++#ifdef __FreeBSD__ >++#undef isnumber >++#endif >++ >+ int SysLogLevel = 3; >+ >+ #define MAXSYSLOGBUF 256 >+@@ -672,6 +686,18 @@ >+ { >+ if (!FileName) >+ return NULL; >++#ifdef __FreeBSD__ >++ char *resolved_path = NULL; >++ resolved_path = MALLOC(char, PATH_MAX+1); >++ if (realpath(FileName, resolved_path) == NULL) >++ { >++ if (errno != ENOENT) // some other error occurred >++ LOG_ERROR_STR(FileName); >++ else // file doesn't exist >++ resolved_path = strdup(FileName); >++ } >++ return resolved_path; >++#else >+ char *TargetName = canonicalize_file_name(FileName); >+ if (!TargetName) { >+ if (errno == ENOENT) // file doesn't exist >+@@ -680,6 +706,7 @@ >+ LOG_ERROR_STR(FileName); >+ } >+ return TargetName; >++#endif >+ } >+ >+ bool SpinUpDisk(const char *FileName) >+@@ -1362,7 +1389,7 @@ >+ >+ const char *GetHostName(void) >+ { >+- static char buffer[HOST_NAME_MAX] = ""; >++ static char buffer[_POSIX_HOST_NAME_MAX] = ""; >+ if (!*buffer) { >+ if (gethostname(buffer, sizeof(buffer)) < 0) { >+ LOG_ERROR; >+@@ -1562,11 +1589,14 @@ >+ struct dirent *cReadDir::Next(void) >+ { >+ if (directory) { >++/* >+ #if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 >+ while (readdir_r(directory, &u.d, &result) == 0 && result) { >+ #else >+ while ((result = readdir(directory)) != NULL) { >+ #endif >++*/ >++ while ((result = readdir(directory)) != NULL) { >+ if (strcmp(result->d_name, ".") && strcmp(result->d_name, "..")) >+ return result; >+ } >diff --git a/multimedia/vdr/files/patch-tools.h b/multimedia/vdr/files/patch-tools.h >new file mode 100644 >index 000000000..60e723397 >--- /dev/null >+++ b/multimedia/vdr/files/patch-tools.h >@@ -0,0 +1,26 @@ >+--- tools.h.orig 2023-02-17 12:04:45.000000000 +0100 >++++ tools.h 2023-08-26 17:38:03.920987000 +0200 >+@@ -29,6 +29,9 @@ >+ #include "thread.h" >+ >+ typedef unsigned char uchar; >++#ifdef __FreeBSD__ >++typedef int (*__compar_fn_t)(const void *, const void *); >++#endif >+ >+ extern int SysLogLevel; >+ >+@@ -444,11 +447,13 @@ >+ private: >+ DIR *directory; >+ struct dirent *result; >++#ifndef __FreeBSD__ >+ #if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 >+ union { // according to "The GNU C Library Reference Manual" >+ struct dirent d; >+ char b[offsetof(struct dirent, d_name) + NAME_MAX + 1]; >+ } u; >++#endif >+ #endif >+ public: >+ cReadDir(const char *Directory); >diff --git a/multimedia/vdr/files/patch-vdr.c b/multimedia/vdr/files/patch-vdr.c >new file mode 100644 >index 000000000..6b18e492d >--- /dev/null >+++ b/multimedia/vdr/files/patch-vdr.c >@@ -0,0 +1,82 @@ >+--- vdr.c.orig 2023-02-17 12:04:45.000000000 +0100 >++++ vdr.c 2023-08-26 19:17:19.932039000 +0200 >+@@ -33,8 +33,14 @@ >+ #include <pwd.h> >+ #include <signal.h> >+ #include <stdlib.h> >++#ifndef __FreeBSD__ >+ #include <sys/capability.h> >+ #include <sys/prctl.h> >++#else >++#include <sys/types.h> >++#include <login_cap.h> >++#include <limits.h> >++#endif >+ #ifdef SDNOTIFY >+ #include <systemd/sd-daemon.h> >+ #endif >+@@ -115,8 +121,10 @@ >+ fprintf(stderr, "vdr: cannot set user id %u: %s\n", (unsigned int)user->pw_uid, strerror(errno)); >+ return false; >+ } >++#ifndef __FreeBSD__ >+ if (UserDump && prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) >+ fprintf(stderr, "vdr: warning - cannot set dumpable: %s\n", strerror(errno)); >++#endif >+ setenv("HOME", user->pw_dir, 1); >+ setenv("USER", user->pw_name, 1); >+ setenv("LOGNAME", user->pw_name, 1); >+@@ -125,6 +133,7 @@ >+ return true; >+ } >+ >++#ifndef __FreeBSD__ >+ static bool DropCaps(void) >+ { >+ // drop all capabilities except selected ones >+@@ -157,7 +166,9 @@ >+ cap_free(caps); >+ return true; >+ } >++#endif >+ >++#ifndef __FreeBSD__ >+ static bool SetKeepCaps(bool On) >+ { >+ // set keeping capabilities during setuid() on/off >+@@ -167,6 +178,7 @@ >+ } >+ return true; >+ } >++#endif >+ >+ static void SignalHandler(int signum) >+ { >+@@ -674,14 +686,18 @@ >+ if (VdrUser && geteuid() == 0) { >+ StartedAsRoot = true; >+ if (strcmp(VdrUser, "root") && strcmp(VdrUser, "0")) { >++#ifndef __FreeBSD__ >+ if (!SetKeepCaps(true)) >+ return 2; >++#endif >+ if (!SetUser(VdrUser, UserDump)) >+ return 2; >++#ifndef __FreeBSD__ >+ if (!SetKeepCaps(false)) >+ return 2; >+ if (!DropCaps()) >+ return 2; >++#endif >+ } >+ } >+ >+@@ -1585,7 +1601,7 @@ >+ // Memory cleanup: >+ static time_t LastMemoryCleanup = 0; >+ if ((Now - LastMemoryCleanup) > MEMCLEANUPDELTA) { >+- malloc_trim(0); >++ //malloc_trim(0); >+ LastMemoryCleanup = Now; >+ } >+ } >diff --git a/multimedia/vdr/files/remote.conf b/multimedia/vdr/files/remote.conf >new file mode 100644 >index 000000000..d6898e16a >--- /dev/null >+++ b/multimedia/vdr/files/remote.conf >@@ -0,0 +1,116 @@ >+XKeySym.Up Up >+XKeySym.Down Down >+XKeySym.Menu Tab >+XKeySym.Menu Insert >+XKeySym.Ok Return >+XKeySym.Ok KP_Enter >+XKeySym.Back BackSpace >+XKeySym.Left Left >+XKeySym.Right Right >+XKeySym.Red F5 >+XKeySym.Green F6 >+XKeySym.Yellow F7 >+XKeySym.Blue F8 >+XKeySym.0 0 >+XKeySym.1 1 >+XKeySym.2 2 >+XKeySym.3 3 >+XKeySym.4 4 >+XKeySym.5 5 >+XKeySym.6 6 >+XKeySym.7 7 >+XKeySym.8 8 >+XKeySym.9 9 >+XKeySym.0 KP_0 >+XKeySym.1 KP_1 >+XKeySym.2 KP_2 >+XKeySym.3 KP_3 >+XKeySym.4 KP_4 >+XKeySym.5 KP_5 >+XKeySym.6 KP_6 >+XKeySym.7 KP_7 >+XKeySym.8 KP_8 >+XKeySym.9 KP_9 >+XKeySym.Info i >+XKeySym.Mute m >+XKeySym.Play p >+XKeySym.Play y >+XKeySym.Pause space >+XKeySym.Stop s >+XKeySym.Record r >+XKeySym.FastFwd w >+XKeySym.FastRew e >+XKeySym.Next n >+XKeySym.Prev v >+XKeySym.Channel+ Prior >+XKeySym.Channel- Next >+XKeySym.Volume+ KP_Add >+XKeySym.Volume- KP_Subtract >+XKeySym.Audio a >+XKeySym.Subtitles u >+XKeySym.Schedule l >+XKeySym.Channels c >+XKeySym.Timers t >+XKeySym.Recordings o >+XKeySym.Setup S >+XKeySym.Commands C >+XKeySym.User1 U >+XKeySym.User2 V >+XKeySym.User3 W >+XKeySym.User4 X >+XKeySym.User5 Y >+XKeySym.User6 Z >+KBD.Up 00000000001B5B41 >+KBD.Down 00000000001B5B42 >+KBD.Menu 0000000000000009 >+KBD.Menu 000000001B5B327E >+KBD.Ok 000000000000000D >+KBD.Back 000000000000007F >+KBD.Back 0000000000000008 >+KBD.Left 00000000001B5B44 >+KBD.Right 00000000001B5B43 >+KBD.Red 0000001B5B31357E >+KBD.Green 0000001B5B31377E >+KBD.Yellow 0000001B5B31387E >+KBD.Blue 0000001B5B31397E >+KBD.0 0000000000000030 >+KBD.1 0000000000000031 >+KBD.2 0000000000000032 >+KBD.3 0000000000000033 >+KBD.4 0000000000000034 >+KBD.5 0000000000000035 >+KBD.6 0000000000000036 >+KBD.7 0000000000000037 >+KBD.8 0000000000000038 >+KBD.9 0000000000000039 >+KBD.Info 0000000000000069 >+KBD.Play 0000000000000070 >+KBD.Play 0000000000000079 >+KBD.Pause 0000000000000020 >+KBD.Stop 0000000000000073 >+KBD.Record 0000000000000072 >+KBD.FastFwd 0000000000000066 >+KBD.FastRew 0000000000000077 >+KBD.Next 000000000000006E >+KBD.Prev 0000000000000076 >+KBD.Power 000000000000001B >+KBD.Channel+ 000000001B5B357E >+KBD.Channel- 000000001B5B367E >+KBD.PrevChannel 000000001B5B317E >+KBD.Volume+ 000000000000002B >+KBD.Volume- 000000000000002D >+KBD.Mute 000000000000006D >+KBD.Audio 0000000000000061 >+KBD.Subtitles 0000000000000075 >+KBD.Schedule 000000000000006C >+KBD.Channels 0000000000000063 >+KBD.Timers 0000000000000074 >+KBD.Recordings 000000000000006F >+KBD.Setup 0000000000000053 >+KBD.Commands 0000000000000043 >+KBD.User1 0000000000000055 >+KBD.User2 0000000000000056 >+KBD.User3 0000000000000057 >+KBD.User4 0000000000000058 >+KBD.User5 0000000000000059 >+KBD.User6 000000000000005A >diff --git a/multimedia/vdr/files/vdr-waitdvb.in b/multimedia/vdr/files/vdr-waitdvb.in >new file mode 100644 >index 000000000..d1b6bf096 >--- /dev/null >+++ b/multimedia/vdr/files/vdr-waitdvb.in >@@ -0,0 +1,37 @@ >+#!/bin/sh >+ >+command="%%PREFIX%%/bin/vdr" >+ >+echo -n "vdr: waiting for dvb nodes: " >+i=0 >+while true >+do >+ ndvb=$(ls /dev/dvb/adapter*/frontend* 2>/dev/null|wc -l|tr -d ' ') >+ if [ $ndvb -gt 0 ]; then >+ break >+ fi >+ if [ $i -ge 60 ]; then >+ break >+ fi >+ i=$((i + 1)) >+ sleep 1 >+ echo -n "." >+done >+ >+i=0 >+while true >+do >+ sleep 2 >+ nndvb=$(ls /dev/dvb/adapter*/frontend* 2>/dev/null|wc -l|tr -d ' ') >+ echo -n " $nndvb" >+ if [ $nndvb -eq $ndvb ]; then >+ break >+ fi >+ if [ $i -ge 30 ]; then >+ break >+ fi >+ i=$((i + 1)) >+done >+echo . >+ >+exec "$command" "$@" >diff --git a/multimedia/vdr/files/vdr.in b/multimedia/vdr/files/vdr.in >new file mode 100644 >index 000000000..743325f9b >--- /dev/null >+++ b/multimedia/vdr/files/vdr.in >@@ -0,0 +1,44 @@ >+#!/bin/sh >+ >+# PROVIDE: vdr >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+# >+# Add the following line to /etc/rc.conf[.local] to enable vdr: >+# >+# vdr_enable="YES" >+# >+# And if you are using vdr plugins etc. add those including any plugin >+# parameters to /etc/rc.conf[.local] similar to this: >+# >+# vdr_flags="'-Pxineliboutput --local=none --remote=127.1:37890' \ >+# -Pfemon -Posdpip \ >+# -Posdteletext --cache-system=packed --max-cache=128' \ >+# -Pstreamdev-server '-Plive -i127.1' -Pepgsearch \ >+# -Pinfosatepg" >+ >+. /etc/rc.subr >+ >+name=vdr >+rcvar=vdr_enable >+ >+load_rc_config ${name} >+: ${vdr_enable="NO"} >+: ${vdr_chdir="%%VIDEODIR%%"} >+: ${vdr_waitdvb="YES"} >+ >+command="%%PREFIX%%/bin/vdr" >+procname="$command" >+command_args="-d" >+ >+start_precmd="${name}_prestart" >+ >+vdr_prestart() >+{ >+ if checkyesno "${name}_waitdvb"; then >+ command="/usr/sbin/daemon" >+ rc_flags="-f %%PREFIX%%/bin/vdr-waitdvb $rc_flags" >+ fi >+} >+ >+run_rc_command "$1" >diff --git a/multimedia/vdr/pkg-descr b/multimedia/vdr/pkg-descr >new file mode 100644 >index 000000000..823355796 >--- /dev/null >+++ b/multimedia/vdr/pkg-descr >@@ -0,0 +1,6 @@ >+Port of the Video Disk Recorder, use at your own risk! :) >+ >+See these links for general vdr info: >+ >+ http://www.linuxtv.org/vdrwiki/index.php/Main_Page >+ http://www.vdr-portal.de/ >diff --git a/multimedia/vdr/pkg-plist b/multimedia/vdr/pkg-plist >new file mode 100644 >index 000000000..316240db3 >--- /dev/null >+++ b/multimedia/vdr/pkg-plist >@@ -0,0 +1,162 @@ >+bin/svdrpsend >+bin/vdr >+bin/vdr-waitdvb >+lib/vdr/libvdr-svcsvr.so.2.6.3 >+lib/vdr/libvdr-svccli.so.2.6.3 >+lib/vdr/libvdr-status.so.2.6.3 >+lib/vdr/libvdr-skincurses.so.2.6.3 >+lib/vdr/libvdr-pictures.so.2.6.3 >+lib/vdr/libvdr-osddemo.so.2.6.3 >+lib/vdr/libvdr-hello.so.2.6.3 >+lib/vdr/libvdr-svdrpdemo.so.2.6.3 >+lib/vdr/libvdr-epgtableid0.so.2.6.3 >+libdata/pkgconfig/vdr.pc >+share/man/man1/vdr.1.gz >+share/man/man1/svdrpsend.1.gz >+share/man/man5/vdr.5.gz >+share/locale/ar/LC_MESSAGES/vdr.mo >+share/locale/es_ES/LC_MESSAGES/vdr.mo >+share/locale/es_ES/LC_MESSAGES/vdr-hello.mo >+share/locale/et_EE/LC_MESSAGES/vdr-pictures.mo >+share/locale/et_EE/LC_MESSAGES/vdr-skincurses.mo >+share/locale/fr_FR/LC_MESSAGES/vdr.mo >+share/locale/fr_FR/LC_MESSAGES/vdr-hello.mo >+share/locale/fr_FR/LC_MESSAGES/vdr-pictures.mo >+share/locale/pt_PT/LC_MESSAGES/vdr.mo >+share/locale/pt_PT/LC_MESSAGES/vdr-hello.mo >+share/locale/zh_CN/LC_MESSAGES/vdr.mo >+share/locale/zh_CN/LC_MESSAGES/vdr-hello.mo >+share/locale/lt_LT/LC_MESSAGES/vdr.mo >+share/locale/lt_LT/LC_MESSAGES/vdr-hello.mo >+share/locale/lt_LT/LC_MESSAGES/vdr-pictures.mo >+share/locale/lt_LT/LC_MESSAGES/vdr-skincurses.mo >+share/locale/mk_MK/LC_MESSAGES/vdr.mo >+share/locale/uk_UA/LC_MESSAGES/vdr.mo >+share/locale/tr_TR/LC_MESSAGES/vdr.mo >+share/locale/tr_TR/LC_MESSAGES/vdr-hello.mo >+share/locale/sr_RS/LC_MESSAGES/vdr.mo >+share/locale/sv_SE/LC_MESSAGES/vdr.mo >+share/locale/sv_SE/LC_MESSAGES/vdr-hello.mo >+share/locale/sl_SI/LC_MESSAGES/vdr.mo >+share/locale/sl_SI/LC_MESSAGES/vdr-hello.mo >+share/locale/sk_SK/LC_MESSAGES/vdr.mo >+share/locale/sk_SK/LC_MESSAGES/vdr-hello.mo >+share/locale/sk_SK/LC_MESSAGES/vdr-pictures.mo >+share/locale/sk_SK/LC_MESSAGES/vdr-skincurses.mo >+share/locale/ru_RU/LC_MESSAGES/vdr.mo >+share/locale/ru_RU/LC_MESSAGES/vdr-hello.mo >+share/locale/ru_RU/LC_MESSAGES/vdr-pictures.mo >+share/locale/ru_RU/LC_MESSAGES/vdr-skincurses.mo >+share/locale/ro_RO/LC_MESSAGES/vdr.mo >+share/locale/ro_RO/LC_MESSAGES/vdr-hello.mo >+share/locale/pl_PL/LC_MESSAGES/vdr.mo >+share/locale/pl_PL/LC_MESSAGES/vdr-hello.mo >+share/locale/pl_PL/LC_MESSAGES/vdr-pictures.mo >+share/locale/pl_PL/LC_MESSAGES/vdr-skincurses.mo >+share/locale/nn_NO/LC_MESSAGES/vdr.mo >+share/locale/nn_NO/LC_MESSAGES/vdr-hello.mo >+share/locale/nl_NL/LC_MESSAGES/vdr.mo >+share/locale/nl_NL/LC_MESSAGES/vdr-hello.mo >+share/locale/it_IT/LC_MESSAGES/vdr.mo >+share/locale/it_IT/LC_MESSAGES/vdr-hello.mo >+share/locale/it_IT/LC_MESSAGES/vdr-pictures.mo >+share/locale/it_IT/LC_MESSAGES/vdr-skincurses.mo >+share/locale/hu_HU/LC_MESSAGES/vdr.mo >+share/locale/hu_HU/LC_MESSAGES/vdr-hello.mo >+share/locale/hr_HR/LC_MESSAGES/vdr.mo >+share/locale/hr_HR/LC_MESSAGES/vdr-hello.mo >+share/locale/fi_FI/LC_MESSAGES/vdr.mo >+share/locale/fi_FI/LC_MESSAGES/vdr-hello.mo >+share/locale/fi_FI/LC_MESSAGES/vdr-pictures.mo >+share/locale/fi_FI/LC_MESSAGES/vdr-skincurses.mo >+share/locale/et_EE/LC_MESSAGES/vdr.mo >+share/locale/et_EE/LC_MESSAGES/vdr-hello.mo >+share/locale/el_GR/LC_MESSAGES/vdr.mo >+share/locale/el_GR/LC_MESSAGES/vdr-hello.mo >+share/locale/de_DE/LC_MESSAGES/vdr.mo >+share/locale/de_DE/LC_MESSAGES/vdr-hello.mo >+share/locale/de_DE/LC_MESSAGES/vdr-pictures.mo >+share/locale/de_DE/LC_MESSAGES/vdr-skincurses.mo >+share/locale/da_DK/LC_MESSAGES/vdr.mo >+share/locale/da_DK/LC_MESSAGES/vdr-hello.mo >+share/locale/cs_CZ/LC_MESSAGES/vdr.mo >+share/locale/cs_CZ/LC_MESSAGES/vdr-hello.mo >+share/locale/ca_ES/LC_MESSAGES/vdr.mo >+share/locale/ca_ES/LC_MESSAGES/vdr-hello.mo >+include/libsi/descriptor.h >+include/libsi/headers.h >+include/libsi/section.h >+include/libsi/si.h >+include/libsi/util.h >+include/vdr/args.h >+include/vdr/audio.h >+include/vdr/channels.h >+include/vdr/ci.h >+include/vdr/config.h >+include/vdr/cutter.h >+include/vdr/device.h >+include/vdr/diseqc.h >+include/vdr/dvbci.h >+include/vdr/dvbdevice.h >+include/vdr/dvbplayer.h >+include/vdr/dvbspu.h >+include/vdr/dvbsubtitle.h >+include/vdr/eit.h >+include/vdr/eitscan.h >+include/vdr/epg.h >+include/vdr/filter.h >+include/vdr/font.h >+include/vdr/i18n.h >+include/vdr/interface.h >+include/vdr/keys.h >+include/vdr/lirc.h >+include/vdr/menu.h >+include/vdr/menuitems.h >+include/vdr/mtd.h >+include/vdr/nit.h >+include/vdr/osd.h >+include/vdr/osdbase.h >+include/vdr/pat.h >+include/vdr/player.h >+include/vdr/plugin.h >+include/vdr/positioner.h >+include/vdr/receiver.h >+include/vdr/recorder.h >+include/vdr/recording.h >+include/vdr/remote.h >+include/vdr/remux.h >+include/vdr/ringbuffer.h >+include/vdr/sdt.h >+include/vdr/sections.h >+include/vdr/shutdown.h >+include/vdr/skinclassic.h >+include/vdr/skinlcars.h >+include/vdr/skins.h >+include/vdr/skinsttng.h >+include/vdr/sourceparams.h >+include/vdr/sources.h >+include/vdr/spu.h >+include/vdr/status.h >+include/vdr/svdrp.h >+include/vdr/themes.h >+include/vdr/thread.h >+include/vdr/timers.h >+include/vdr/tools.h >+include/vdr/transfer.h >+include/vdr/videodir.h >+@dir share/vdr >+@dir(%%VDR_USER%%,%%VDR_GROUP%%,) etc/vdr >+@dir(%%VDR_USER%%,%%VDR_GROUP%%,) etc/vdr/plugins >+@dir(%%VDR_USER%%,%%VDR_GROUP%%,) etc/vdr/conf.d >+@dir(%%VDR_USER%%,%%VDR_GROUP%%,) /var/cache/vdr >+@owner %%VDR_USER%% >+@group %%VDR_GROUP%% >+etc/vdr/camresponses.conf >+etc/vdr/channels.conf >+etc/vdr/diseqc.conf >+etc/vdr/keymacros.conf >+etc/vdr/remote.conf >+etc/vdr/scr.conf >+etc/vdr/sources.conf >+etc/vdr/svdrphosts.conf >+@postunexec echo "Warning: If you will *NOT* use this package anymore, please remove the vdr user and group manually." >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 273788
: 244843 |
244844