1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic
8 DESCRIPTION="Snd is a sound editor"
9 HOMEPAGE="https://ccrma.stanford.edu/software/snd/"
10 SRC_URI="ftp://ccrma-ftp.stanford.edu/pub/Lisp/${P}.tar.gz"
12 LICENSE="Snd BSD-2 HPND GPL-2+ LGPL-2.1+ LGPL-3+ ruby? ( free-noncomm ) s7? ( free-noncomm )"
14 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
15 IUSE="alsa doc fftw gmp gsl gtk jack ladspa motif opengl oss portaudio pulseaudio readline ruby +s7"
17 RDEPEND="media-libs/audiofile
18 alsa? ( media-libs/alsa-lib )
19 fftw? ( sci-libs/fftw:3.0= )
25 gsl? ( sci-libs/gsl:= )
30 opengl? ( x11-libs/gtkglext )
32 jack? ( media-sound/jack-audio-connection-kit )
33 ladspa? ( media-libs/ladspa-sdk )
34 motif? ( >=x11-libs/motif-2.3:0 )
35 opengl? ( virtual/opengl )
36 portaudio? ( media-libs/portaudio )
37 pulseaudio? ( media-sound/pulseaudio )
38 readline? ( sys-libs/readline:* )
39 ruby? ( dev-lang/ruby:* )"
43 ?? ( portaudio pulseaudio )
47 "${FILESDIR}"/${PN}-17.4-portaudio.patch
48 "${FILESDIR}"/${PN}-17.4-undefined-oss_sample_types.patch
52 if ! use gtk && ! use motif ; then
53 ewarn "Warning: no graphic toolkit selected (gtk or motif)."
54 ewarn "Upstream suggests to enable one of the toolkits (or both)"
55 ewarn "or only the command line utilities will be helpful."
61 sed -i -e "s:-O2 ::" configure.ac || die
66 # Workaround executable sections QA warning (bug #348754)
67 append-ldflags -Wl,-z,noexecstack
70 if ! use ruby && ! use s7 ; then
71 myconf+=" --without-extension-language"
84 $(use_with portaudio) \
85 $(use_with pulseaudio) \
94 # Do not compile ruby extensions for command line programs since they fail
95 sed -i -e "s:HAVE_RUBY 1:HAVE_RUBY 0:" mus-config.h || die
98 for i in sndplay sndinfo; do
104 dobin snd sndplay sndinfo
107 insinto /usr/share/snd
112 insinto /usr/share/snd
116 use doc && HTML_DOCS=( *.html pix/*.png )