diff options
author | Alexis Ballier <aballier@gentoo.org> | 2011-02-26 12:28:33 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2011-02-26 12:28:33 +0000 |
commit | 35a8b022873bcebe8426fc6126e0cff9612ed8ee (patch) | |
tree | 782824fb26d2ab461ae16c2f27211ee519f49fbb /media-sound/orpheus | |
parent | sparc dropping keywords (bug 325621) (diff) | |
download | gentoo-2-35a8b022873bcebe8426fc6126e0cff9612ed8ee.tar.gz gentoo-2-35a8b022873bcebe8426fc6126e0cff9612ed8ee.tar.bz2 gentoo-2-35a8b022873bcebe8426fc6126e0cff9612ed8ee.zip |
Make it build with latest autotools, fix an automake warning, fix a buffer overflow (bug #339242), fix some char* vs const char* warnings.
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
Diffstat (limited to 'media-sound/orpheus')
-rw-r--r-- | media-sound/orpheus/ChangeLog | 12 | ||||
-rw-r--r-- | media-sound/orpheus/files/orpheus-1.6-bufsize.patch | 13 | ||||
-rw-r--r-- | media-sound/orpheus/files/orpheus-1.6-constify.patch | 60 | ||||
-rw-r--r-- | media-sound/orpheus/files/orpheus-1.6-cppflags.patch | 12 | ||||
-rw-r--r-- | media-sound/orpheus/orpheus-1.6-r2.ebuild | 49 |
5 files changed, 144 insertions, 2 deletions
diff --git a/media-sound/orpheus/ChangeLog b/media-sound/orpheus/ChangeLog index 284f3a82f54f..c0c92c4caa15 100644 --- a/media-sound/orpheus/ChangeLog +++ b/media-sound/orpheus/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/orpheus -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/orpheus/ChangeLog,v 1.26 2010/12/03 00:28:03 flameeyes Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/orpheus/ChangeLog,v 1.27 2011/02/26 12:28:33 aballier Exp $ + +*orpheus-1.6-r2 (26 Feb 2011) + + 26 Feb 2011; Alexis Ballier <aballier@gentoo.org> +orpheus-1.6-r2.ebuild, + +files/orpheus-1.6-bufsize.patch, +files/orpheus-1.6-constify.patch, + +files/orpheus-1.6-cppflags.patch: + Make it build with latest autotools, fix an automake warning, fix a buffer + overflow (bug #339242), fix some char* vs const char* warnings. 03 Dec 2010; Diego E. Pettenò <flameeyes@gentoo.org> orpheus-1.6-r1.ebuild, files/orpheus-1.6-nolibghttp.patch: diff --git a/media-sound/orpheus/files/orpheus-1.6-bufsize.patch b/media-sound/orpheus/files/orpheus-1.6-bufsize.patch new file mode 100644 index 000000000000..319fcd83eecc --- /dev/null +++ b/media-sound/orpheus/files/orpheus-1.6-bufsize.patch @@ -0,0 +1,13 @@ +Index: orpheus-1.6/kkstrtext-0.1/kkstrtext.cc +=================================================================== +--- orpheus-1.6.orig/kkstrtext-0.1/kkstrtext.cc ++++ orpheus-1.6/kkstrtext-0.1/kkstrtext.cc +@@ -1132,7 +1132,7 @@ string striprtf(const string &s, const s + bunicode = false; + if(unichar.substr(0, 4).find_first_not_of("0123456789") == -1) { + long l = strtol(unichar.substr(0, 4).c_str(), 0, 0); +- char ubuf[sizeof(long)+4]; ++ char ubuf[sizeof(long)*2+4]; + #ifdef HAVE_ICONV + memcpy(ubuf, "\xff\xfe", 2); + memcpy(ubuf+2, &l, sizeof(long)); diff --git a/media-sound/orpheus/files/orpheus-1.6-constify.patch b/media-sound/orpheus/files/orpheus-1.6-constify.patch new file mode 100644 index 000000000000..8255b4094ef6 --- /dev/null +++ b/media-sound/orpheus/files/orpheus-1.6-constify.patch @@ -0,0 +1,60 @@ +Index: orpheus-1.6/kkstrtext-0.1/kkstrtext.cc +=================================================================== +--- orpheus-1.6.orig/kkstrtext-0.1/kkstrtext.cc ++++ orpheus-1.6/kkstrtext-0.1/kkstrtext.cc +@@ -41,17 +41,17 @@ char *strimlead(char *str) { return tri + char *strimtrail(char *str) { return trimtrail(str, " \t"); } + char *strim(char *str) { return trim(str, " \t"); } + +-char *trimlead(char *str, char *chr) { ++char *trimlead(char *str, const char *chr) { + while(strchr(chr, str[0]) && strlen(str)) strcpy(str, str + 1); + return str; + } + +-char *trimtrail(char *str, char *chr) { ++char *trimtrail(char *str, const char *chr) { + while(strchr(chr, str[strlen(str)-1]) && strlen(str)) str[strlen(str)-1] = 0; + return str; + } + +-char *trim(char *str, char *chr) { ++char *trim(char *str, const char *chr) { + return trimlead(trimtrail(str, chr), chr); + } + +@@ -370,7 +370,7 @@ const char *strqstr(const char *s, const + return ret; + } + +-char *strinsert(char *buf, int pos, char *ins) { ++char *strinsert(char *buf, int pos, const char *ins) { + char *p = strdup(buf+pos); + memcpy(buf+pos+strlen(ins), p, strlen(p)+1); + memcpy(buf+pos, ins, strlen(ins)); +Index: orpheus-1.6/kkstrtext-0.1/kkstrtext.h +=================================================================== +--- orpheus-1.6.orig/kkstrtext-0.1/kkstrtext.h ++++ orpheus-1.6/kkstrtext-0.1/kkstrtext.h +@@ -119,9 +119,9 @@ __KTOOL_BEGIN_C + + char *strcut(char *strin, int frompos, int count); + +-char *trimlead(char *str, char *chr); +-char *trimtrail(char *str, char *chr); +-char *trim(char *str, char *chr); ++char *trimlead(char *str, const char *chr); ++char *trimtrail(char *str, const char *chr); ++char *trim(char *str, const char *chr); + + char *strimlead(char *str); + char *strimtrail(char *str); +@@ -145,7 +145,7 @@ const char *strqstr(const char *s, + const char *esc = ""); + + char *strccat(char *dest, char c); +-char *strinsert(char *buf, int pos, char *ins); ++char *strinsert(char *buf, int pos, const char *ins); + char *strcinsert(char *buf, int pos, char ins); + + int strchcount(char *s, char *accept); diff --git a/media-sound/orpheus/files/orpheus-1.6-cppflags.patch b/media-sound/orpheus/files/orpheus-1.6-cppflags.patch new file mode 100644 index 000000000000..bf7effbcd9d9 --- /dev/null +++ b/media-sound/orpheus/files/orpheus-1.6-cppflags.patch @@ -0,0 +1,12 @@ +Index: orpheus-1.6/kkconsui-0.1/src/Makefile.am +=================================================================== +--- orpheus-1.6.orig/kkconsui-0.1/src/Makefile.am ++++ orpheus-1.6/kkconsui-0.1/src/Makefile.am +@@ -1,6 +1,6 @@ + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../kkstrtext -I$(top_srcdir)/../kkstrtext-0.1 + noinst_LIBRARIES = libsrc.a +-CPPFLAGS = ++AM_CPPFLAGS = + libsrc_a_SOURCES = treeview.cc colorschemer.cc textinputline.cc fileselector.cc textwindow.cc texteditor.cc dialogbox.cc screenarea.cc textbrowser.cc abstractui.cc horizontalbar.cc linkedlist.cc cmenus.cc conscommon.cc + EXTRA_DIST = treeview.cc colorschemer.cc textinputline.cc fileselector.cc textwindow.cc texteditor.cc dialogbox.cc screenarea.cc textbrowser.cc abstractui.cc horizontalbar.cc linkedlist.cc cmenus.cc conscommon.cc + SUBDIRS = diff --git a/media-sound/orpheus/orpheus-1.6-r2.ebuild b/media-sound/orpheus/orpheus-1.6-r2.ebuild new file mode 100644 index 000000000000..714afd59b946 --- /dev/null +++ b/media-sound/orpheus/orpheus-1.6-r2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/orpheus/orpheus-1.6-r2.ebuild,v 1.1 2011/02/26 12:28:33 aballier Exp $ + +EAPI=2 + +inherit eutils autotools + +DESCRIPTION="Command line MP3 player." +HOMEPAGE="http://konst.org.ua/en/orpheus" +SRC_URI="http://konst.org.ua/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +IUSE="" + +RDEPEND="sys-libs/ncurses + media-libs/libvorbis + media-sound/mpg123 + media-sound/vorbis-tools[ogg123]" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/1.5-amd64.patch + + # Fix a stack-based buffer overflow in kkstrtext.h in ktools library. + # Bug 113683, CVE-2005-3863. + epatch "${FILESDIR}"/101_fix-buffer-overflow.diff + + epatch "${FILESDIR}"/${P}-nolibghttp.patch \ + "${FILESDIR}"/${P}-cppflags.patch \ + "${FILESDIR}"/${P}-bufsize.patch \ + "${FILESDIR}"/${P}-constify.patch + cp "${S}/config.rpath" "${S}/kkstrtext-0.1/" || die + + # For automake 1.9 and later + sed -i -e 's:@MKINSTALLDIRS@:$(top_srcdir)/mkinstalldirs:' \ + po/Makefile.in.in || die + + einfo "Removing outdated files..." + find . -name "missing" -print -delete + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc AUTHORS ChangeLog NEWS README TODO +} |