Skip to content

Commit

Permalink
Add patch for missing glib include, add speex link directory and fix …
Browse files Browse the repository at this point in the history
…initialization to match Chromium where g_type_init is called regardless of g_thread_supported value.
  • Loading branch information
ewencp committed Oct 14, 2012
1 parent 8844105 commit 30dcf2c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion FindChrome.cmake
Expand Up @@ -96,7 +96,7 @@ IF(NOT CHROMIUM_ISSCONS)
SET(CHROMIUM_CHLIBS ${CHROMIUM_DATADIR}/obj.target)
ENDIF()

SET(CHROME_LIBRARY_DIRS ${CHROMIUM_CHLIBS} ${CHROMIUM_CHLIBS}/app ${CHROMIUM_CHLIBS}/base ${CHROMIUM_CHLIBS}/base/allocator ${CHROMIUM_CHLIBS}/ipc ${CHROMIUM_CHLIBS}/jingle ${CHROMIUM_CHLIBS}/chrome ${CHROMIUM_CHLIBS}/chrome/default_plugin ${CHROMIUM_CHLIBS}/net ${CHROMIUM_CHLIBS}/media ${CHROMIUM_CHLIBS}/webkit ${CHROMIUM_CHLIBS}/sandbox ${CHROMIUM_CHLIBS}/skia ${CHROMIUM_CHLIBS}/remoting ${CHROMIUM_CHLIBS}/remoting/proto ${CHROMIUM_CHLIBS}/printing ${CHROMIUM_CHLIBS}/v8/tools/gyp ${CHROMIUM_CHLIBS}/v8/src/extensions/experimental ${CHROMIUM_CHLIBS}/gpu ${CHROMIUM_CHLIBS}/ui/gfx ${CHROMIUM_CHLIBS}/gfx ${CHROMIUM_CHLIBS}/sdch ${CHROMIUM_CHLIBS}/build/temp_gyp ${CHROMIUM_CHLIBS}/seccompsandbox ${CHROMIUM_CHLIBS}/third_party/undoview ${CHROMIUM_CHLIBS}/ppapi ${CHROMIUM_CHLIBS}/third_party/ffmpeg ${CHROMIUM_CHLIBS}/third_party/openmax ${CHROMIUM_CHLIBS}/third_party/harfbuzz ${CHROMIUM_CHLIBS}/third_party/libjingle ${CHROMIUM_CHLIBS}/third_party/hunspell ${CHROMIUM_CHLIBS}/third_party/icu ${CHROMIUM_CHLIBS}/third_party/libevent ${CHROMIUM_CHLIBS}/third_party/libxml ${CHROMIUM_CHLIBS}/third_party/libxslt ${CHROMIUM_CHLIBS}/third_party/modp_b64 ${CHROMIUM_CHLIBS}/third_party/protobuf ${CHROMIUM_CHLIBS}/third_party/cld ${CHROMIUM_CHLIBS}/third_party/ots ${CHROMIUM_CHLIBS}/third_party/angle/src ${CHROMIUM_CHLIBS}/base/third_party/dynamic_annotations ${CHROMIUM_CHLIBS}/third_party/sqlite ${CHROMIUM_CHLIBS}/third_party/zlib ${CHROMIUM_CHLIBS}/third_party/flac ${CHROMIUM_CHLIBS}/third_party/libwebp ${CHROMIUM_CHLIBS}/third_party/cacheinvalidation ${CHROMIUM_CHLIBS}/webkit/support ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/WebKit/chromium ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/JavaScriptCore/JavaScriptCore.gyp ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/WebCore/WebCore.gyp ${CHROMIUM_CHLIBS}/content ${CHROMIUM_CHLIBS}/chrome/app/policy ${CHROMIUM_CHLIBS}/webkit/support)
SET(CHROME_LIBRARY_DIRS ${CHROMIUM_CHLIBS} ${CHROMIUM_CHLIBS}/app ${CHROMIUM_CHLIBS}/base ${CHROMIUM_CHLIBS}/base/allocator ${CHROMIUM_CHLIBS}/ipc ${CHROMIUM_CHLIBS}/jingle ${CHROMIUM_CHLIBS}/chrome ${CHROMIUM_CHLIBS}/chrome/default_plugin ${CHROMIUM_CHLIBS}/net ${CHROMIUM_CHLIBS}/media ${CHROMIUM_CHLIBS}/webkit ${CHROMIUM_CHLIBS}/sandbox ${CHROMIUM_CHLIBS}/skia ${CHROMIUM_CHLIBS}/remoting ${CHROMIUM_CHLIBS}/remoting/proto ${CHROMIUM_CHLIBS}/printing ${CHROMIUM_CHLIBS}/v8/tools/gyp ${CHROMIUM_CHLIBS}/v8/src/extensions/experimental ${CHROMIUM_CHLIBS}/gpu ${CHROMIUM_CHLIBS}/ui/gfx ${CHROMIUM_CHLIBS}/gfx ${CHROMIUM_CHLIBS}/sdch ${CHROMIUM_CHLIBS}/build/temp_gyp ${CHROMIUM_CHLIBS}/seccompsandbox ${CHROMIUM_CHLIBS}/third_party/undoview ${CHROMIUM_CHLIBS}/ppapi ${CHROMIUM_CHLIBS}/third_party/ffmpeg ${CHROMIUM_CHLIBS}/third_party/openmax ${CHROMIUM_CHLIBS}/third_party/harfbuzz ${CHROMIUM_CHLIBS}/third_party/libjingle ${CHROMIUM_CHLIBS}/third_party/hunspell ${CHROMIUM_CHLIBS}/third_party/icu ${CHROMIUM_CHLIBS}/third_party/libevent ${CHROMIUM_CHLIBS}/third_party/libxml ${CHROMIUM_CHLIBS}/third_party/libxslt ${CHROMIUM_CHLIBS}/third_party/modp_b64 ${CHROMIUM_CHLIBS}/third_party/protobuf ${CHROMIUM_CHLIBS}/third_party/cld ${CHROMIUM_CHLIBS}/third_party/ots ${CHROMIUM_CHLIBS}/third_party/angle/src ${CHROMIUM_CHLIBS}/base/third_party/dynamic_annotations ${CHROMIUM_CHLIBS}/third_party/sqlite ${CHROMIUM_CHLIBS}/third_party/zlib ${CHROMIUM_CHLIBS}/third_party/flac ${CHROMIUM_CHLIBS}/third_party/libwebp ${CHROMIUM_CHLIBS}/third_party/cacheinvalidation ${CHROMIUM_CHLIBS}/webkit/support ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/WebKit/chromium ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/JavaScriptCore/JavaScriptCore.gyp ${CHROMIUM_CHLIBS}/third_party/WebKit/Source/WebCore/WebCore.gyp ${CHROMIUM_CHLIBS}/content ${CHROMIUM_CHLIBS}/chrome/app/policy ${CHROMIUM_CHLIBS}/webkit/support ${CHROMIUM_CHLIBS}/third_party/speex)

SET(CHROMIUM_TPLIBS ${CHROMIUM_CHLIBS}/third_party/openmax/libil.a event zlib png jpeg ${CHROMIUM_CHLIBS}/third_party/libjpeg_turbo/libjpeg_turbo.a xslt bz2 Xss ${CHROMIUM_CHLIBS}/third_party/sqlite/libsqlite3.a ${CHROMIUM_CHLIBS}/net/third_party/nss/libssl.a undoview allocator base_i18n xdg_mime seccomp_sandbox symbolize gcrypt)

Expand Down
12 changes: 12 additions & 0 deletions patches/chromium-glib-i18n.patch
@@ -0,0 +1,12 @@
Index: ui/base/l10n/l10n_util.cc
===================================================================
--- ui/base/l10n/l10n_util.cc (revision 87952)
+++ ui/base/l10n/l10n_util.cc (working copy)
@@ -6,6 +6,7 @@

#if defined(TOOLKIT_USES_GTK)
#include <glib/gutils.h>
+#include <glib.h>
#endif

#include <algorithm>
28 changes: 13 additions & 15 deletions src/Root.cpp
Expand Up @@ -363,21 +363,19 @@ bool Root::init(FileString homeDirectory, FileString subprocessDirectory, unsign

#if defined(OS_LINUX)
if (!g_thread_supported ()) // the client application might have already setup glib
{
g_thread_init(NULL);
// Glib type system initialization. Needed at least for gconf,
// used in net/proxy/proxy_config_service_linux.cc. Most likely
// this is superfluous as gtk_init() ought to do this. It's
// definitely harmless, so retained as a reminder of this
// requirement for gconf.
g_type_init();
// gtk_init() can change |argc| and |argv|.
char argv0data[] = "[Berkelium]";
char *argv0 = argv0data;
char **argv = &argv0;
int argc = 1;
gtk_init(&argc, &argv);
}
g_thread_init(NULL);
// Glib type system initialization. Needed at least for gconf,
// used in net/proxy/proxy_config_service_linux.cc. Most likely
// this is superfluous as gtk_init() ought to do this. It's
// definitely harmless, so retained as a reminder of this
// requirement for gconf.
g_type_init();
// gtk_init() can change |argc| and |argv|.
char argv0data[] = "[Berkelium]";
char *argv0 = argv0data;
char **argv = &argv0;
int argc = 1;
gtk_init(&argc, &argv);
SetUpGLibLogHandler();
#endif

Expand Down

0 comments on commit 30dcf2c

Please sign in to comment.