summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2018-09-27 16:43:20 +0200
committerLuca Barbato <lu_zero@gentoo.org>2018-09-28 12:00:51 +0000
commitf5778ace3f0e72aab7acab9bcd746068c6f4b421 (patch)
tree4cd2f36827fc62cc9cc8e0f786439b2894c0767b /media-libs
parentwww-client/firefox: add missing "errno.h" include in SandboxOpenedFiles.cpp (diff)
downloadgentoo-f5778ace3f0e72aab7acab9bcd746068c6f4b421.tar.gz
gentoo-f5778ace3f0e72aab7acab9bcd746068c6f4b421.tar.bz2
gentoo-f5778ace3f0e72aab7acab9bcd746068c6f4b421.zip
media-libs/dav1d: Add new package
This is a new AV1 decoder by VideoLAN. There is no tagged release yet, so this commit only adds the 9999 ebuild. Signed-off-by: Niklas Haas <git@haasn.xyz> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/dav1d/dav1d-9999.ebuild52
-rw-r--r--media-libs/dav1d/metadata.xml12
2 files changed, 64 insertions, 0 deletions
diff --git a/media-libs/dav1d/dav1d-9999.ebuild b/media-libs/dav1d/dav1d-9999.ebuild
new file mode 100644
index 000000000000..2f6ff4e339b5
--- /dev/null
+++ b/media-libs/dav1d/dav1d-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SCM=""
+if [[ "${PV}" == "9999" ]]; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://code.videolan.org/videolan/dav1d"
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://code.videolan.org/videolan/dav1d/-/archive/${PV}/${P}.tar.bz2"
+fi
+
+inherit ${SCM} meson ninja-utils multilib-minimal
+
+DESCRIPTION="dav1d is an AV1 Decoder :)"
+HOMEPAGE="https://code.videolan.org/videolan/dav1d"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="+8bit +10bit +asm"
+
+ASM_DEPEND=">=dev-lang/nasm-2.13"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ asm? (
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )
+ )"
+
+DOCS=( README.md doc/PATENTS )
+
+multilib_src_configure() {
+ local -a bits=()
+ use 8bit && bits+=( 8 )
+ use 10bit && bits+=( 10 )
+
+ local emesonargs=(
+ -D bitdepths=$(IFS=,; echo "${bits[*]}")
+ -D build_asm=$(usex asm true false)
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ eninja
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" eninja install
+}
diff --git a/media-libs/dav1d/metadata.xml b/media-libs/dav1d/metadata.xml
new file mode 100644
index 000000000000..726e757f4b0d
--- /dev/null
+++ b/media-libs/dav1d/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="8bit">Add support for decoding 8-bit AV1.</flag>
+ <flag name="10bit">Add support for building 10-bit AV1.</flag>
+ <flag name="asm">Enable custom x86 assembly for faster decoding.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://code.videolan.org/videolan/dav1d/issues</bugs-to>
+ </upstream>
+</pkgmetadata>