summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2022-08-17 12:36:45 -0400
committerMatt Turner <mattst88@gentoo.org>2022-08-17 12:36:45 -0400
commitc6ec29d8c589796d51f735ce310dc36fa1ebcab2 (patch)
tree5a48946e06a10ba5beccea499a6e5df15e302350
parentdev-util/ninja: Drop old versions (diff)
downloadgentoo-c6ec29d8.tar.gz
gentoo-c6ec29d8.tar.bz2
gentoo-c6ec29d8.zip
Revert "media-libs/dav1d: Drop old versions"
Still needed by media-tv/mythtv. This reverts commit f607b30f5dce665b0a331c3f45d9903ced7c383c. Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--media-libs/dav1d/Manifest1
-rw-r--r--media-libs/dav1d/dav1d-0.9.2.ebuild61
-rw-r--r--media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch35
3 files changed, 97 insertions, 0 deletions
diff --git a/media-libs/dav1d/Manifest b/media-libs/dav1d/Manifest
index ae7eababc88e..ac63c1cc47f6 100644
--- a/media-libs/dav1d/Manifest
+++ b/media-libs/dav1d/Manifest
@@ -1 +1,2 @@
+DIST dav1d-0.9.2.tar.bz2 833722 BLAKE2B b05edd1ca627906e57923be08f1ecd73469f9a8e2ed585edf81f1fe1ffc173f1e4ba52eb766b82d9ea1349a6c1cf2a5a48cc9a5bcf2debeb9d640d9842e266f4 SHA512 adfb822734a3fc8b73e9cf5f757bfd78fb144b00d95f1e942254c5caf1d801b05438d39571486ef37a94d2226166937fc56160a862e8d6d45c4f6d790531dc3f
DIST dav1d-1.0.0.tar.bz2 960470 BLAKE2B 79355eeceea37df81e30be49dfea3dee9747fbbb82c0a08be3bbda525881112a8eb847afe3c3ccd0447fd6ee67ae540c5120ea00d4f891ac422850c611850c97 SHA512 86c6481e787fb6b8c28521e1efb1876d1be99f5fa5332cddab1111059b44775e05203cfc5c80a1b404ee00f35a1f5e1099e21b1f0851d77fb0101567e8b1a892
diff --git a/media-libs/dav1d/dav1d-0.9.2.ebuild b/media-libs/dav1d/dav1d-0.9.2.ebuild
new file mode 100644
index 000000000000..7328056c980b
--- /dev/null
+++ b/media-libs/dav1d/dav1d-0.9.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+SCM=""
+if [[ "${PV}" == "9999" ]]; then
+ SCM="git-r3"
+ EGIT_REPO_URI="https://code.videolan.org/videolan/dav1d"
+else
+ SRC_URI="https://code.videolan.org/videolan/dav1d/-/archive/${PV}/${P}.tar.bz2"
+ KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~sparc x86"
+fi
+
+inherit ${SCM} meson-multilib
+
+DESCRIPTION="dav1d is an AV1 Decoder :)"
+HOMEPAGE="https://code.videolan.org/videolan/dav1d"
+
+LICENSE="BSD-2"
+SLOT="0/5"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
+
+ASM_DEPEND=">=dev-lang/nasm-2.15.05"
+BDEPEND="asm? (
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )
+ )
+ xxhash? ( dev-libs/xxhash )
+ "
+
+DOCS=( README.md doc/PATENTS THANKS.md )
+PATCHES=( "${FILESDIR}"/build-avoid-meson-s-symbols_have_underscore_prefix.patch )
+
+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=(
+ -D bitdepths=$(IFS=,; echo "${bits[*]}")
+ -D enable_asm=${enable_asm}
+ -D enable_tests=$(usex test true false)
+ -D xxhash_muxer=$(usex xxhash enabled disabled)
+ )
+ meson_src_configure
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi ; then
+ meson_src_test
+ fi
+}
diff --git a/media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch b/media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch
new file mode 100644
index 000000000000..f9c0dbbfaf2b
--- /dev/null
+++ b/media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch
@@ -0,0 +1,35 @@
+https://code.videolan.org/videolan/dav1d/-/issues/370
+https://code.videolan.org/videolan/dav1d/-/commit/c6a08b3aa1ee99dade53e5e32033bc1d14455a22
+
+From c6a08b3aa1ee99dade53e5e32033bc1d14455a22 Mon Sep 17 00:00:00 2001
+From: Janne Grunau <janne-vlc@jannau.net>
+Date: Tue, 21 Sep 2021 09:30:14 +0200
+Subject: [PATCH 1/5] build: avoid meson's symbols_have_underscore_prefix
+
+Meson's dynamic check is unreliable when additional compiler flags are
+passed via CFLAGS. For example '-fprofile-instr-generate' in oss-fuzz'
+coverage build. Fixes #370.
+---
+ meson.build | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1bf69ab..1a7c409 100644
+--- a/meson.build
++++ b/meson.build
+@@ -382,7 +382,11 @@ endif
+
+ cdata.set10('ARCH_PPC64LE', host_machine.cpu() == 'ppc64le')
+
+-if cc.symbols_have_underscore_prefix()
++# meson's cc.symbols_have_underscore_prefix() is unfortunately unrelieably
++# when additional flags like '-fprofile-instr-generate' are passed via CFLAGS
++# see following meson issue https://github.com/mesonbuild/meson/issues/5482
++if (host_machine.system() == 'darwin' or
++ (host_machine.system() == 'windows' and host_machine.cpu_family() == 'x86'))
+ cdata.set10('PREFIX', true)
+ cdata_asm.set10('PREFIX', true)
+ endif
+--
+2.32.0
+