summaryrefslogtreecommitdiff
path: root/mozilla-1515641-av1-build-2.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-03-12 14:58:18 +0100
committerMartin Stransky <stransky@redhat.com>2019-03-12 14:58:18 +0100
commit8fedaacddf1da926ab191245e2b22aac878eb691 (patch)
treede8c28e21e096c742332c9d31781201d7877b569 /mozilla-1515641-av1-build-2.patch
parentUpdated to 66.0 (diff)
downloadlibrewolf-fedora-ff-8fedaacddf1da926ab191245e2b22aac878eb691.tar.gz
librewolf-fedora-ff-8fedaacddf1da926ab191245e2b22aac878eb691.tar.bz2
librewolf-fedora-ff-8fedaacddf1da926ab191245e2b22aac878eb691.zip
AV1 build patches
Diffstat (limited to 'mozilla-1515641-av1-build-2.patch')
-rw-r--r--mozilla-1515641-av1-build-2.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/mozilla-1515641-av1-build-2.patch b/mozilla-1515641-av1-build-2.patch
new file mode 100644
index 0000000..bcfc380
--- /dev/null
+++ b/mozilla-1515641-av1-build-2.patch
@@ -0,0 +1,32 @@
+diff -up firefox-66.0/media/libdav1d/moz.build.mozilla-1515641 firefox-66.0/media/libdav1d/moz.build
+--- firefox-66.0/media/libdav1d/moz.build.mozilla-1515641 2019-03-12 14:51:09.102398904 +0100
++++ firefox-66.0/media/libdav1d/moz.build 2019-03-12 14:52:12.601193367 +0100
+@@ -25,7 +25,7 @@ SOURCES += [
+ ]
+
+ # Enable ASM build only on Linux for now.
+-if CONFIG['OS_TARGET'] == 'Linux' and (CONFIG['CPU_ARCH'] in ('x86', 'x86_64')):
++if CONFIG['MOZ_DAV1D_ASM']:
+ # Default stack aligment is 16 bytes
+ DIRS += ['asm']
+
+diff -up firefox-66.0/toolkit/moz.configure.mozilla-1515641 firefox-66.0/toolkit/moz.configure
+--- firefox-66.0/toolkit/moz.configure.mozilla-1515641 2019-03-12 14:51:09.101398907 +0100
++++ firefox-66.0/toolkit/moz.configure 2019-03-12 14:51:09.103398901 +0100
+@@ -437,6 +437,16 @@ def av1(value, target, c_compiler):
+ if enabled:
+ return True
+
++@depends(target, nasm_version, when=av1 & compile_environment)
++def dav1d_asm(target, nasm_version):
++ if target.os == 'GNU' and target.kernel == 'Linux' and target.cpu in ('x86', 'x86_64'):
++ if nasm_version < '2.13':
++ die('nasm 2.13 or greater is required for AV1 support. '
++ 'Either install nasm or add --disable-av1 to your configure options.')
++ return True
++
++
++set_config('MOZ_DAV1D_ASM', dav1d_asm)
+ set_config('MOZ_AV1', av1)
+ set_define('MOZ_AV1', av1)
+
bgstack15