1 |
commit: c6ec29d8c589796d51f735ce310dc36fa1ebcab2 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 17 16:36:45 2022 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 17 16:36:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6ec29d8 |
7 |
|
8 |
Revert "media-libs/dav1d: Drop old versions" |
9 |
|
10 |
Still needed by media-tv/mythtv. |
11 |
|
12 |
This reverts commit f607b30f5dce665b0a331c3f45d9903ced7c383c. |
13 |
|
14 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
15 |
|
16 |
media-libs/dav1d/Manifest | 1 + |
17 |
media-libs/dav1d/dav1d-0.9.2.ebuild | 61 ++++++++++++++++++++++ |
18 |
...id-meson-s-symbols_have_underscore_prefix.patch | 35 +++++++++++++ |
19 |
3 files changed, 97 insertions(+) |
20 |
|
21 |
diff --git a/media-libs/dav1d/Manifest b/media-libs/dav1d/Manifest |
22 |
index ae7eababc88e..ac63c1cc47f6 100644 |
23 |
--- a/media-libs/dav1d/Manifest |
24 |
+++ b/media-libs/dav1d/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
+DIST dav1d-0.9.2.tar.bz2 833722 BLAKE2B b05edd1ca627906e57923be08f1ecd73469f9a8e2ed585edf81f1fe1ffc173f1e4ba52eb766b82d9ea1349a6c1cf2a5a48cc9a5bcf2debeb9d640d9842e266f4 SHA512 adfb822734a3fc8b73e9cf5f757bfd78fb144b00d95f1e942254c5caf1d801b05438d39571486ef37a94d2226166937fc56160a862e8d6d45c4f6d790531dc3f |
27 |
DIST dav1d-1.0.0.tar.bz2 960470 BLAKE2B 79355eeceea37df81e30be49dfea3dee9747fbbb82c0a08be3bbda525881112a8eb847afe3c3ccd0447fd6ee67ae540c5120ea00d4f891ac422850c611850c97 SHA512 86c6481e787fb6b8c28521e1efb1876d1be99f5fa5332cddab1111059b44775e05203cfc5c80a1b404ee00f35a1f5e1099e21b1f0851d77fb0101567e8b1a892 |
28 |
|
29 |
diff --git a/media-libs/dav1d/dav1d-0.9.2.ebuild b/media-libs/dav1d/dav1d-0.9.2.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..7328056c980b |
32 |
--- /dev/null |
33 |
+++ b/media-libs/dav1d/dav1d-0.9.2.ebuild |
34 |
@@ -0,0 +1,61 @@ |
35 |
+# Copyright 1999-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+SCM="" |
41 |
+if [[ "${PV}" == "9999" ]]; then |
42 |
+ SCM="git-r3" |
43 |
+ EGIT_REPO_URI="https://code.videolan.org/videolan/dav1d" |
44 |
+else |
45 |
+ SRC_URI="https://code.videolan.org/videolan/dav1d/-/archive/${PV}/${P}.tar.bz2" |
46 |
+ KEYWORDS="amd64 arm arm64 ppc ppc64 ~riscv ~sparc x86" |
47 |
+fi |
48 |
+ |
49 |
+inherit ${SCM} meson-multilib |
50 |
+ |
51 |
+DESCRIPTION="dav1d is an AV1 Decoder :)" |
52 |
+HOMEPAGE="https://code.videolan.org/videolan/dav1d" |
53 |
+ |
54 |
+LICENSE="BSD-2" |
55 |
+SLOT="0/5" |
56 |
+IUSE="+8bit +10bit +asm test xxhash" |
57 |
+RESTRICT="!test? ( test )" |
58 |
+ |
59 |
+ASM_DEPEND=">=dev-lang/nasm-2.15.05" |
60 |
+BDEPEND="asm? ( |
61 |
+ abi_x86_32? ( ${ASM_DEPEND} ) |
62 |
+ abi_x86_64? ( ${ASM_DEPEND} ) |
63 |
+ ) |
64 |
+ xxhash? ( dev-libs/xxhash ) |
65 |
+ " |
66 |
+ |
67 |
+DOCS=( README.md doc/PATENTS THANKS.md ) |
68 |
+PATCHES=( "${FILESDIR}"/build-avoid-meson-s-symbols_have_underscore_prefix.patch ) |
69 |
+ |
70 |
+multilib_src_configure() { |
71 |
+ local -a bits=() |
72 |
+ use 8bit && bits+=( 8 ) |
73 |
+ use 10bit && bits+=( 16 ) |
74 |
+ |
75 |
+ local enable_asm |
76 |
+ if [[ ${MULTILIB_ABI_FLAG} == abi_x86_x32 ]]; then |
77 |
+ enable_asm=false |
78 |
+ else |
79 |
+ enable_asm=$(usex asm true false) |
80 |
+ fi |
81 |
+ |
82 |
+ local emesonargs=( |
83 |
+ -D bitdepths=$(IFS=,; echo "${bits[*]}") |
84 |
+ -D enable_asm=${enable_asm} |
85 |
+ -D enable_tests=$(usex test true false) |
86 |
+ -D xxhash_muxer=$(usex xxhash enabled disabled) |
87 |
+ ) |
88 |
+ meson_src_configure |
89 |
+} |
90 |
+ |
91 |
+multilib_src_test() { |
92 |
+ if multilib_is_native_abi ; then |
93 |
+ meson_src_test |
94 |
+ fi |
95 |
+} |
96 |
|
97 |
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 |
98 |
new file mode 100644 |
99 |
index 000000000000..f9c0dbbfaf2b |
100 |
--- /dev/null |
101 |
+++ b/media-libs/dav1d/files/build-avoid-meson-s-symbols_have_underscore_prefix.patch |
102 |
@@ -0,0 +1,35 @@ |
103 |
+https://code.videolan.org/videolan/dav1d/-/issues/370 |
104 |
+https://code.videolan.org/videolan/dav1d/-/commit/c6a08b3aa1ee99dade53e5e32033bc1d14455a22 |
105 |
+ |
106 |
+From c6a08b3aa1ee99dade53e5e32033bc1d14455a22 Mon Sep 17 00:00:00 2001 |
107 |
+From: Janne Grunau <janne-vlc@××××××.net> |
108 |
+Date: Tue, 21 Sep 2021 09:30:14 +0200 |
109 |
+Subject: [PATCH 1/5] build: avoid meson's symbols_have_underscore_prefix |
110 |
+ |
111 |
+Meson's dynamic check is unreliable when additional compiler flags are |
112 |
+passed via CFLAGS. For example '-fprofile-instr-generate' in oss-fuzz' |
113 |
+coverage build. Fixes #370. |
114 |
+--- |
115 |
+ meson.build | 6 +++++- |
116 |
+ 1 file changed, 5 insertions(+), 1 deletion(-) |
117 |
+ |
118 |
+diff --git a/meson.build b/meson.build |
119 |
+index 1bf69ab..1a7c409 100644 |
120 |
+--- a/meson.build |
121 |
++++ b/meson.build |
122 |
+@@ -382,7 +382,11 @@ endif |
123 |
+ |
124 |
+ cdata.set10('ARCH_PPC64LE', host_machine.cpu() == 'ppc64le') |
125 |
+ |
126 |
+-if cc.symbols_have_underscore_prefix() |
127 |
++# meson's cc.symbols_have_underscore_prefix() is unfortunately unrelieably |
128 |
++# when additional flags like '-fprofile-instr-generate' are passed via CFLAGS |
129 |
++# see following meson issue https://github.com/mesonbuild/meson/issues/5482 |
130 |
++if (host_machine.system() == 'darwin' or |
131 |
++ (host_machine.system() == 'windows' and host_machine.cpu_family() == 'x86')) |
132 |
+ cdata.set10('PREFIX', true) |
133 |
+ cdata_asm.set10('PREFIX', true) |
134 |
+ endif |
135 |
+-- |
136 |
+2.32.0 |
137 |
+ |