blob: 53fccbafb9d60ac4212bc10542a9ce74f4dcb6f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
COMMIT_HASH="b93885dcb70aae50c6f76b0fe4e0868f029a077e"
DESCRIPTION="Simple library to speed up or slow down speech"
HOMEPAGE="https://github.com/waywardgeek/sonic"
SRC_URI="https://github.com/waywardgeek/sonic/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT_HASH}"
LICENSE="Apache-2.0"
SONAME="0.3.0" # follow LIB_TAG in Makefile
SLOT="0/${SONAME}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="fftw test"
RESTRICT="!test? ( test )"
DEPEND="fftw? ( sci-libs/fftw:= )"
RDEPEND="${DEPEND}"
src_compile() {
local myemakeargs=(
AR=$(tc-getAR)
CC=$(tc-getCC)
CFLAGS="${CFLAGS} -fPIC -pthread"
)
use fftw && myemakeargs+=(
USE_SPECTROGRAM=1
FFTLIB=$($(tc-getPKG_CONFIG) --libs fftw3)
)
emake "${myemakeargs[@]}" all $(usev test sonic_unit_test)
}
src_test() {
emake test
}
src_install() {
local myemakeargs=(
PREFIX="${EPREFIX}/usr"
LIBDIR="${EPREFIX}/usr/$(get_libdir)"
DESTDIR="${D}"
)
emake "${myemakeargs[@]}" install
einstalldocs
doman sonic.1
find "${ED}" -type f -name '*.a' -delete || die
}
|