summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Ferri <mescalinum@gentoo.org>2009-05-26 12:05:57 +0000
committerFederico Ferri <mescalinum@gentoo.org>2009-05-26 12:05:57 +0000
commitc901d954f935f7df449320d719ba1c6eff6a2244 (patch)
tree6fecb97fc5b01c8cdb179323bc1aa018d8924277 /dev-tcltk/snack
parentVersion bumped. (diff)
downloadgentoo-2-c901d954f935f7df449320d719ba1c6eff6a2244.tar.gz
gentoo-2-c901d954f935f7df449320d719ba1c6eff6a2244.tar.bz2
gentoo-2-c901d954f935f7df449320d719ba1c6eff6a2244.zip
fix use of deprecated alsa symbols, bug #226137
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-tcltk/snack')
-rw-r--r--dev-tcltk/snack/ChangeLog10
-rw-r--r--dev-tcltk/snack/files/alsa-undef-sym.patch49
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r2.ebuild72
3 files changed, 129 insertions, 2 deletions
diff --git a/dev-tcltk/snack/ChangeLog b/dev-tcltk/snack/ChangeLog
index 406494c5079f..88ad70af59ba 100644
--- a/dev-tcltk/snack/ChangeLog
+++ b/dev-tcltk/snack/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-tcltk/snack
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/snack/ChangeLog,v 1.31 2008/08/08 16:55:30 armin76 Exp $
+# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/snack/ChangeLog,v 1.32 2009/05/26 12:05:56 mescalinum Exp $
+
+*snack-2.2.10-r2 (26 May 2009)
+
+ 26 May 2009; Federico Ferri <mescalinum@gentoo.org>
+ +files/alsa-undef-sym.patch, +snack-2.2.10-r2.ebuild:
+ fix use of deprecated alsa symbols, bug #226137
08 Aug 2008; Raúl Porcel <armin76@gentoo.org> snack-2.2.10-r1.ebuild:
alpha/sparc/x86 stable
diff --git a/dev-tcltk/snack/files/alsa-undef-sym.patch b/dev-tcltk/snack/files/alsa-undef-sym.patch
new file mode 100644
index 000000000000..77a222754fe1
--- /dev/null
+++ b/dev-tcltk/snack/files/alsa-undef-sym.patch
@@ -0,0 +1,49 @@
+--- unix/jkAudIO_alsa.c 2005-12-14 12:29:38.000000000 +0100
++++ unix/jkAudIO_alsa.c 2008-09-01 22:51:20.000000000 +0200
+@@ -49,6 +49,8 @@
+
+ static int minNumChan = 1;
+
++static snd_pcm_uframes_t hw_bufsize = 0;
++
+ int
+ SnackAudioOpen(ADesc *A, Tcl_Interp *interp, char *device, int mode, int freq,
+ int nchannels, int encoding)
+@@ -135,6 +137,9 @@
+ Tcl_AppendResult(interp, "Failed setting HW params.", NULL);
+ return TCL_ERROR;
+ }
++
++ snd_pcm_hw_params_get_buffer_size (hw_params, &hw_bufsize);
++
+ snd_pcm_hw_params_free(hw_params);
+ snd_pcm_prepare(A->handle);
+ if (A->mode == RECORD) {
+@@ -202,6 +207,8 @@
+ int i;
+ static char buf[64];
+
++ return;
++
+ if (A->debug > 1) Snack_WriteLog(" Enter SnackAudioPost\n");
+
+ for (i = 0; i < 1000; i++) {
+@@ -267,12 +274,14 @@
+ long
+ SnackAudioPlayed(ADesc *A)
+ {
+- long avail = _snd_pcm_mmap_hw_ptr(A->handle);
++ // FIX Here, _snd_pcm_mmap_hw_ptr is deprecated in new alsalib
++ long played = A->nWritten - (hw_bufsize - SnackAudioWriteable(A));
++ // long avail = _snd_pcm_mmap_hw_ptr(A->handle);
+
+- if (avail < 0)
+- avail = 0;
++ if (played < 0)
++ return 0;
+
+- return (avail+A->nPlayed);
++ return (played);
+ }
+
+ void \ No newline at end of file
diff --git a/dev-tcltk/snack/snack-2.2.10-r2.ebuild b/dev-tcltk/snack/snack-2.2.10-r2.ebuild
new file mode 100644
index 000000000000..b7497d78d30d
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/snack/snack-2.2.10-r2.ebuild,v 1.1 2009/05/26 12:05:56 mescalinum Exp $
+
+inherit eutils multilib
+
+DESCRIPTION="The Snack Sound Toolkit (Tcl)"
+HOMEPAGE="http://www.speech.kth.se/snack/"
+SRC_URI="http://www.speech.kth.se/snack/dist/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE="alsa examples python threads vorbis"
+
+RESTRICT="test" # Bug 78354
+
+DEPEND=">dev-lang/tcl-8.4.3
+ >dev-lang/tk-8.4.3
+ alsa? ( media-libs/alsa-lib )
+ vorbis? ( media-libs/libvorbis )
+ python? ( virtual/python )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/alsa-undef-sym.patch
+}
+
+src_compile() {
+ local myconf="--libdir=/usr/$(get_libdir) --includedir=/usr/include"
+
+ use alsa && myconf="${myconf} --enable-alsa"
+ use threads && myconf="${myconf} --enable-threads"
+
+ if use vorbis ; then
+ myconf="${myconf} --with-ogg-include=/usr/include"
+ myconf="${myconf} --with-ogg-lib=/usr/$(get_libdir)"
+ fi
+
+ econf ${myconf} || die "configure failed"
+ emake || die "make failed"
+
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ if use python ; then
+ cd "${S}"/../python
+ python setup.py install --root="${D}" || die
+ fi
+
+ cd "${S}"/..
+
+ dodoc README changes
+ dohtml doc/*
+
+ if use examples ; then
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
+ docinto examples/tcl
+ dodoc demos/tcl/*
+
+ if use python ; then
+ docinto examples/python
+ dodoc demos/python/*
+ fi
+ fi
+}