1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 if [[ ${PV} = *9999 ]] ; then
10 EGIT_REPO_URI="https://github.com/ultravideo/kvazaar"
12 SRC_URI="https://github.com/ultravideo/kvazaar/archive/v${PV}.tar.gz -> ${P}.tar.gz
13 test? ( https://github.com/silentbicycle/greatest/archive/v${GREATEST_PV}.tar.gz -> greatest-${GREATEST_PV}.tar.gz )"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16 inherit autotools flag-o-matic multilib-minimal toolchain-funcs
18 DESCRIPTION="Open-source HEVC encoder"
19 HOMEPAGE="http://ultravideo.cs.tut.fi/ https://github.com/ultravideo/kvazaar"
22 # subslot = libkvazaar major
24 IUSE="static-libs test"
25 REQUIRED_USE="test? ( static-libs )"
27 RESTRICT="!test? ( test )"
28 ASM_DEP=">=dev-lang/yasm-1.2.0"
34 abi_x86_32? ( ${ASM_DEP} )
35 abi_x86_64? ( ${ASM_DEP} )
40 sed -e "/^dist_doc_DATA/s/COPYING //" -i Makefile.am || die
42 if use test && [[ ${PV} != *9999 ]]; then
43 # https://bugs.gentoo.org/show_bug.cgi?id=595932
44 rmdir "${S}/greatest" || die
45 mv "${WORKDIR}/greatest-${GREATEST_PV}" "${S}/greatest" || die
47 # Some m4 macros append Werror, we do not want that.
48 append-flags "-Wno-error"
50 # valgrind isn't available on all archs
51 # also, the valgrind tests fail with new ffmpeg (upstream only tests again ffmpeg 2.6.3)
52 # see https://github.com/ultravideo/kvazaar/issues/216
53 find "${S}/tests/" -type f -exec grep -q 'valgrind_test' '{}' \; -delete || die
56 multilib_src_configure() {
57 ECONF_SOURCE="${S}" econf \
59 $(use_enable static-libs static)
62 multilib_src_install_all() {
63 find "${ED}" -name '*.la' -delete || die