summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2007-03-22 20:22:19 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2007-03-22 20:22:19 +0000
commitfbdb3c87ba3b73f2fe6a543af5b0ac6be24362cd (patch)
treefa8478906144614a3c616690cfdd0d09d3a4084c /media-sound/esound
parentFix shmem session unlink bug. (diff)
downloadgentoo-2-fbdb3c87ba3b73f2fe6a543af5b0ac6be24362cd.tar.gz
gentoo-2-fbdb3c87ba3b73f2fe6a543af5b0ac6be24362cd.tar.bz2
gentoo-2-fbdb3c87ba3b73f2fe6a543af5b0ac6be24362cd.zip
Fix 100% cpu usage; bug #171300
(Portage version: 2.1.2.2)
Diffstat (limited to 'media-sound/esound')
-rw-r--r--media-sound/esound/ChangeLog6
-rw-r--r--media-sound/esound/esound-0.2.37-r1.ebuild86
-rw-r--r--media-sound/esound/files/digest-esound-0.2.37-r13
-rw-r--r--media-sound/esound/files/esound-0.2.37-cpu-drain.patch21
4 files changed, 115 insertions, 1 deletions
diff --git a/media-sound/esound/ChangeLog b/media-sound/esound/ChangeLog
index ee546d306170..76c118a4ea8d 100644
--- a/media-sound/esound/ChangeLog
+++ b/media-sound/esound/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-sound/esound
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/esound/ChangeLog,v 1.93 2007/03/19 18:53:21 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/esound/ChangeLog,v 1.94 2007/03/22 20:22:19 dang Exp $
+
+ 22 Mar 2007; Daniel Gryniewicz <dang@gentoo.org>
+ +files/esound-0.2.37-cpu-drain.patch:
+ Fix 100% cpu usage; bug #171300
19 Mar 2007; Daniel Gryniewicz <dang@gentoo.org>
+files/esound-0.2.37-debug.patch, esound-0.2.37.ebuild:
diff --git a/media-sound/esound/esound-0.2.37-r1.ebuild b/media-sound/esound/esound-0.2.37-r1.ebuild
new file mode 100644
index 000000000000..7df5bd3b9018
--- /dev/null
+++ b/media-sound/esound/esound-0.2.37-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/esound/esound-0.2.37-r1.ebuild,v 1.1 2007/03/22 20:22:19 dang Exp $
+
+WANT_AUTOMAKE=1.10
+inherit libtool gnome.org eutils autotools flag-o-matic
+
+DESCRIPTION="The Enlightened Sound Daemon"
+HOMEPAGE="http://www.tux.org/~ricdude/EsounD.html"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc-macos ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="alsa debug ipv6 tcpd"
+
+# esound comes with arts support, but it hasn't been tested yet, feel free to
+# submit patches/improvements
+DEPEND=">=media-libs/audiofile-0.1.5
+ alsa? ( >=media-libs/alsa-lib-0.5.10b )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )"
+# arts? ( kde-base/arts )
+
+RDEPEND="${DEPEND}
+ app-admin/eselect-esd"
+
+src_unpack() {
+
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-0.2.32-amd64.patch"
+ # please note, this is a conditional, version specific patch!!!
+ # when bumping avoid bugs like #103969
+ use ppc-macos && epatch "${FILESDIR}/${PN}-0.2.36-ppc-macos.patch"
+
+ epatch "${FILESDIR}/${PN}-0.2.36-mode_t.patch"
+ epatch "${FILESDIR}/${PN}-0.2.36-asneeded.patch"
+ # Fix compile with debug; bug #170971
+ epatch "${FILESDIR}/${PN}-0.2.37-debug.patch"
+
+ # Fix 100% cpu usage. Bug #171300
+ # Note: depends on debug patch above
+ epatch "${FILESDIR}"/${P}-cpu-drain.patch
+
+
+ AT_M4DIR="m4" eautomake
+
+ elibtoolize
+}
+
+src_compile() {
+ # Strict aliasing problem
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --sysconfdir=/etc/esd \
+ $(use_enable ipv6) \
+ $(use_enable debug debugging) \
+ $(use_enable alsa) \
+ $(use_with tcpd libwrap) \
+ --disable-dependency-tracking \
+ || die "Configure failed"
+
+ emake || die "Make failed"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install || die "Installation failed"
+ mv "${D}/usr/bin/"{esd,esound-esd}
+
+ dodoc AUTHORS ChangeLog MAINTAINERS NEWS README TIPS TODO
+
+ [[ -d "docs/html" ]] && dohtml -r docs/html/*
+
+ newconfd "${FILESDIR}/esound.conf.d" esound
+
+ extradepend=""
+ use tcpd && extradepend=" portmap"
+ use alsa && extradepend="$extradepend alsasound"
+ sed -e "s/@extradepend@/$extradepend/" "${FILESDIR}/esound.init.d.2" >"${T}/esound"
+ doinitd "${T}/esound"
+}
+
+pkg_postinst() {
+ eselect esd update --if-unset
+}
diff --git a/media-sound/esound/files/digest-esound-0.2.37-r1 b/media-sound/esound/files/digest-esound-0.2.37-r1
new file mode 100644
index 000000000000..d3bcabe648f0
--- /dev/null
+++ b/media-sound/esound/files/digest-esound-0.2.37-r1
@@ -0,0 +1,3 @@
+MD5 99cc68770176c8940cf346f60208420e esound-0.2.37.tar.bz2 383831
+RMD160 36f6630df4fa3c611d9b7ff40157504334535abe esound-0.2.37.tar.bz2 383831
+SHA256 3c8525c08cce45557832cb20cc74e7b3d6c9664410f117372391b59fda2d4147 esound-0.2.37.tar.bz2 383831
diff --git a/media-sound/esound/files/esound-0.2.37-cpu-drain.patch b/media-sound/esound/files/esound-0.2.37-cpu-drain.patch
new file mode 100644
index 000000000000..e731bbc66915
--- /dev/null
+++ b/media-sound/esound/files/esound-0.2.37-cpu-drain.patch
@@ -0,0 +1,21 @@
+diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN esound-0.2.37.orig/players.c esound-0.2.37/players.c
+--- esound-0.2.37.orig/players.c 2007-03-22 13:58:49.000000000 -0400
++++ esound-0.2.37/players.c 2007-03-22 13:59:49.000000000 -0400
+@@ -309,13 +309,15 @@ int read_player( esd_player_t *player )
+ player->data_buffer + player->actual_length,
+ player->buffer_length - player->actual_length,
+ actual, "str rd" );
+- if (actual < player->buffer_length - player->actual_length)
+- break;
+
+ /* check for end of stream */
+ if ( actual == 0
+ || ( actual < 0 && errno != EAGAIN && errno != EINTR ) )
+ return -1;
++
++ if (actual < player->buffer_length - player->actual_length)
++ break;
++
+ /* more data, save how much we got */
+ if ( actual > 0 )
+ player->actual_length += actual;