summaryrefslogtreecommitdiff
path: root/dev-tcltk/snack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-tcltk/snack
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-tcltk/snack')
-rw-r--r--dev-tcltk/snack/Manifest8
-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.xml8
-rw-r--r--dev-tcltk/snack/snack-2.2.10-r6.ebuild97
6 files changed, 209 insertions, 0 deletions
diff --git a/dev-tcltk/snack/Manifest b/dev-tcltk/snack/Manifest
new file mode 100644
index 000000000000..49ac0c9f537a
--- /dev/null
+++ b/dev-tcltk/snack/Manifest
@@ -0,0 +1,8 @@
+AUX alsa-undef-sym.patch 1225 SHA256 98ea274e8d6bd63e7ac785c65dcbd7d45fd7f904af974ffb3792c1b7917141f9 SHA512 2f925029ca7ebcf0028beb2c303d07831879d9750b5f4f463a8d463964301d0182650b9ad50b103be6c0e5eb4cb58a19e02496b7afee8531dcb2c132a292ff97 WHIRLPOOL 8942c4daa55a918a5ef7739dac76e4facb9137d3b60b1a2e84c55fa0e92d6aaae27ee98f679b6a61c755fa71a136c81ac26058f780c3f0b8de9a017bf8c77cad
+AUX snack-2.2.10-CVE-2012-6303-fix.patch 778 SHA256 a3a897ed458484a67af00bc98406a739dfe40e263a01697d4f8aff0b948592f6 SHA512 6e2f7fcf8ca0c2792cf52432340f2319b8c82677a3568c9e382f91758f5e6bf26c3a05939d4a748c4198c4e50f27141ebd2cb298d8363765ed6582192d64d3e8 WHIRLPOOL 2e14c1b276e5a01015a9c2288a1d2e81add3e0bec367b64a9a382a1e0a47ba72c78b2958822ae3c0ed8fa1d95cc21a7138060cc234522a21be4aac368d47f76e
+AUX snack-2.2.10-darwin.patch 1108 SHA256 8ea2ae5fba07018cf457df25e008e0013bcfdcde46bd16f9aa8c26caa8d64445 SHA512 0d82270d830c8b7d15dcbead05d80c15666d1bac164f26c045859f7f4dc4c098961b48272ecd0b059a1b36ba8d560c563fe8e40add822f311026faf5f7eeaf0a WHIRLPOOL 0ea35f68784c18d1a95034a8810e95b3dbb2288e162122d3ecfc2689b9209802b356f6b1683cc4fdaea028004549d524269261e837b4185b848e4e923835c969
+DIST snack2.2.10.tar.gz 1798252 SHA256 4bfe764547ab92ba58f43b77366dbb7c7b3512d65a27cdbf9e585a9cb64ce81e SHA512 c17ad332fa4f3ded006b97ceca85cada079e4c7cd933768b289c13dadca1b8803fccaf709ec2def5af4abe92c307f25597ebfa6f94df2d681e40815cd7eccb9b WHIRLPOOL 8374d482041a60443fff3c28614d08b97390648367088d37b7c9a140355e8481e444f09f0c0c9fd7370903b33a2f46eae7c96ec5dbce532bb47f06537ce799ee
+EBUILD snack-2.2.10-r6.ebuild 2013 SHA256 93cbfb1c1dc3ed880f9b35742673cf0db46a37347a6d51e50657001dd73bd0d3 SHA512 df22e4c06dc2c38dd29f1c937e3732e89da2ac20645657e01d830ddd789cd156f233edfae0a05fe0311798bda9877ff20db6a20e01d5956045d180a6247fa2d5 WHIRLPOOL e05e29b6ec8e01bd7e4f75d69f601622ee715d1fc326a1ce8b9c1b2568004e766786ae78255a54aa5f89b59f74614402b7b3067d0ec185a8c60d9582f676f448
+MISC ChangeLog 2865 SHA256 459af468016f5cfd8c67969ad9e2bd25ae8dec45375c66f5d3d49bfcac3e3a02 SHA512 1d3f907579992357c140868749b4b1a31949491fe1f6ffd585f1c66ebf1d7e65344f2089503e05431da2b5ee0b77185cf9927da82be3eaece7ac6d7049afad27 WHIRLPOOL bc3ee0f96e6e4b8683c46c5dbffe5479fe774a6b34e7572ac985335f20531aa4d50f92286f998cebe95e18955123c5d01f4b108a30bd29b416d235e8836e7ba4
+MISC ChangeLog-2015 7878 SHA256 f0fbddd5616e1051017dddc2f6701ed157ca1ac68fa080f7484c8391b0782ec4 SHA512 f3cb8b8322c0b28d42fac803f44f7d2494b990412f6a0ee774412c6d9f9b754e22b586021499c85a3cbd6cf6f3f5fae3fc87486debb205dafbca254b855d1e05 WHIRLPOOL ce36edc976688f2a8d898321267475e864ff01b18f5bcb936705aa89ac61bc869e769a28ed7d8d8d6d97fd2eeba89b963e0b9521641bca60ce1c77ab4c93155b
+MISC metadata.xml 259 SHA256 f3ad7890286839b12dc011613c2ba3df199a206c295ba8c433a8fe7f0dcc5815 SHA512 5943f2c9dc9a55862bae4c01be9e1f27304ffc1ce48d67341b4a19793c0bb11fe3d1a419af924ac360aeeafbce28018971602019a559a8a6c5939e05e3567639 WHIRLPOOL f5ad746e91e08e44d2d857057d7203fe515cbdd295f69a2d3ce2cb35343d2dc3f2879b57d00e8782bd416bfd36ce4504a7a91bbcf325eabe71075d0726e2bece
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..227dda5ba584
--- /dev/null
+++ b/dev-tcltk/snack/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+</pkgmetadata>
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..e700af31338d
--- /dev/null
+++ b/dev-tcltk/snack/snack-2.2.10-r6.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+}