diff options
author | Taner Tas <taner76@gmail.com> | 2017-07-11 07:00:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-07-24 10:40:53 +0000 |
commit | 5a98b04cc37938b42fc9de0da61eef3792e8c001 (patch) | |
tree | 242d791ac3c05a956f7a26bc28a3f50390e6113a /testing/vdr | |
parent | 60d203036f77aa3a021d0a66264031059c9a2f55 (diff) | |
download | aports-5a98b04cc37938b42fc9de0da61eef3792e8c001.tar.bz2 aports-5a98b04cc37938b42fc9de0da61eef3792e8c001.tar.xz |
unmaintained/vdr/APKBUILD -> testing/vdr:
Diffstat (limited to 'testing/vdr')
-rw-r--r-- | testing/vdr/APKBUILD | 103 | ||||
-rw-r--r-- | testing/vdr/Make.config | 13 | ||||
-rw-r--r-- | testing/vdr/musl-compat.patch | 133 | ||||
-rw-r--r-- | testing/vdr/softhddevice-musl.patch | 19 | ||||
-rw-r--r-- | testing/vdr/streamdev-for-2.3.7.patch | 46 |
5 files changed, 314 insertions, 0 deletions
diff --git a/testing/vdr/APKBUILD b/testing/vdr/APKBUILD new file mode 100644 index 0000000000..09376e2760 --- /dev/null +++ b/testing/vdr/APKBUILD @@ -0,0 +1,103 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Taner Tas <taner76@gmail.com> +pkgname=vdr +pkgver=2.3.8 +pkgrel=1 +pkgdesc="Video Disk Recorder" +url="http://www.tvdr.de/" +arch="all" +license="GPL2" +depends="" +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" + +prepare() { + 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 + 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 +} +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/testing/vdr/Make.config b/testing/vdr/Make.config new file mode 100644 index 0000000000..bc519ae853 --- /dev/null +++ b/testing/vdr/Make.config @@ -0,0 +1,13 @@ +PREFIX = /usr +VARDIR = /var +CONFDIR = /etc/vdr +BINDIR = $(PREFIX)/bin +INCDIR = $(PREFIX)/include +LIBDIR = $(PREFIX)/lib/vdr +LOCDIR = $(PREFIX)/share/locale +MANDIR = $(PREFIX)/share/man +PCDIR = $(PREFIX)/lib/pkgconfig +RESDIR = $(PREFIX)/share/vdr +VIDEODIR = $(VARDIR)/lib/vdr/video +CACHEDIR = $(VARDIR)/cache/vdr +LIBS+=-lintl -lexecinfo diff --git a/testing/vdr/musl-compat.patch b/testing/vdr/musl-compat.patch new file mode 100644 index 0000000000..4b5dbbf457 --- /dev/null +++ b/testing/vdr/musl-compat.patch @@ -0,0 +1,133 @@ +diff --git a/i18n.h b/i18n.h +index f8ad9de..b002bbf 100644 +--- a/i18n.h ++++ b/i18n.h +@@ -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 524700a..ef975f5 100644 +--- a/osd.c ++++ b/osd.c +@@ -12,7 +12,7 @@ + #include <stdlib.h> + #include <sys/ioctl.h> + #include <sys/stat.h> +-#include <sys/unistd.h> ++#include <unistd.h> + #include "device.h" + #include "tools.h" + +diff --git a/thread.c b/thread.c +index 47eb977..58dba43 100644 +--- a/thread.c ++++ b/thread.c +@@ -155,7 +155,9 @@ cRwLock::cRwLock(bool PreferWriter) + writeLockThreadId = 0; + pthread_rwlockattr_t attr; + pthread_rwlockattr_init(&attr); ++#if defined(__GLIBC__) + pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP); ++#endif + pthread_rwlock_init(&rwlock, &attr); + } + +@@ -205,7 +207,7 @@ cMutex::cMutex(void) + locked = 0; + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); +- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); ++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); + pthread_mutex_init(&mutex, &attr); + } + +diff --git a/tools.c b/tools.c +index 754673d..fef9d2d 100644 +--- a/tools.c ++++ b/tools.c +@@ -640,7 +640,7 @@ char *ReadLink(const char *FileName) + { + if (!FileName) + return NULL; +- char *TargetName = canonicalize_file_name(FileName); ++ char *TargetName = realpath(FileName, NULL); + if (!TargetName) { + if (errno == ENOENT) // file doesn't exist + TargetName = strdup(FileName); +@@ -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 73cca5a..03f5fd1 100644 +--- a/tools.h ++++ b/tools.h +@@ -28,6 +28,16 @@ + #include <sys/types.h> + #include "thread.h" + ++#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*/ ++#endif ++ + typedef unsigned char uchar; + + extern int SysLogLevel; +@@ -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]; +@@ -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 *)) + { + qsort(data, size, sizeof(T), Compare); + } +diff --git a/vdr.c b/vdr.c +index 8a49471..c2a82aa 100644 +--- a/vdr.c ++++ b/vdr.c +@@ -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); + 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/testing/vdr/softhddevice-musl.patch b/testing/vdr/softhddevice-musl.patch new file mode 100644 index 0000000000..8564ef5e72 --- /dev/null +++ b/testing/vdr/softhddevice-musl.patch @@ -0,0 +1,19 @@ +--- a/PLUGINS/src/softhddevice/audio.c ++++ b/PLUGINS/src/softhddevice/audio.c +@@ -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 +@@ -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/testing/vdr/streamdev-for-2.3.7.patch b/testing/vdr/streamdev-for-2.3.7.patch new file mode 100644 index 0000000000..0b9b9e1023 --- /dev/null +++ b/testing/vdr/streamdev-for-2.3.7.patch @@ -0,0 +1,46 @@ +From ce74c3ab559d579c37ad8ac29ddfc188d2f3ba26 Mon Sep 17 00:00:00 2001 +From: Jasmin Jessich <jasmin@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 +@@ -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; +@@ -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 +@@ -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) +@@ -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 |