dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / media-libs / kvazaar / kvazaar-9999.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 GREATEST_PV="1.2.1"
7
8 if [[ ${PV} = *9999 ]] ; then
9         inherit git-r3
10         EGIT_REPO_URI="https://github.com/ultravideo/kvazaar"
11 else
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"
15 fi
16 inherit autotools flag-o-matic multilib-minimal toolchain-funcs
17
18 DESCRIPTION="Open-source HEVC encoder"
19 HOMEPAGE="http://ultravideo.cs.tut.fi/ https://github.com/ultravideo/kvazaar"
20
21 LICENSE="LGPL-2.1"
22 # subslot = libkvazaar major
23 SLOT="0/4"
24 IUSE="static-libs test"
25 REQUIRED_USE="test? ( static-libs )"
26
27 RESTRICT="!test? ( test )"
28 ASM_DEP=">=dev-lang/yasm-1.2.0"
29 RDEPEND=""
30 DEPEND="${RDEPEND}
31         test? (
32                 media-video/ffmpeg
33         )
34         abi_x86_32? ( ${ASM_DEP} )
35         abi_x86_64? ( ${ASM_DEP} )
36 "
37
38 src_prepare() {
39         default
40         sed -e "/^dist_doc_DATA/s/COPYING //" -i Makefile.am || die
41         eautoreconf
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
46         fi
47         # Some m4 macros append Werror, we do not want that.
48         append-flags "-Wno-error"
49
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
54 }
55
56 multilib_src_configure() {
57         ECONF_SOURCE="${S}" econf \
58                 --disable-werror \
59                 $(use_enable static-libs static)
60 }
61
62 multilib_src_install_all() {
63         find "${ED}" -name '*.la' -delete || die
64 }