[vlc-commits] contrib: dav1d: don't try to compile the .rc file on windows targets

Steve Lhomme git at videolan.org
Fri Nov 9 14:21:55 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov  9 14:19:52 2018 +0100| [eda959e89a7c471bbd8ebf6fbfd7ae74dd85153b] | committer: Steve Lhomme

contrib: dav1d: don't try to compile the .rc file on windows targets

We won't use it anyway

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eda959e89a7c471bbd8ebf6fbfd7ae74dd85153b
---

 ...-an-option-to-disable-the-.rc-compilation.patch | 46 ++++++++++++++++++++++
 contrib/src/dav1d/rules.mak                        | 10 ++++-
 2 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/contrib/src/dav1d/0001-add-an-option-to-disable-the-.rc-compilation.patch b/contrib/src/dav1d/0001-add-an-option-to-disable-the-.rc-compilation.patch
new file mode 100644
index 0000000000..1cfcb793ae
--- /dev/null
+++ b/contrib/src/dav1d/0001-add-an-option-to-disable-the-.rc-compilation.patch
@@ -0,0 +1,46 @@
+From f459feb6b0b4ad526d794c8c3f3e5a2f09806ecc Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at videolan.org>
+Date: Fri, 9 Nov 2018 14:01:49 +0100
+Subject: [PATCH] add an option to disable the .rc compilation
+
+This is to avoid issues where Meson doesn't detect the .rc compiler properly
+and there is no way to disable the .rc files compilation for static targets.
+---
+ meson_options.txt | 6 ++++++
+ src/meson.build   | 6 +++++-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 08e75ad..bedbc7a 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -30,3 +30,9 @@ option('fuzzing_engine',
+     choices : ['none', 'libfuzzer', 'oss-fuzz'],
+     value: 'none',
+     description: 'Select the fuzzing engine')
++
++# temporary option until it can be done automatically only when 
++option('win32_ver',
++    type: 'boolean',
++    value: true,
++    description: 'Add a version number to the built library on Windows')
+diff --git a/src/meson.build b/src/meson.build
+index 5515c2e..fefa0b0 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -146,7 +146,11 @@ if host_machine.system() == 'windows'
+         configuration : rc_data
+     )
+ 
+-    libdav1d_rc_obj = winmod.compile_resources(rc_file)
++    if get_option('win32_ver')
++        libdav1d_rc_obj = winmod.compile_resources(rc_file)
++    else
++        libdav1d_rc_obj = []
++    endif
+ else
+     libdav1d_rc_obj = []
+ endif
+-- 
+2.17.0.windows.1
+
diff --git a/contrib/src/dav1d/rules.mak b/contrib/src/dav1d/rules.mak
index 007664ce68..411a9b158e 100644
--- a/contrib/src/dav1d/rules.mak
+++ b/contrib/src/dav1d/rules.mak
@@ -1,6 +1,6 @@
 # libdav1d
 
-DAV1D_HASH := aa5f55b2468f937cd36ceb1f0595f9c0915c5997
+DAV1D_HASH := 8c95771dfa7a0bdb542eef8924bd0d3009e5efff
 DAV1D_VERSION := git-$(DAV1D_HASH)
 DAV1D_GITURL := https://code.videolan.org/videolan/dav1d.git
 
@@ -9,6 +9,11 @@ ifeq ($(call need_pkg,"dav1d"),)
 PKGS_FOUND += dav1d
 endif
 
+DAV1D_CONF = -D build_tests=false -D build_tools=false
+ifdef HAVE_WIN32
+DAV1D_CONF += -D win32_ver=false
+endif
+
 $(TARBALLS)/dav1d-$(DAV1D_VERSION).tar.xz:
 	$(call download_git,$(DAV1D_GITURL),,$(DAV1D_HASH))
 
@@ -18,10 +23,11 @@ $(TARBALLS)/dav1d-$(DAV1D_VERSION).tar.xz:
 
 dav1d: dav1d-$(DAV1D_VERSION).tar.xz .sum-dav1d
 	$(UNPACK)
+	$(APPLY) $(SRC)/dav1d/0001-add-an-option-to-disable-the-.rc-compilation.patch
 	$(MOVE)
 
 .dav1d: dav1d crossfile.meson
 	cd $< && rm -rf ./build
-	cd $< && $(HOSTVARS_MESON) $(MESON) -D build_tests=false -D build_tools=false build
+	cd $< && $(HOSTVARS_MESON) $(MESON) $(DAV1D_CONF) build
 	cd $< && cd build && ninja install
 	touch $@



More information about the vlc-commits mailing list