forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
c17e0f8
commit 6f711c6
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
if [[ ${PV} == 9999 ]]; then | ||
EGIT_REPO_URI="https://code.videolan.org/videolan/dav1d" | ||
inherit git-r3 | ||
else | ||
SRC_URI="https://downloads.videolan.org/pub/videolan/dav1d/${PV}/${P}.tar.xz" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" | ||
fi | ||
|
||
inherit meson-multilib | ||
|
||
DESCRIPTION="dav1d is an AV1 Decoder :)" | ||
HOMEPAGE="https://code.videolan.org/videolan/dav1d" | ||
|
||
LICENSE="BSD-2" | ||
# Check SONAME on version bumps! | ||
SLOT="0/6" | ||
IUSE="+8bit +10bit +asm test xxhash" | ||
RESTRICT="!test? ( test )" | ||
|
||
ASM_DEPEND=">=dev-lang/nasm-2.15.05" | ||
DEPEND="xxhash? ( dev-libs/xxhash )" | ||
BDEPEND=" | ||
asm? ( | ||
abi_x86_32? ( ${ASM_DEPEND} ) | ||
abi_x86_64? ( ${ASM_DEPEND} ) | ||
) | ||
" | ||
|
||
DOCS=( README.md doc/PATENTS THANKS.md ) | ||
|
||
multilib_src_configure() { | ||
local -a bits=() | ||
use 8bit && bits+=( 8 ) | ||
use 10bit && bits+=( 16 ) | ||
|
||
local enable_asm | ||
if [[ ${MULTILIB_ABI_FLAG} == abi_x86_x32 ]]; then | ||
enable_asm=false | ||
else | ||
enable_asm=$(usex asm true false) | ||
fi | ||
|
||
local emesonargs=( | ||
-Dbitdepths=$(IFS=,; echo "${bits[*]}") | ||
-Denable_asm=${enable_asm} | ||
$(meson_use test enable_tests) | ||
$(meson_feature xxhash xxhash_muxer) | ||
) | ||
meson_src_configure | ||
} | ||
|
||
multilib_src_test() { | ||
if multilib_is_native_abi ; then | ||
meson_src_test | ||
fi | ||
} |