diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2009-06-04 08:46:37 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2009-06-04 08:46:37 +0000 |
commit | f5c96501ef5799626d296cc666e0c682ad10afb0 (patch) | |
tree | 428a261c6271ce9f417abe49d1a463e0ae163b0d /media-video/vdr | |
parent | Change root directory as daemon writes files in it, bug #267134. Also revbump... (diff) | |
download | gentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.tar.gz gentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.tar.bz2 gentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.zip |
Add patch to fix compiling with gcc-4.4. Bug #271617.
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'media-video/vdr')
-rw-r--r-- | media-video/vdr/ChangeLog | 8 | ||||
-rw-r--r-- | media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff | 39 | ||||
-rw-r--r-- | media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff | 85 | ||||
-rw-r--r-- | media-video/vdr/vdr-1.6.0_p2-r2.ebuild | 8 |
4 files changed, 136 insertions, 4 deletions
diff --git a/media-video/vdr/ChangeLog b/media-video/vdr/ChangeLog index 94a6b9ef3b13..1124fa4b0839 100644 --- a/media-video/vdr/ChangeLog +++ b/media-video/vdr/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/vdr -# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.128 2009/03/29 16:34:41 hd_brummy Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/ChangeLog,v 1.129 2009/06/04 08:46:37 zzam Exp $ + + 04 Jun 2009; Matthias Schwarzott <zzam@gentoo.org> vdr-1.6.0_p2-r2.ebuild, + +files/vdr-1.6.0-extensions-gcc-4.4.diff, +files/vdr-1.6.0-gcc-4.4.diff: + Add patch to fix compiling with gcc-4.4. Bug #271617. 29 Mar 2009; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-1.6.0_p2-r2.ebuild: diff --git a/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff b/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff new file mode 100644 index 000000000000..c4c9651707cd --- /dev/null +++ b/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff @@ -0,0 +1,39 @@ +diff -ru vdr-1.6.0-orig/menu.c vdr-1.6.0/menu.c +--- vdr-1.6.0-orig/menu.c 2009-06-04 10:01:37.538006043 +0200 ++++ vdr-1.6.0/menu.c 2009-06-04 10:04:02.967985781 +0200 +@@ -2495,14 +2495,14 @@ + priority = recording->priority; + lifetime = recording->lifetime; + +- char* p = strrchr(recording->Name(), '~'); ++ const char* p = strrchr(recording->Name(), '~'); + if (p) { + p++; + Utf8Strn0Cpy(name, p, sizeof(name)); + Utf8Strn0Cpy(path, recording->Name(), sizeof(path)); +- p = strrchr(path, '~'); +- if (p) +- p[0] = 0; ++ char* p2 = strrchr(path, '~'); ++ if (p2) ++ p2[0] = 0; + } + else { + Utf8Strn0Cpy(name, recording->Name(), sizeof(name)); +diff -ru vdr-1.6.0-orig/videodir.c vdr-1.6.0/videodir.c +--- vdr-1.6.0-orig/videodir.c 2009-06-04 10:01:37.531340365 +0200 ++++ vdr-1.6.0/videodir.c 2009-06-04 10:22:20.074546524 +0200 +@@ -196,9 +196,10 @@ + #ifdef USE_HARDLINKCUTTER + static bool StatNearestDir(const char *FileName, struct stat *Stat) + { +- cString Name(FileName); ++ char *Name = strdup(FileName); ++ cString Name_str(Name, true); /* manage free for us */ + char *p; +- while ((p = strrchr((const char*)Name + 1, '/')) != NULL) { ++ while ((p = strrchr(Name + 1, '/')) != NULL) { + *p = 0; // truncate at last '/' + if (stat(Name, Stat) == 0) { + isyslog("StatNearestDir: Stating %s", (const char*)Name); + diff --git a/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff b/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff new file mode 100644 index 000000000000..23eb78ec3b8c --- /dev/null +++ b/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff @@ -0,0 +1,85 @@ +diff -ru vdr-1.6.0-orig/channels.c vdr-1.6.0/channels.c +--- vdr-1.6.0-orig/channels.c 2009-06-04 10:34:56.144472994 +0200 ++++ vdr-1.6.0/channels.c 2009-06-04 10:34:33.341139740 +0200 +@@ -574,7 +574,7 @@ + } + else + q += sprintf(q, " none"); +- dsyslog(buffer); ++ dsyslog("%s", buffer); + } + + void cChannel::SetRefChannel(cChannel *RefChannel) +diff -ru vdr-1.6.0-orig/receiver.c vdr-1.6.0/receiver.c +--- vdr-1.6.0-orig/receiver.c 2009-06-04 10:34:46.547807527 +0200 ++++ vdr-1.6.0/receiver.c 2009-06-04 10:35:26.074465985 +0200 +@@ -40,7 +40,7 @@ + { + if (device) { + const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will segfault now!"; +- esyslog(msg); ++ esyslog("%s", msg); + fprintf(stderr, "%s\n", msg); + *(char *)0 = 0; // cause a segfault + } +diff -ru vdr-1.6.0-orig/recording.c vdr-1.6.0/recording.c +--- vdr-1.6.0-orig/recording.c 2009-06-04 10:34:56.141139523 +0200 ++++ vdr-1.6.0/recording.c 2009-06-04 10:34:33.337807723 +0200 +@@ -509,8 +509,8 @@ + Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH); + Subtitle = SubtitleBuffer; + } +- char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE); +- char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE); ++ const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE); ++ const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE); + if (macroTITLE || macroEPISODE) { + name = strdup(Timer->File()); + name = strreplace(name, TIMERMACRO_TITLE, Title); +@@ -551,7 +551,7 @@ + sortBuffer = NULL; + fileName = strdup(FileName); + FileName += strlen(VideoDirectory) + 1; +- char *p = strrchr(FileName, '/'); ++ const char *p = strrchr(FileName, '/'); + + name = NULL; + info = new cRecordingInfo; +@@ -1022,7 +1022,8 @@ + if (recording) { + cThreadLock DeletedRecordingsLock(&DeletedRecordings); + Del(recording, false); +- char *ext = strrchr(recording->FileName(), '.'); ++ // wtf? ++ char *ext = strrchr(const_cast<char*>(recording->FileName()), '.'); + if (ext) { + strncpy(ext, DELEXT, strlen(ext)); + recording->fileSizeMB = DirSizeMB(recording->FileName()); +diff -ru vdr-1.6.0-orig/svdrp.c vdr-1.6.0/svdrp.c +--- vdr-1.6.0-orig/svdrp.c 2009-06-04 10:34:56.141139523 +0200 ++++ vdr-1.6.0/svdrp.c 2009-06-04 10:34:33.337807723 +0200 +@@ -736,7 +736,7 @@ + char *strtok_next; + FileName = strtok_r(p, delim, &strtok_next); + // image type: +- char *Extension = strrchr(FileName, '.'); ++ const char *Extension = strrchr(FileName, '.'); + if (Extension) { + if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0) + Jpeg = true; +@@ -796,12 +796,12 @@ + if (FileName) { + if (grabImageDir) { + cString s; +- char *slash = strrchr(FileName, '/'); ++ char *slash = strrchr(const_cast<char*>(FileName), '/'); + if (!slash) { + s = AddDirectory(grabImageDir, FileName); + FileName = s; + } +- slash = strrchr(FileName, '/'); // there definitely is one ++ slash = strrchr(const_cast<char*>(FileName), '/'); // there definitely is one + *slash = 0; + char *r = realpath(FileName, RealFileName); + *slash = '/'; + diff --git a/media-video/vdr/vdr-1.6.0_p2-r2.ebuild b/media-video/vdr/vdr-1.6.0_p2-r2.ebuild index 7865e657836e..4d5053dbb242 100644 --- a/media-video/vdr/vdr-1.6.0_p2-r2.ebuild +++ b/media-video/vdr/vdr-1.6.0_p2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-1.6.0_p2-r2.ebuild,v 1.2 2009/03/29 16:34:41 hd_brummy Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/vdr/vdr-1.6.0_p2-r2.ebuild,v 1.3 2009/06/04 08:46:37 zzam Exp $ inherit eutils flag-o-matic multilib @@ -220,7 +220,9 @@ src_unpack() { -e 's/runvdr//' \ -e 's/ install-plugins//' - if ! use vanilla; then + if use vanilla; then + epatch "${FILESDIR}"/vdr-1.6.0-gcc-4.4.diff + else cd "${S}" # Now apply extensions patch @@ -232,6 +234,8 @@ src_unpack() { # other gentoo patches # epatch "${FILESDIR}/..." + epatch "${FILESDIR}"/vdr-1.6.0-gcc-4.4.diff + epatch "${FILESDIR}"/vdr-1.6.0-extensions-gcc-4.4.diff # This allows us to start even if some plugin does not exist # or is not loadable. |