summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-tcltk/snack
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-tcltk/snack')
-rw-r--r--dev-tcltk/snack/Manifest1
-rw-r--r--dev-tcltk/snack/files/alsa-undef-sym.patch49
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch19
-rw-r--r--dev-tcltk/snack/files/snack-2.2.10-darwin.patch28
-rw-r--r--dev-tcltk/snack/metadata.xml5
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r5.ebuild106
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r6.ebuild98
7 files changed, 306 insertions, 0 deletions
diff --git a/dev-tcltk/snack/Manifest b/dev-tcltk/snack/Manifest
new file mode 100644
index 000000000000..3a016c09ca08
--- /dev/null
+++ b/dev-tcltk/snack/Manifest
@@ -0,0 +1 @@
+DIST snack2.2.10.tar.gz 1798252 SHA256 4bfe764547ab92ba58f43b77366dbb7c7b3512d65a27cdbf9e585a9cb64ce81e SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b WHIRLPOOL 8374d482041a60443fff3c28614d08b97390648367088d37b7c9a140355e8481e444f09f0c0c9fd7370903b33a2f46eae7c96ec5dbce532bb47f06537ce799ee
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/files/snack-2.2.10-CVE-2012-6303-fix.patch b/dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch
new file mode 100644
index 000000000000..6326e8a48d04
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-CVE-2012-6303-fix.patch
@@ -0,0 +1,19 @@
+diff -up snack2.2.10/generic/jkSoundFile.c.CVE20126303 snack2.2.10/generic/jkSoundFile.c
+--- snack2.2.10/generic/jkSoundFile.c.CVE20126303 2013-01-02 11:26:15.496231056 -0500
++++ snack2.2.10/generic/jkSoundFile.c 2013-01-02 11:27:26.134250662 -0500
+@@ -1798,7 +1798,14 @@ static int
+ GetHeaderBytes(Sound *s, Tcl_Interp *interp, Tcl_Channel ch, char *buf,
+ int len)
+ {
+- int rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
++ int rlen;
++
++ if (len > max(CHANNEL_HEADER_BUFFER, HEADBUF)){
++ Tcl_AppendResult(interp, "Excessive header size", NULL);
++ return TCL_ERROR;
++ }
++
++ rlen = Tcl_Read(ch, &buf[s->firstNRead], len - s->firstNRead);
+
+ if (rlen < len - s->firstNRead){
+ Tcl_AppendResult(interp, "Failed reading header bytes", NULL);
diff --git a/dev-tcltk/snack/files/snack-2.2.10-darwin.patch b/dev-tcltk/snack/files/snack-2.2.10-darwin.patch
new file mode 100644
index 000000000000..8c6dc5285863
--- /dev/null
+++ b/dev-tcltk/snack/files/snack-2.2.10-darwin.patch
@@ -0,0 +1,28 @@
+* grobian@gentoo.org: need all symbols to be satisfied, need
+ install_name for actual usage
+
+--- unix/Makefile.in
++++ unix/Makefile.in
+@@ -35,7 +35,7 @@
+
+ LIBSO = -lc @ALIB@ @TCL_LIB_SPEC@
+
+-LIBSN = -lc @TK_LIBS@ @ALIB@ @TCL_LIB_SPEC@ @TK_LIB_SPEC@
++LIBSN = -lc -lX11 -ltk @TK_LIBS@ @ALIB@ @TCL_LIB_SPEC@ @TK_LIB_SPEC@
+
+ SHLIB_LD = @SHLIB_LD@
+ SHLIB_SUFFIX = @SHLIB_SUFFIX@
+@@ -158,11 +158,11 @@
+ $(CC) -c $(CFLAGS) $(GENERIC_DIR)/snackStubLib.c
+
+ libsound${SHLIB_SUFFIX}: ${OBJSO}
+- ${SHLIB_LD} ${OBJSO} ${LIBSO} -o libsound${SHLIB_SUFFIX}
++ ${SHLIB_LD} ${OBJSO} ${LIBSO} -install_name $(SNACK_INSTALL_PATH)/snack${VERSION}/libsound${SHLIB_SUFFIX} -o libsound${SHLIB_SUFFIX}
+ sed s/.dll/${SHLIB_SUFFIX}/ < $(UNIX_DIR)/pkgIndex.tcl.dll > pkgIndex.tcl
+
+ libsnack${SHLIB_SUFFIX}: ${OBJSN}
+- ${SHLIB_LD} ${OBJSN} ${LIBSN} -o libsnack${SHLIB_SUFFIX}
++ ${SHLIB_LD} ${OBJSN} ${LIBSN} -install_name $(SNACK_INSTALL_PATH)/snack${VERSION}/libsnack${SHLIB_SUFFIX} -o libsnack${SHLIB_SUFFIX}
+ sed s/.dll/${SHLIB_SUFFIX}/ < $(UNIX_DIR)/pkgIndex.tcl.dll > pkgIndex.tcl
+
+ stublib: ${OBJSNST}
diff --git a/dev-tcltk/snack/metadata.xml b/dev-tcltk/snack/metadata.xml
new file mode 100644
index 000000000000..70ac40499556
--- /dev/null
+++ b/dev-tcltk/snack/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tcltk</herd>
+</pkgmetadata>
diff --git a/dev-tcltk/snack/snack-2.2.10-r5.ebuild b/dev-tcltk/snack/snack-2.2.10-r5.ebuild
new file mode 100644
index 000000000000..4ee81c4a459c
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r5.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit eutils distutils 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 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="alsa examples python threads vorbis"
+
+RESTRICT="test" # Bug 78354
+
+DEPEND="
+ >dev-lang/tcl-8.4.3:0
+ >dev-lang/tk-8.4.3:0
+ alsa? ( media-libs/alsa-lib )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+PYTHON_MODNAME="tkSnack.py"
+
+pkg_setup() {
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ # bug 226137 - snack depends on alsa private symbol _snd_pcm_mmap_hw_ptr
+ epatch "${FILESDIR}"/alsa-undef-sym.patch
+ # bug 270839 - error from /usr/include/bits/mathcalls.h:310
+ sed \
+ -e 's|^\(#define roundf(.*\)|//\1|' \
+ -i ../generic/jkFormatMP3.c || die
+
+ # adds -install_name (soname on Darwin)
+ [[ ${CHOST} == *-darwin* ]] && epatch "${FILESDIR}"/${P}-darwin.patch
+
+ # From Fedora
+ cd ../
+ epatch "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
+}
+
+src_configure() {
+ local myconf="--libdir="${EPREFIX}"/usr/$(get_libdir) --includedir="${EPREFIX}"/usr/include"
+
+ use alsa && myconf="${myconf} --enable-alsa"
+ use threads && myconf="${myconf} --enable-threads"
+
+ if use vorbis ; then
+ myconf="${myconf} --with-ogg-include="${EPREFIX}"/usr/include"
+ myconf="${myconf} --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir)"
+ fi
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # We do not want to run distutils_src_compile
+ default
+}
+
+src_install() {
+ default
+
+ if use python ; then
+ cd "${S}"/../python
+ distutils_src_install
+ fi
+
+ cd "${S}"/..
+
+ 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
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
diff --git a/dev-tcltk/snack/snack-2.2.10-r6.ebuild b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
new file mode 100644
index 000000000000..3daca2a59649
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit autotools autotools-utils distutils-r1 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 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="alsa examples python threads vorbis"
+
+RESTRICT="test" # Bug 78354
+
+DEPEND="
+ dev-lang/tcl:0=
+ dev-lang/tk:0=
+ alsa? ( media-libs/alsa-lib )
+ python? ( ${PYTHON_DEPS} )
+ vorbis? ( media-libs/libvorbis )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/unix"
+
+#PYTHON_MODNAME="tkSnack.py"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/alsa-undef-sym.patch
+ "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
+ )
+
+src_prepare() {
+ # adds -install_name (soname on Darwin)
+ [[ ${CHOST} == *-darwin* ]] && PATCHES+=( "${FILESDIR}"/${P}-darwin.patch )
+
+ sed \
+ -e "s:ar cr:$(tc-getAR) cr:g" \
+ -e "s:-O:${CFLAGS}:g" \
+ -i Makefile.in || die
+
+ cd .. || die
+
+ autotools-utils_src_prepare
+
+ sed \
+ -e 's|^\(#define roundf(.*\)|//\1|' \
+ -i generic/jkFormatMP3.c || die
+}
+
+src_configure() {
+ local myeconfargs=(
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --includedir="${EPREFIX}"/usr/include
+ )
+
+ use alsa && myconf+=( --enable-alsa )
+ use threads && myconf+=( --enable-threads )
+
+ use vorbis && \
+ myconf+=( --with-ogg-include="${EPREFIX}"/usr/include ) && \
+ myconf+=( --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir) )
+
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ if use python ; then
+ cd "${S}"/../python || die
+ distutils-r1_src_install
+ fi
+
+ cd "${S}"/.. || die
+
+ dohtml doc/*
+
+ if use examples ; then
+ docinto examples
+ sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
+ dodoc -r demos/tcl
+
+ use python && dodoc -r demos/python
+ fi
+}