summaryrefslogtreecommitdiff
blob: 232e20ef46935d0d635680cc2e98138d26de5a15 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{8..11} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1

DESCRIPTION="Audio synchronization feature for vidify"
HOMEPAGE="https://vidify.org"
SRC_URI="https://github.com/vidify/old-audiosync/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64"

IUSE="debug test"
RESTRICT="!test? ( test )"

RDEPEND="
	media-sound/pulseaudio
	media-video/ffmpeg[openssl]
	media-video/vidify[${PYTHON_USEDEP}]
	sci-libs/fftw
	debug? ( sci-visualization/gnuplot )
"
BDEPEND="test? ( dev-util/cmake )"

S="${WORKDIR}/old-audiosync-${PV}"

python_prepare_all() {
	if use debug; then
		sed -i -e "/defines.append(('DEBUG', '1'))/s/^# *//" setup.py || die
	fi
	distutils-r1_python_prepare_all
}

python_test() {
	mkdir "test_build_${EPYTHON}" || die
	cd "test_build_${EPYTHON}" || die
	cmake .. -DBUILD_TESTING=YES || die
	emake
	emake test
	cd .. || die
}