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

EAPI=5

SCM=""

if [ "${PV#9999}" != "${PV}" ] ; then
	SCM="git-r3"
	EGIT_REPO_URI="https://github.com/ultravideo/kvazaar"
fi

inherit eutils multilib autotools multilib-minimal toolchain-funcs ${SCM}

DESCRIPTION="An open-source HEVC encoder"
HOMEPAGE="http://ultravideo.cs.tut.fi/ https://github.com/ultravideo/kvazaar"

if [ "${PV#9999}" = "${PV}" ] ; then
	SRC_URI="https://github.com/ultravideo/kvazaar/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~ppc ~x86"
fi

LICENSE="LGPL-2.1"
# subslot = libkvazaar major
SLOT="0/3"
IUSE="cpu_flags_x86_avx2 static-libs"

DEPEND=""
RDEPEND="${DEPEND}"

ASM_DEP=">=dev-lang/yasm-1.2.0"
DEPEND="${DEPEND}
	abi_x86_32? ( ${ASM_DEP} )
	abi_x86_64? ( ${ASM_DEP} )"

src_prepare() {
	epatch "${FILESDIR}/ppc.patch"
	eautoreconf
}

multilib_src_configure() {
	ECONF_SOURCE="${S}" \
		econf \
			--docdir "/usr/share/doc/${PF}" \
			$(use_enable static-libs static) \
			$(use_enable cpu_flags_x86_avx2 asm)
}

multilib_src_install_all() {
	find "${ED}" -name '*.la' -delete
}