chromium: conditionally compile routines for use with GLIB
PATCH RESEND 1/1 chromium: conditionally compile routines for use with GLIB
The routine QuoteArgForDesktopFileExec is only called when GLIB is used, and compilation will fail with the following error message if it is compiled without GLIB support (e.g. under Wayland):
"defined but not used [-Werror=unused-function]"
Signed-off-by Eric Nelson <[email protected]>
---
First e-mail bounced because I wasn't subscribed to the list
...ration-conditionally-compile-routines-for.patch | 41 ++++++++++++++++++++++ recipes-browser/chromium/chromium_37.0.2062.94.bb | 1 + 2 files changed, 42 insertions(+) create mode 100644 recipes-browser/chromium/chromium/0001-shell-integration-conditionally-compile-routines-for.patch
recipes-browser/chromium/chromium/0001-shell-integration-conditionally-compile-routines-for.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 40659667549d1eec5c9ed29c6120584f6628d761 Mon Sep 17 00:00:00 2001 +From: Eric Nelson <[email protected]> +Date: Mon, 6 Oct 2014 18:11:29 -0700 +Subject: [PATCH] shell integration: conditionally compile routines for use + with GLIB + +The routine QuoteArgForDesktopFileExec is only called when GLIB is +used, and compilation will fail with the following error message +if it is compiled. + + "defined but not used [-Werror=unused-function]" + +Signed-off-by: Eric Nelson <[email protected]> +--- + chrome/browser/shell_integration_linux.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc +index 24a1c55..bd82db4 100644 +--- a/chrome/browser/shell_integration_linux.cc ++++ b/chrome/browser/shell_integration_linux.cc +@@ -260,6 +260,7 @@ void DeleteShortcutInApplicationsMenu( + LaunchXdgUtility(argv, &exit_code); + } + ++#if defined(USE_GLIB) + // Quote a string such that it appears as one verbatim argument for the Exec + // key in a desktop file. + std::string QuoteArgForDesktopFileExec(const std::string& arg) { +@@ -307,6 +308,8 @@ std::string QuoteCommandLineForDesktopFileExec( + return quoted_path; + } + ++#endif ++ + const char kDesktopEntry[] = "Desktop Entry"; + + const char kXdgOpenShebang[] = "#!/usr/bin/env xdg-open"; +-- +1.9.1 +
recipes-browser/chromium/chromium_37.0.2062.94.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "\ file://unistd-2.patch \ file://google-chrome \ file://google-chrome.desktop \ + file://0001-shell-integration-conditionally-compile-routines-for.patch \ " SRC_URI[md5sum] = "49bcf221a2e2e5406ae2e69964d01093" SRC_URI[sha256sum] = "d27c19580b74cbe143131f0bc097557b3b2fb3d2be966e688d8af51a779ce533"
Signature · 1 line
1.9.1
Otavio Salvador
AppliedQuoted 6 lines · Eric Nelson
The routine QuoteArgForDesktopFileExec is only called when GLIB is used, and compilation will fail with the following error message if it is compiled without GLIB support (e.g. under Wayland):
"defined but not used [-Werror=unused-function]"Signed-off-by Eric Nelson <[email protected]>
I applied this on master; thanks for sending it.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750