Mail archive
alpine-aports

[alpine-aports] [PATCH v2 1/2] unmaintained/vdr: Takeover, update, improve and modernize package

From: Taner Tas <taner76_at_gmail.com>
Date: Tue, 11 Jul 2017 07:00:08 +0000

---
 unmaintained/vdr/APKBUILD                  | 121 +++++++++++++------
 unmaintained/vdr/Make.config               |   1 +
 unmaintained/vdr/musl-compat.patch         | 181 +++++++++++------------------
 unmaintained/vdr/softhddevice-musl.patch   |  19 +++
 unmaintained/vdr/streamdev-for-2.3.7.patch |  46 ++++++++
 5 files changed, 218 insertions(+), 150 deletions(-)
 create mode 100644 unmaintained/vdr/softhddevice-musl.patch
 create mode 100644 unmaintained/vdr/streamdev-for-2.3.7.patch
diff --git a/unmaintained/vdr/APKBUILD b/unmaintained/vdr/APKBUILD
index 9fde5bd9..09376e27 100644
--- a/unmaintained/vdr/APKBUILD
+++ b/unmaintained/vdr/APKBUILD
_at_@ -1,52 +1,103 @@
 # Contributor: Carlo Landmeter <clandmeter_at_gmail.com>
-# Maintainer:
+# Maintainer: Taner Tas <taner76_at_gmail.com>
 pkgname=vdr
-pkgver=2.1.6
-pkgrel=0
-pkgdesc="Video Disk Recorde"
+pkgver=2.3.8
+pkgrel=1
+pkgdesc="Video Disk Recorder"
 url="http://www.tvdr.de/"
 arch="all"
 license="GPL2"
 depends=""
-depends_dev="fontconfig-dev freetype-dev gettext-dev libjpeg-turbo-dev
-	fribidi-dev libcap-dev"
-makedepends="$depends_dev perl coreutils"
-install=""
-subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
-source="http://projects.vdr-developer.org/git/vdr.git/snapshot/vdr-2.1.6.tar.bz2
+depends_dev="libexecinfo-dev fontconfig-dev freetype-dev gettext-dev libjpeg-turbo-dev fribidi-dev
+	libcap-dev alsa-lib-dev libvdpau-dev libva-dev libx11-dev xcb-util-dev xcb-util-wm-dev
+	ffmpeg-dev libcdio-dev mpv"
+makedepends="$depends_dev coreutils"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-softhddevice $pkgname-femon $pkgname-mpv"
+options="!check"
+
+_femon_ver=28e4fb8de8578a1b8a36eb38d2e710dc60be7e3f
+_softhddevice_ver=9c90c5afbd85a113781a7d8fb10e7d68a109c698
+_mpv_ver=87543f7058b88a3ace8550551bb3982cc304720e
+_vnsiserver_ver=2c42df3cf1ba37184e9106091f383ea6009490da
+_streamdev_ver=b84b7d858cf4f6f3473ba72d456326c048946cb0
+
+source="ftp://ftp.tvdr.de/vdr/Developer/vdr-${pkgver}.tar.bz2
+	vdr-plugin-femon-${_femon_ver}.tar.gz::https://github.com/rofafor/vdr-plugin-femon/archive/${_femon_ver}.tar.gz
+	vdr-plugin-softhddevice-${_softhddevice_ver}.tar.gz::https://github.com/rofafor/vdr-plugin-softhddevice/archive/${_softhddevice_ver}.tar.gz
+	vdr-plugin-mpv-${_mpv_ver}.tar.gz::https://github.com/chriszero/vdr-plugin-mpv/archive/${_mpv_ver}.tar.gz
+	vdr-plugin-vnsiserver-${_vnsiserver_ver}.tar.gz::https://github.com/FernetMenta/vdr-plugin-vnsiserver/archive/${_vnsiserver_ver}.tar.gz
+	vdr-plugin-streamdev-${_streamdev_ver}.tar.gz::https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git/snapshot/vdr-plugin-streamdev-${_streamdev_ver}.tar.gz
 	musl-compat.patch
+	softhddevice-musl.patch
+	streamdev-for-2.3.7.patch
 	Make.config"
 
-_builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
 
 prepare() {
-	local i
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
+	rm -rf ${builddir}/PLUGINS/src/skincurses
+	cp -aP $srcdir/vdr-plugin-femon-${_femon_ver} ${builddir}/PLUGINS/src/femon
+	cp -aP $srcdir/vdr-plugin-softhddevice-${_softhddevice_ver} ${builddir}/PLUGINS/src/softhddevice
+	cp -aP $srcdir/vdr-plugin-mpv-${_mpv_ver} ${builddir}/PLUGINS/src/mpv
+	cp -aP $srcdir/vdr-plugin-vnsiserver-${_vnsiserver_ver} ${builddir}/PLUGINS/src/vnsiserver
+	cp -aP $srcdir/vdr-plugin-streamdev-${_streamdev_ver} ${builddir}/PLUGINS/src/streamdev
+	cd "$builddir"
+	default_prepare
 }
 
 build() {
-	cd "$_builddir"
-	cp $srcdir/Make.config \
-		$_builddir || return 1
-	make || return 1
+	cd "$builddir"
+	cp $srcdir/Make.config $builddir
+	make
+}
+
+softhddevice() {
+	depends="${pkgname} alsa-lib libvdpau libva ffmpeg-libs"
+	cd "$pkgdir"
+	mkdir -p ${subpkgdir}/usr/lib/vdr
+	mv usr/lib/vdr/lib${subpkgname}.so.${pkgver} ${subpkgdir}/usr/lib/vdr
+}
+
+femon() {
+	depends="${pkgname}"
+	cd "$pkgdir"
+	mkdir -p ${subpkgdir}/usr/lib/vdr
+	mv usr/lib/vdr/lib${subpkgname}.so.${pkgver} ${subpkgdir}/usr/lib/vdr
+}
+
+mpv() {
+	depends="${pkgname} mpv-libs libcdio"
+	cd "$pkgdir"
+	mkdir -p ${subpkgdir}/usr/lib/vdr
+	mv usr/lib/vdr/lib${subpkgname}.so.${pkgver} ${subpkgdir}/usr/lib/vdr
+}
+
+vnsiserver() {
+	depends="${pkgname}"
+	cd "$pkgdir"
+	mkdir -p ${subpkgdir}/usr/lib/vdr
+	mv usr/lib/vdr/lib${subpkgname}.so.${pkgver} ${subpkgdir}/usr/lib/vdr
+}
+
+streamdev() {
+	depends="${pkgname}"
+	cd "$pkgdir"
+	mkdir -p ${subpkgdir}/usr/lib/vdr
+	mv lib${subpkgname}-server.so.${pkgver} ${subpkgdir}/usr/lib/vdr
+	mv lib${subpkgname}-client.so.${pkgver} ${subpkgdir}/usr/lib/vdr
 }
 
 package() {
-	cd "$_builddir"
-	make -j1 DESTDIR="$pkgdir" install || return 1
-}
-
-md5sums="e3cd52a7ab117806f84f33189b67d10f  vdr-2.1.6.tar.bz2
-05df0b4253c6e0067ef595f8216031aa  musl-compat.patch
-4e51eaaa7d091e1ae940e6d91e889993  Make.config"
-sha256sums="39a66e7c40ef2d7618b5b832cb7f7db99e0497cb0e58e6b825ba5f63360c6c4f  vdr-2.1.6.tar.bz2
-e45a56f50aaac978efad1cec2de39f14cabeb0b95b84d7cec5016e18a574cda5  musl-compat.patch
-7bac17fbdb590bc4d751f367f9ad35581c7f2367ae9531ee69b3e378dafbace7  Make.config"
-sha512sums="7896d5d05fbcc1435a86e584cc49e95ff56486462299cb21765ddedcec32b6bbc46aea7080ee5ad714ff82fcbf7ccd1ea5c527b07a9892192ce0d23de10936eb  vdr-2.1.6.tar.bz2
-02d4872edc7c934735e44e1af6a4a9fabc2de9d1bef301c1407f7b4533c8e8c5f7fe4fc7319669ba6bf7483daa0c9a4f0489024c15ab7ed2949e04dc11a25da8  musl-compat.patch
-bdf9cfd7dbf30efec5dc0421b15960c779deef0fe4ba975a608d1bec41c79caa9dd3fc8a0c9863df137cacc0222f7a881a7c1870f99528ba46efaed18358103b  Make.config"
+	cd "$builddir"
+	make -j1 DESTDIR="$pkgdir" install
+}
+sha512sums="9dd8d90b365c255bfdf334f6f20a65671dbaf02da68dffdba003fe59243fc0636213b9df47bd6d350046fe4c6b3cb7568f2d9fd5ccdbff534328bc82e5a18d0b  vdr-2.3.8.tar.bz2
+4f09246b0293617ee959ea768f215724c3996e10d7ee09399ce7c571d30e34da062df84d44465142261ea06069b09bac8b4a683a8dee54713385cc73f485c426  vdr-plugin-femon-28e4fb8de8578a1b8a36eb38d2e710dc60be7e3f.tar.gz
+e6f0a6c92ab4ce282ece053eb254fe8be51c2284651a6c1c215d5cf2a51093dd387490a8731b8d41ba7c0f87ea9e0f638a89e56f718f73691fb4e195a5fbf409  vdr-plugin-softhddevice-9c90c5afbd85a113781a7d8fb10e7d68a109c698.tar.gz
+a9047da75cc11e675123d418c15a9712ac019658836630c7949699e39a0ade555dd2d52845abffd2cce0857e2c810f4bb5a7bf8b80dbc1a3c1b75002392dece3  vdr-plugin-mpv-87543f7058b88a3ace8550551bb3982cc304720e.tar.gz
+8fd60ff87bdc5eeadd6438902171340df940293c275fde0bda413c7bb788a8d08942b24523998692111621117b0b47e35eb8c65c55a7365c18bf520afa019167  vdr-plugin-vnsiserver-2c42df3cf1ba37184e9106091f383ea6009490da.tar.gz
+63b0fb071f0bd38a2f8077ae5a71a484217c5c887ae815161c757058ecd75360a4f78c86eb12060b45404113581f3bcb0b2ea814aa6b60d18f88f84eba8b8f5b  vdr-plugin-streamdev-b84b7d858cf4f6f3473ba72d456326c048946cb0.tar.gz
+f47461445515e44f5cdb9c6d3b1bcae323bb83ba3de7c77a3be4d9ac99ed9e76ebe2ee720660c5593fa4b6995366b9d98bf1683f7b8786518a444de7754731ca  musl-compat.patch
+c6f89ba45bf02c0d85963797ff579f3ae0616a827f2b883685b44241bddea7916c3d6da21790553d161884c39d12ee21fc10f7d9d5aee9767cdde10cde02baac  softhddevice-musl.patch
+60262ccb296bb098a469cce102f97da191af811ba7b0cbabc9d071275b1262f71e57933541b9a30fa0f4336384b2a5a711577e772ff7c751ddb07a9cbdd067dc  streamdev-for-2.3.7.patch
+0add913727ebc2ab290211354e2310573f7ece14fcad8636b0a1d7cff49e32027e2d5a6aab3050e577f62387efff8aecc73dfc16e0f876ae28c5257fc9b6c67f  Make.config"
diff --git a/unmaintained/vdr/Make.config b/unmaintained/vdr/Make.config
index e7564e43..bc519ae8 100644
--- a/unmaintained/vdr/Make.config
+++ b/unmaintained/vdr/Make.config
_at_@ -10,3 +10,4 @@ PCDIR     = $(PREFIX)/lib/pkgconfig
 RESDIR    = $(PREFIX)/share/vdr
 VIDEODIR  = $(VARDIR)/lib/vdr/video
 CACHEDIR  = $(VARDIR)/cache/vdr
+LIBS+=-lintl -lexecinfo
diff --git a/unmaintained/vdr/musl-compat.patch b/unmaintained/vdr/musl-compat.patch
index 04a1636e..4b5dbbf4 100644
--- a/unmaintained/vdr/musl-compat.patch
+++ b/unmaintained/vdr/musl-compat.patch
_at_@ -1,59 +1,18 @@
-diff --git a/Makefile b/Makefile
-index 0d3a8fc..43349ed 100644
---- a/Makefile
-+++ b/Makefile
-_at_@ -19,7 +19,7 @@ CXXFLAGS ?= -g -O3 -Wall -Werror=overloaded-virtual -Wno-parentheses
- 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 -ldl -lcap -lrt -lintl $(shell pkg-config --libs freetype2 fontconfig)
- INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig)
- 
- # Directories:
-diff --git a/PLUGINS/src/dvbsddevice/dvbsdffosd.c b/PLUGINS/src/dvbsddevice/dvbsdffosd.c
-index 1a8caf8..b82cc52 100644
---- a/PLUGINS/src/dvbsddevice/dvbsdffosd.c
-+++ b/PLUGINS/src/dvbsddevice/dvbsdffosd.c
-_at_@ -10,7 +10,7 @@
- #include <linux/dvb/osd.h>
- #include <signal.h>
- #include <sys/ioctl.h>
--#include <sys/unistd.h>
-+#include <unistd.h>
- #include <vdr/tools.h>
- 
- // --- cDvbSdFfOsd -----------------------------------------------------------
-diff --git a/font.c b/font.c
-index cd2c494..0c052a1 100644
---- a/font.c
-+++ b/font.c
-_at_@ -433,7 +433,7 @@ bool cFont::GetAvailableFontNames(cStringList *FontNames, bool Monospaced)
- {
-   if (!FontNames->Size()) {
-      FcInit();
--     FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
-+     FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, (char *)NULL);
-      FcPattern *pat = FcPatternCreate();
-      FcPatternAddBool(pat, FC_SCALABLE, FcTrue);
-      if (Monospaced)
 diff --git a/i18n.h b/i18n.h
-index c3f1fc7..0ace2cd 100644
+index f8ad9de..b002bbf 100644
 --- a/i18n.h
 +++ b/i18n.h
-_at_@ -17,6 +17,10 @@
- #define I18N_MAX_LOCALE_LEN 16       // for buffers that hold en_US etc.
- #define I18N_MAX_LANGUAGES  256      // for buffers that hold all available languages
- 
-+#ifndef __attribute_format_arg__
-+#define __attribute_format_arg__(x)
-+#endif
-+
- void I18nInitialize(const char *LocaleDir = NULL);
-    ///< Detects all available locales and loads the language names and codes.
-    ///< If LocaleDir is given, it must point to a static string that lives
+_at_@ -46,7 +46,7 @@ const cStringList *I18nLanguages(void);
+    ///< 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.
+-const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1);
++const char *I18nTranslate(const char *s, const char *Plugin = NULL)  __attribute__((__format_arg__ (1)));
+    ///< 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/osd.c b/osd.c
-index 7e52782..c372245 100644
+index 524700a..ef975f5 100644
 --- a/osd.c
 +++ b/osd.c
 _at_@ -12,7 +12,7 @@
_at_@ -66,20 +25,20 @@ index 7e52782..c372245 100644
  #include "tools.h"
  
 diff --git a/thread.c b/thread.c
-index e5e19c9..fab13a2 100644
+index 47eb977..58dba43 100644
 --- a/thread.c
 +++ b/thread.c
-_at_@ -143,7 +143,9 @@ cRwLock::cRwLock(bool PreferWriter)
- {
+_at_@ -155,7 +155,9 @@ cRwLock::cRwLock(bool PreferWriter)
+   writeLockThreadId = 0;
    pthread_rwlockattr_t attr;
    pthread_rwlockattr_init(&attr);
-+  #if defined(PTHREAD_RWLOCK_PREFER_WRITER_NP) && defined(PTHREAD_RWLOCK_PREFER_READER_NP)
++#if defined(__GLIBC__)
    pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP);
-+  #endif
++#endif
    pthread_rwlock_init(&rwlock, &attr);
  }
  
-_at_@ -179,7 +181,7 @@ cMutex::cMutex(void)
+_at_@ -205,7 +207,7 @@ cMutex::cMutex(void)
    locked = 0;
    pthread_mutexattr_t attr;
    pthread_mutexattr_init(&attr);
_at_@ -88,41 +47,11 @@ index e5e19c9..fab13a2 100644
    pthread_mutex_init(&mutex, &attr);
  }
  
-_at_@ -507,7 +509,7 @@ bool cPipe::Open(const char *Command, const char *Mode)
-         int MaxPossibleFileDescriptors = getdtablesize();
-         for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++)
-             close(i); //close all dup'ed filedescriptors
--        if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
-+        if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) {
-            LOG_ERROR_STR(Command);
-            close(fd[1 - iopipe]);
-            _exit(-1);
-_at_@ -590,7 +592,7 @@ int SystemExec(const char *Command, bool Detached)
-      int MaxPossibleFileDescriptors = getdtablesize();
-      for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++)
-          close(i); //close all dup'ed filedescriptors
--     if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
-+     if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) {
-         LOG_ERROR_STR(Command);
-         _exit(-1);
-         }
 diff --git a/tools.c b/tools.c
-index a2055ec..31fb245 100644
+index 754673d..fef9d2d 100644
 --- a/tools.c
 +++ b/tools.c
-_at_@ -32,6 +32,11 @@ int SysLogLevel = 3;
- 
- #define MAXSYSLOGBUF 256
- 
-+#ifndef ACCESSPERMS
-+#   define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
-+#endif
-+
-+
- void syslog_with_tid(int priority, const char *format, ...)
- {
-   va_list ap;
-_at_@ -618,7 +623,7 @@ char *ReadLink(const char *FileName)
+_at_@ -640,7 +640,7 @@ char *ReadLink(const char *FileName)
  {
    if (!FileName)
       return NULL;
_at_@ -131,52 +60,74 @@ index a2055ec..31fb245 100644
    if (!TargetName) {
       if (errno == ENOENT) // file doesn't exist
          TargetName = strdup(FileName);
+_at_@ -1528,7 +1528,7 @@
+ struct dirent *cReadDir::Next(void)
+ {
+   if (directory) {
+-#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
++#if __GLIBC__
+      while (readdir_r(directory, &u.d, &result) == 0 && result) {
+ #else
+      while ((result = readdir(directory)) != NULL) {
 diff --git a/tools.h b/tools.h
-index 358f75e..2029e31 100644
+index 73cca5a..03f5fd1 100644
 --- a/tools.h
 +++ b/tools.h
-_at_@ -24,6 +24,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
-+#include <limits.h>
- #include <sys/stat.h>
+_at_@ -28,6 +28,16 @@
  #include <sys/types.h>
+ #include "thread.h"
  
-_at_@ -31,6 +32,10 @@ typedef unsigned char uchar;
- 
- extern int SysLogLevel;
- 
++#ifndef ACCESSPERMS
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
++#endif
++#ifndef ALLPERMS
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
++#endif
 +#ifndef DEFFILEMODE
-+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666 */
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
 +#endif
 +
- #define esyslog(a...) void( (SysLogLevel > 0) ? syslog_with_tid(LOG_ERR,   a) : void() )
- #define isyslog(a...) void( (SysLogLevel > 1) ? syslog_with_tid(LOG_INFO,  a) : void() )
- #define dsyslog(a...) void( (SysLogLevel > 2) ? syslog_with_tid(LOG_DEBUG, a) : void() )
-_at_@ -567,7 +572,7 @@ public:
+ typedef unsigned char uchar;
+ 
+ extern int SysLogLevel;
+_at_@ -400,7 +410,7 @@
+ private:
+   DIR *directory;
+   struct dirent *result;
+-#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
++#if __GLIBC__
+   union { // according to "The GNU C Library Reference Manual"
+     struct dirent d;
+     char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
+_at_@ -738,7 +748,7 @@ public:
          data[i] = T(0);
      size = 0;
    }
 -  void Sort(__compar_fn_t Compare)
-+  void Sort(int (* Compare)(const void *, const void *))
++  void Sort(int (*Compare)(const void *, const void *))
    {
      qsort(data, size, sizeof(T), Compare);
    }
 diff --git a/vdr.c b/vdr.c
-index 835d33d..977683d 100644
+index 8a49471..c2a82aa 100644
 --- a/vdr.c
 +++ b/vdr.c
-_at_@ -610,9 +610,9 @@ int main(int argc, char *argv[])
+_at_@ -670,12 +670,18 @@ int main(int argc, char *argv[])
+         }
       }
    else if (Terminal) {
++#ifdef __GLIBC__
       // Claim new controlling terminal
--     stdin  = freopen(Terminal, "r", stdin);
--     stdout = freopen(Terminal, "w", stdout);
--     stderr = freopen(Terminal, "w", stderr);
-+     freopen(Terminal, "r", stdin);
-+     freopen(Terminal, "w", stdout);
-+     freopen(Terminal, "w", stderr);
+      stdin  = freopen(Terminal, "r", stdin);
+      stdout = freopen(Terminal, "w", stdout);
+      stderr = freopen(Terminal, "w", stderr);
       HasStdin = true;
       tcgetattr(STDIN_FILENO, &savedTm);
++#else
++     // stdin, stdout, stderr are declared FILE const* by musl C library
++     fprintf(stderr, "Option '-t' is only supported if VDR has been built against glibc.\n");
++     return 2;
++#endif
       }
+ 
+   isyslog("VDR version %s started", VDRVERSION);
diff --git a/unmaintained/vdr/softhddevice-musl.patch b/unmaintained/vdr/softhddevice-musl.patch
new file mode 100644
index 00000000..8564ef5e
--- /dev/null
+++ b/unmaintained/vdr/softhddevice-musl.patch
_at_@ -0,0 +1,19 @@
+--- a/PLUGINS/src/softhddevice/audio.c
++++ b/PLUGINS/src/softhddevice/audio.c
+_at_@ -48,6 +48,7 @@
+ #include <inttypes.h>
+ #include <string.h>
+ #include <math.h>
++#include <sched.h>
+ 
+ #include <libintl.h>
+ #define _(str) gettext(str)		///< gettext shortcut
+_at_@ -1584,7 +1585,7 @@
+ 	if (err < 0) {			// underrun error
+ 	    return -1;
+ 	}
+-	pthread_yield();
++	sched_yield();
+ 	usleep(OssFragmentTime * 1000);	// let fill/empty the buffers
+ 	return 0;
+     }
diff --git a/unmaintained/vdr/streamdev-for-2.3.7.patch b/unmaintained/vdr/streamdev-for-2.3.7.patch
new file mode 100644
index 00000000..0b9b9e10
--- /dev/null
+++ b/unmaintained/vdr/streamdev-for-2.3.7.patch
_at_@ -0,0 +1,46 @@
+From ce74c3ab559d579c37ad8ac29ddfc188d2f3ba26 Mon Sep 17 00:00:00 2001
+From: Jasmin Jessich <jasmin_at_anw.at>
+Date: Sun, 11 Jun 2017 21:01:01 +0200
+Subject: [PATCH] Fixed compilation for vdr 2.3.7
+
+--- a/PLUGINS/src/streamdev/server/connectionVTP.c
++++ b/PLUGINS/src/streamdev/server/connectionVTP.c
+_at_@ -41,7 +41,9 @@ private:
+ 	enum eStates { Channel, Event, Title, Subtitle, Description, Vps, Content, Rating,
+ 	               EndEvent, EndChannel, EndEPG };
+ 	cConnectionVTP    *m_Client;
++#if APIVERSNUM < 20300
+ 	cSchedulesLock    *m_SchedulesLock;
++#endif
+ 	const cSchedules  *m_Schedules;
+ 	const cSchedule   *m_Schedule;
+ 	const cEvent      *m_Event;
+_at_@ -210,7 +212,9 @@ cLSTEHandler::cLSTEHandler(cConnectionVTP *Client, const char *Option):
+ 
+ cLSTEHandler::~cLSTEHandler()
+ {
++#if APIVERSNUM < 20300
+ 	delete m_SchedulesLock;
++#endif
+ }
+ 
+ bool cLSTEHandler::Next(bool &Last)
+--- a/PLUGINS/src/streamdev/Makefile.orig
++++ b/PLUGINS/src/streamdev/Makefile
+_at_@ -16,7 +16,7 @@
+ ### The directory environment:
+ 
+ # Use package data if installed...otherwise assume we're under the VDR source directory:
+-PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
++PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell PKG_CONFIG_PATH="$$PKG_CONFIG_PATH:../../.." pkg-config --variable=$(1) vdr))
+ LIBDIR = $(call PKGCFG,libdir)
+ LOCDIR = $(call PKGCFG,locdir)
+ PLGCFG = $(call PKGCFG,plgcfg)
+_at_@ -37,8 +37,6 @@
+ -include $(PLGCFG)
+ 
+ ### export all vars for sub-makes, using absolute paths
+-LIBDIR := $(shell cd $(LIBDIR) >/dev/null 2>&1 && pwd)
+-LOCDIR := $(shell cd $(LOCDIR) >/dev/null 2>&1 && pwd)
+ export
+ unexport PLUGIN
-- 
2.13.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Jul 11 2017 - 07:00:08 UTC