diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-08-04 16:44:18 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-08-04 16:44:18 +0200 |
commit | 140248605cee4a0160f80b47ce77a823be2f740a (patch) | |
tree | 694bf7ce4e06e2577a1113525db7eba1ea32eab9 | |
parent | 4291c7de2d59b026cf346e174bf14945cfc617b6 (diff) | |
download | aports-140248605cee4a0160f80b47ce77a823be2f740a.tar.bz2 aports-140248605cee4a0160f80b47ce77a823be2f740a.tar.xz |
testing/vdr: new aport
-rw-r--r-- | testing/vdr/APKBUILD | 53 | ||||
-rw-r--r-- | testing/vdr/Make.config | 12 | ||||
-rw-r--r-- | testing/vdr/musl-compat.patch | 182 |
3 files changed, 247 insertions, 0 deletions
diff --git a/testing/vdr/APKBUILD b/testing/vdr/APKBUILD new file mode 100644 index 0000000000..3dadd97575 --- /dev/null +++ b/testing/vdr/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=vdr +pkgver=2.1.6 +pkgrel=0 +pkgdesc="Video Disk Recorde" +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" +install="" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" +source="http://projects.vdr-developer.org/git/vdr.git/snapshot/vdr-2.1.6.tar.bz2 + musl-compat.patch + Make.config" + +_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 +} + +build() { + cd "$_builddir" + cp $srcdir/Make.config \ + $_builddir || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make -j1 DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la +} + +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" diff --git a/testing/vdr/Make.config b/testing/vdr/Make.config new file mode 100644 index 0000000000..e7564e43b1 --- /dev/null +++ b/testing/vdr/Make.config @@ -0,0 +1,12 @@ +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 diff --git a/testing/vdr/musl-compat.patch b/testing/vdr/musl-compat.patch new file mode 100644 index 0000000000..04a1636e36 --- /dev/null +++ b/testing/vdr/musl-compat.patch @@ -0,0 +1,182 @@ +diff --git a/Makefile b/Makefile +index 0d3a8fc..43349ed 100644 +--- a/Makefile ++++ b/Makefile +@@ -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 +@@ -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 +@@ -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 +--- a/i18n.h ++++ b/i18n.h +@@ -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 +diff --git a/osd.c b/osd.c +index 7e52782..c372245 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 e5e19c9..fab13a2 100644 +--- a/thread.c ++++ b/thread.c +@@ -143,7 +143,9 @@ cRwLock::cRwLock(bool PreferWriter) + { + pthread_rwlockattr_t attr; + pthread_rwlockattr_init(&attr); ++ #if defined(PTHREAD_RWLOCK_PREFER_WRITER_NP) && defined(PTHREAD_RWLOCK_PREFER_READER_NP) + pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP); ++ #endif + pthread_rwlock_init(&rwlock, &attr); + } + +@@ -179,7 +181,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); + } + +@@ -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); +@@ -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 +--- a/tools.c ++++ b/tools.c +@@ -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; +@@ -618,7 +623,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); +diff --git a/tools.h b/tools.h +index 358f75e..2029e31 100644 +--- a/tools.h ++++ b/tools.h +@@ -24,6 +24,7 @@ + #include <stdlib.h> + #include <string.h> + #include <syslog.h> ++#include <limits.h> + #include <sys/stat.h> + #include <sys/types.h> + +@@ -31,6 +32,10 @@ typedef unsigned char uchar; + + extern int SysLogLevel; + ++#ifndef DEFFILEMODE ++#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() ) +@@ -567,7 +572,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 835d33d..977683d 100644 +--- a/vdr.c ++++ b/vdr.c +@@ -610,9 +610,9 @@ int main(int argc, char *argv[]) + } + else if (Terminal) { + // 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); + HasStdin = true; + tcgetattr(STDIN_FILENO, &savedTm); + } |