blob: 3865291f3bed6330335efdee12e084a4de945c4c (
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
53
54
55
56
57
58
59
|
# Copyright 2017-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cargo
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/xiph/rav1e.git"
inherit git-r3
fi
DESCRIPTION="The fastest and safest AV1 encoder"
HOMEPAGE="https://github.com/xiph/rav1e/"
SRC_URI="$(cargo_crate_uris ${CRATES})"
RESTRICT="mirror"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS=""
IUSE="+capi"
ASM_DEP=">=dev-lang/nasm-2.14"
DEPEND="amd64? ( ${ASM_DEP} )"
RDEPEND="capi? ( dev-util/cargo-c )"
src_unpack() {
if [[ "${PV}" == *9999* ]]; then
git-r3_src_unpack
cargo_live_src_unpack
fi
}
src_compile() {
export CARGO_HOME="${ECARGO_HOME}"
local args=$(usex debug "" --release)
cargo build ${args} \
|| die "cargo build failed"
if use capi; then
cargo cbuild ${args} \
--prefix="/usr" --libdir="/usr/$(get_libdir)" --destdir="${ED}" \
|| die "cargo cbuild failed"
fi
}
src_install() {
export CARGO_HOME="${ECARGO_HOME}"
local args=$(usex debug "" --release)
if use capi; then
cargo cinstall $args \
--prefix="/usr" --libdir="/usr/$(get_libdir)" --destdir="${ED}" \
|| die "cargo cinstall failed"
fi
cargo_src_install
}
|