diff options
Diffstat (limited to 'pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch')
-rw-r--r-- | pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch b/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch new file mode 100644 index 00000000000..277ffa47ce7 --- /dev/null +++ b/pkgs/os-specific/linux/chromium-os/sommelier/0006-sommelier-make-building-demos-optional.patch @@ -0,0 +1,100 @@ +From 8774d76f1b57092df9004d654fd075d7691b9f12 Mon Sep 17 00:00:00 2001 +From: Alyssa Ross <hi@alyssa.is> +Date: Wed, 15 Jan 2020 21:36:43 +0000 +Subject: [PATCH 6/6] sommelier: make building demos optional +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +pkg-config was checked at GN evaluation time for libbrillo and +libchrome, meaning that there was no way to build sommelier without +them, even though they were only required for the demos, not for +sommelier itself. + +Making the demo optional saves having to libbrillo and libchrome for +the common case of building just sommelier, which themselves have lots +of unusual dependencies. + +Thanks-to: Tomasz Ĺšniatowski <tsniatowski@vewd.com> +--- + vm_tools/sommelier/BUILD.gn | 54 ++++++++++++++++++++++--------------- + 1 file changed, 32 insertions(+), 22 deletions(-) + +diff --git a/vm_tools/sommelier/BUILD.gn b/vm_tools/sommelier/BUILD.gn +index 4330560a1..cbb752745 100644 +--- a/vm_tools/sommelier/BUILD.gn ++++ b/vm_tools/sommelier/BUILD.gn +@@ -4,12 +4,20 @@ + + import("wayland_protocol.gni") + ++declare_args() { ++ use_demos = true ++} ++ + group("all") { + deps = [ + ":sommelier", +- ":wayland_demo", +- ":x11_demo", + ] ++ if (use_demos) { ++ deps += [ ++ ":wayland_demo", ++ ":x11_demo", ++ ] ++ } + } + + if (!defined(peer_cmd_prefix)) { +@@ -123,25 +131,27 @@ executable("sommelier") { + ] + } + +-executable("wayland_demo") { +- pkg_deps = [ +- "libbrillo", +- "libchrome-${libbase_ver}", +- "wayland-client", +- ] +- libs = [ "wayland-client" ] +- sources = [ +- "demos/wayland_demo.cc", +- ] +-} ++if (use_demos) { ++ executable("wayland_demo") { ++ pkg_deps = [ ++ "libbrillo", ++ "libchrome-${libbase_ver}", ++ "wayland-client", ++ ] ++ libs = [ "wayland-client" ] ++ sources = [ ++ "demos/wayland_demo.cc", ++ ] ++ } + +-executable("x11_demo") { +- pkg_deps = [ +- "libbrillo", +- "libchrome-${libbase_ver}", +- ] +- libs = [ "X11" ] +- sources = [ +- "demos/x11_demo.cc", +- ] ++ executable("x11_demo") { ++ pkg_deps = [ ++ "libbrillo", ++ "libchrome-${libbase_ver}", ++ ] ++ libs = [ "X11" ] ++ sources = [ ++ "demos/x11_demo.cc", ++ ] ++ } + } +-- +2.25.1 + |