public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/dav1d/, media-libs/dav1d/files/
@ 2021-10-31  3:39 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-10-31  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     647a8643d2941d4f20a6cb2b4799fc35bbc26c36
Author:     Francisco Javier Félix <web <AT> inode64 <DOT> com>
AuthorDate: Mon Oct 18 06:57:28 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 31 03:39:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=647a8643

media-libs/dav1d: fix build, support xxhash

* Require minimum nasm 2.15.05
* Disable test by default
* Fix build, see bug https://code.videolan.org/videolan/dav1d/-/issues/370 and
patch https://code.videolan.org/videolan/dav1d/-/commit/c6a08b3aa1ee99dade53e5e32033bc1d14455a22
the same problem with versions of gcc 10.3.0 and gcc 11.2.0, from dav1d 0.8.2 to 0.9.2.

Closes: https://bugs.gentoo.org/738726
Closes: https://bugs.gentoo.org/791544
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: INODE64 <ffelix <AT> inode64.com>
Closes: https://github.com/gentoo/gentoo/pull/22621
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/dav1d/dav1d-0.8.2.ebuild                | 12 ++++++--
 media-libs/dav1d/dav1d-0.9.0.ebuild                | 12 ++++++--
 media-libs/dav1d/dav1d-0.9.1.ebuild                | 12 ++++++--
 media-libs/dav1d/dav1d-0.9.2.ebuild                | 12 ++++++--
 media-libs/dav1d/dav1d-9999.ebuild                 | 11 ++++++--
 ...id-meson-s-symbols_have_underscore_prefix.patch | 32 ++++++++++++++++++++++
 media-libs/dav1d/metadata.xml                      |  1 +
 7 files changed, 77 insertions(+), 15 deletions(-)

diff --git a/media-libs/dav1d/dav1d-0.8.2.ebuild b/media-libs/dav1d/dav1d-0.8.2.ebuild
index 69f48374833..caaf9cb8784 100644
--- a/media-libs/dav1d/dav1d-0.8.2.ebuild
+++ b/media-libs/dav1d/dav1d-0.8.2.ebuild
@@ -19,15 +19,19 @@ HOMEPAGE="https://code.videolan.org/videolan/dav1d"
 
 LICENSE="BSD-2"
 SLOT="0/5"
-IUSE="+8bit +10bit +asm"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
 
-ASM_DEPEND=">=dev-lang/nasm-2.14.02"
+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=()
@@ -44,6 +48,8 @@ multilib_src_configure() {
 	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
 }

diff --git a/media-libs/dav1d/dav1d-0.9.0.ebuild b/media-libs/dav1d/dav1d-0.9.0.ebuild
index ae26cc566f3..f111b62346e 100644
--- a/media-libs/dav1d/dav1d-0.9.0.ebuild
+++ b/media-libs/dav1d/dav1d-0.9.0.ebuild
@@ -19,15 +19,19 @@ HOMEPAGE="https://code.videolan.org/videolan/dav1d"
 
 LICENSE="BSD-2"
 SLOT="0/5"
-IUSE="+8bit +10bit +asm"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
 
-ASM_DEPEND=">=dev-lang/nasm-2.14.02"
+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=()
@@ -44,6 +48,8 @@ multilib_src_configure() {
 	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
 }

diff --git a/media-libs/dav1d/dav1d-0.9.1.ebuild b/media-libs/dav1d/dav1d-0.9.1.ebuild
index 7dedeea1b79..f7ae3e3273b 100644
--- a/media-libs/dav1d/dav1d-0.9.1.ebuild
+++ b/media-libs/dav1d/dav1d-0.9.1.ebuild
@@ -19,15 +19,19 @@ HOMEPAGE="https://code.videolan.org/videolan/dav1d"
 
 LICENSE="BSD-2"
 SLOT="0/5"
-IUSE="+8bit +10bit +asm"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
 
-ASM_DEPEND=">=dev-lang/nasm-2.14.02"
+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=()
@@ -44,6 +48,8 @@ multilib_src_configure() {
 	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
 }

diff --git a/media-libs/dav1d/dav1d-0.9.2.ebuild b/media-libs/dav1d/dav1d-0.9.2.ebuild
index 850f1843db9..fb91a0e8cc7 100644
--- a/media-libs/dav1d/dav1d-0.9.2.ebuild
+++ b/media-libs/dav1d/dav1d-0.9.2.ebuild
@@ -19,15 +19,19 @@ HOMEPAGE="https://code.videolan.org/videolan/dav1d"
 
 LICENSE="BSD-2"
 SLOT="0/5"
-IUSE="+8bit +10bit +asm"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
 
-ASM_DEPEND=">=dev-lang/nasm-2.14.02"
+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=()
@@ -44,6 +48,8 @@ multilib_src_configure() {
 	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
 }

diff --git a/media-libs/dav1d/dav1d-9999.ebuild b/media-libs/dav1d/dav1d-9999.ebuild
index 850f1843db9..c0d92e63904 100644
--- a/media-libs/dav1d/dav1d-9999.ebuild
+++ b/media-libs/dav1d/dav1d-9999.ebuild
@@ -19,13 +19,16 @@ HOMEPAGE="https://code.videolan.org/videolan/dav1d"
 
 LICENSE="BSD-2"
 SLOT="0/5"
-IUSE="+8bit +10bit +asm"
+IUSE="+8bit +10bit +asm test xxhash"
+RESTRICT="!test? ( test )"
 
-ASM_DEPEND=">=dev-lang/nasm-2.14.02"
+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 )
 
@@ -44,6 +47,8 @@ multilib_src_configure() {
 	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
 }

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 00000000000..8a9b1e86eff
--- /dev/null
+++ b/media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch
@@ -0,0 +1,32 @@
+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
+

diff --git a/media-libs/dav1d/metadata.xml b/media-libs/dav1d/metadata.xml
index edef4df0c98..fbe7f555d99 100644
--- a/media-libs/dav1d/metadata.xml
+++ b/media-libs/dav1d/metadata.xml
@@ -8,6 +8,7 @@
 		<flag name="8bit">Add support for decoding 8-bit AV1.</flag>
 		<flag name="10bit">Add support for building 10-bit and 12-bit AV1.</flag>
 		<flag name="asm">Enable custom assembly for faster decoding.</flag>
+		<flag name="xxhash">Enable <pkg>dev-libs/xxhash</pkg> support for hashing muxer</flag>
 	</use>
 	<upstream>
 		<bugs-to>https://code.videolan.org/videolan/dav1d/issues</bugs-to>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-31  3:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-31  3:39 [gentoo-commits] repo/gentoo:master commit in: media-libs/dav1d/, media-libs/dav1d/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox