summaryrefslogtreecommitdiff
blob: f5df6a0bc9f91b9104761e554704add3ac76ee45 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit cmake-utils

DESCRIPTION="A library implementing the EBU R128 loudness standard."
HOMEPAGE="https://github.com/jiixyj/libebur128"
SRC_URI="https://github.com/jiixyj/libebur128/archive/v${PV}.tar.gz -> ${P}.tar.gz
	test? ( https://tech.ebu.ch/files/live/sites/tech/files/shared/testmaterial/ebu-loudness-test-setv03.zip )"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+speex test"

RDEPEND="speex? ( media-libs/speex )"
DEPEND="${RDEPEND}
	test? ( media-libs/libsndfile
		app-arch/unzip )"

src_configure() {
	local mycmakeargs=(
		$(cmake-utils_use_disable speex SPEEXDSP)
		$(cmake-utils_use_enable test TESTS)
	)
	cmake-utils_src_configure
}

src_test() {
	cd "${WORKDIR}"
	"${P}_build"/r128-test-library | tee test-results
	grep -c "^FAILED" test-results > /dev/null \
		&& die "At least one test failed"
}