media-libs/libsoundtouch: amd64 stable wrt bug #626508
[gentoo.git] / media-libs / libsoundtouch / libsoundtouch-2.0.0-r1.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MY_PN="${PN/lib}"
7 inherit autotools flag-o-matic multilib-minimal
8
9 DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
10 HOMEPAGE="https://www.surina.net/soundtouch/"
11 SRC_URI="https://www.surina.net/soundtouch/${P/lib}.tar.gz"
12
13 LICENSE="LGPL-2.1"
14 # subslot = libSoundTouch.so soname
15 SLOT="0/1"
16 KEYWORDS="amd64 ~arm ~hppa ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
17 IUSE="cpu_flags_x86_sse openmp static-libs"
18
19 DEPEND=">=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
20
21 S="${WORKDIR}/${MY_PN}"
22
23 PATCHES=( "${FILESDIR}/${P}-CVE-2017-92xx.patch" )
24
25 src_prepare() {
26         default
27         if use openmp ; then
28                 tc-has-openmp || die "Please switch to an openmp compatible compiler"
29         fi
30         sed -i "s:^\(dist_doc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
31         sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
32         eautoreconf
33 }
34
35 multilib_src_configure() {
36         local myeconfargs=(
37                 --enable-shared
38                 --disable-integer-samples
39                 $(use_enable cpu_flags_x86_sse x86-optimizations)
40                 $(use_enable openmp)
41                 $(use_enable static-libs static)
42         )
43         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
44 }
45
46 multilib_src_compile() {
47         emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
48 }
49
50 multilib_src_install() {
51         emake DESTDIR="${D}" pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}/html install
52 }
53
54 multilib_src_install_all() {
55         find "${D}" -name '*.la' -delete || die
56 }