1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 pypy )
8 inherit autotools distutils-r1 multilib virtualx
10 DESCRIPTION="The Snack Sound Toolkit (Tcl)"
11 HOMEPAGE="http://www.speech.kth.se/snack/"
12 SRC_URI="http://www.speech.kth.se/snack/dist/${PN}${PV}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
17 IUSE="alsa examples python vorbis"
22 alsa? ( media-libs/alsa-lib )
23 python? ( ${PYTHON_DEPS} )
24 vorbis? ( media-libs/libvorbis )"
27 S="${WORKDIR}/${PN}${PV}/unix"
30 "${FILESDIR}"/alsa-undef-sym.patch
31 "${FILESDIR}"/${P}-CVE-2012-6303-fix.patch
32 "${FILESDIR}"/${P}-debian-args.patch
33 "${FILESDIR}"/${P}-test.patch
36 HTML_DOCS="${WORKDIR}/${PN}${PV}/doc/*"
39 # adds -install_name (soname on Darwin)
40 [[ ${CHOST} == *-darwin* ]] && PATCHES+=( "${FILESDIR}"/${P}-darwin.patch )
43 -e "s:ar cr:$(tc-getAR) cr:g" \
44 -e "s:-O:${CFLAGS}:g" \
52 -e 's|^\(#define roundf(.*\)|//\1|' \
53 -i generic/jkFormatMP3.c || die
54 rm tests/{play,record}.test || die
60 use alsa && myconf+=" --enable-alsa"
63 myconf+=" --with-ogg-include="${EPREFIX}"/usr/include"
64 myconf+=" --with-ogg-lib="${EPREFIX}"/usr/$(get_libdir)"
68 --libdir="${EPREFIX}"/usr/$(get_libdir) \
69 --includedir="${EPREFIX}"/usr/include \
70 --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
71 --with-tk="${EPREFIX}"/usr/$(get_libdir) \
80 TCLLIBPATH=${S} virtx default | grep FAILED && die
87 cd "${S}"/../python || die
88 distutils-r1_src_install
93 if use examples ; then
95 sed -i -e 's/wish[0-9.]+/wish/g' demos/tcl/* || die
98 use python && dodoc -r demos/python