summaryrefslogtreecommitdiff
path: root/media-libs/libdovi/libdovi-3.4.0.ebuild
blob: ac183193b679a5bbee94649d159b610329628cf2 (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
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RUST_MIN_VER=1.88.0
RUST_MULTILIB=1
inherit cargo edo multilib-minimal rust-toolchain

DESCRIPTION="Dolby Vision metadata parsing and writing"
HOMEPAGE="https://github.com/quietvoid/dovi_tool/"
SRC_URI="
	https://github.com/quietvoid/dovi_tool/archive/refs/tags/${P}.tar.gz
	https://distfiles.gentoo.org/pub/dev/ionen@gentoo.org/${P}-vendor.tar.xz
"
S=${WORKDIR}/dovi_tool-${P}/dolby_vision

LICENSE="MIT"
LICENSE+=" Apache-2.0 MIT Unicode-3.0" # crates
SLOT="0/$(ver_cut 1)"
KEYWORDS="amd64"

BDEPEND="
	dev-util/cargo-c
"

QA_FLAGS_IGNORED="usr/lib.*/${PN}.*"

src_prepare() {
	default

	multilib_copy_sources
}

multilib_src_configure() {
	local -n cargoargs=${PN}_CARGOARGS_${ABI}

	cargoargs=(
		--prefix="${EPREFIX}/usr"
		--libdir="${EPREFIX}/usr/$(get_libdir)"
		--library-type=cdylib
		--target="$(rust_abi)"
		$(usex debug --profile=dev --release)
	)
}

multilib_src_compile() {
	local -n cargoargs=${PN}_CARGOARGS_${ABI}

	edo cargo cbuild "${cargoargs[@]}"
}

multilib_src_install() {
	local -n cargoargs=${PN}_CARGOARGS_${ABI}

	edo cargo cinstall --destdir="${D}" "${cargoargs[@]}"
}