aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2016-10-12 17:25:05 +0100
committerChristopher Baines <mail@cbaines.net>2017-12-19 07:27:49 +0000
commit1c5c4b7b30c13b0bfc1ac1e7de90daf72425e599 (patch)
tree5705b2658413e13f0a8ec0c0e5554f30defa2b4e /gnu/packages/patches
parent4fad6598c60b48bf956096530c86f6920c72bd1c (diff)
downloadguix-chromium.tar
guix-chromium.tar.gz
gnu: Add chromium.chromium
* gnu/packages/chromium.scm: New file. * gnu/packages/patches/chromium-disable-api-keys-warning.patch, gnu/packages/patches/chromium-disable-third-party-cookies.patch, gnu/packages/patches/chromium-gn-bootstrap.patch, gnu/packages/patches/chromium-system-icu.patch, gnu/packages/patches/chromium-system-libevent.patch, gnu/packages/patches/chromium-system-nspr.patch, gnu/packages/patches/chromium-system-libxml.patch: New files. * gnu/local.mk: Record it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/chromium-disable-api-keys-warning.patch17
-rw-r--r--gnu/packages/patches/chromium-disable-third-party-cookies.patch13
-rw-r--r--gnu/packages/patches/chromium-gn-bootstrap.patch13
-rw-r--r--gnu/packages/patches/chromium-system-icu.patch15
-rw-r--r--gnu/packages/patches/chromium-system-libevent.patch84
-rw-r--r--gnu/packages/patches/chromium-system-libxml.patch29
-rw-r--r--gnu/packages/patches/chromium-system-nspr.patch65
7 files changed, 236 insertions, 0 deletions
diff --git a/gnu/packages/patches/chromium-disable-api-keys-warning.patch b/gnu/packages/patches/chromium-disable-api-keys-warning.patch
new file mode 100644
index 0000000000..c7e219f40e
--- /dev/null
+++ b/gnu/packages/patches/chromium-disable-api-keys-warning.patch
@@ -0,0 +1,17 @@
+Disable warning about missing API keys.
+
+Copied from:
+
+https://anonscm.debian.org/cgit/pkg-chromium/pkg-chromium.git/tree/debian/patches/disable/google-api-warning.patch
+
+--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
++++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+@@ -816,8 +816,6 @@ void StartupBrowserCreatorImpl::AddInfoB
+ !command_line_.HasSwitch(switches::kTestType) &&
+ !command_line_.HasSwitch(switches::kEnableAutomation)) {
+ chrome::ShowBadFlagsPrompt(browser);
+- GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
+- browser->tab_strip_model()->GetActiveWebContents()));
+ ObsoleteSystemInfoBarDelegate::Create(InfoBarService::FromWebContents(
+ browser->tab_strip_model()->GetActiveWebContents()));
+
diff --git a/gnu/packages/patches/chromium-disable-third-party-cookies.patch b/gnu/packages/patches/chromium-disable-third-party-cookies.patch
new file mode 100644
index 0000000000..0694c35f36
--- /dev/null
+++ b/gnu/packages/patches/chromium-disable-third-party-cookies.patch
@@ -0,0 +1,13 @@
+Disable third party cookies by default.
+
+--- a/components/content_settings/core/browser/cookie_settings.cc
++++ b/components/content_settings/core/browser/cookie_settings.cc
+@@ -101,7 +101,7 @@ void CookieSettings::GetCookieSettings(
+ void CookieSettings::RegisterProfilePrefs(
+ user_prefs::PrefRegistrySyncable* registry) {
+ registry->RegisterBooleanPref(
+- prefs::kBlockThirdPartyCookies, false,
++ prefs::kBlockThirdPartyCookies, true,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ }
+
diff --git a/gnu/packages/patches/chromium-gn-bootstrap.patch b/gnu/packages/patches/chromium-gn-bootstrap.patch
new file mode 100644
index 0000000000..6d1dcb1669
--- /dev/null
+++ b/gnu/packages/patches/chromium-gn-bootstrap.patch
@@ -0,0 +1,13 @@
+description: add file needed to build gn
+author: Michael Gilbert <mgilbert@debian.org>
+
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -490,6 +490,7 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/sys_info.cc',
+ 'base/task_runner.cc',
+ 'base/task_scheduler/delayed_task_manager.cc',
++ 'base/task_scheduler/environment_config.cc',
+ 'base/task_scheduler/post_task.cc',
+ 'base/task_scheduler/priority_queue.cc',
+ 'base/task_scheduler/scheduler_lock_impl.cc',
diff --git a/gnu/packages/patches/chromium-system-icu.patch b/gnu/packages/patches/chromium-system-icu.patch
new file mode 100644
index 0000000000..c35c1b75c7
--- /dev/null
+++ b/gnu/packages/patches/chromium-system-icu.patch
@@ -0,0 +1,15 @@
+description: maintain compatibility with system icu library
+author: Michael Gilbert <mgilbert@debian.org>
+
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -657,8 +657,7 @@ group("gn_all") {
+ }
+ }
+
+- if ((is_linux && !is_chromeos && !is_chromecast) || (is_win && use_drfuzz) ||
+- (use_libfuzzer && is_mac)) {
++ if (false) {
+ deps += [
+ "//testing/libfuzzer/fuzzers",
+ "//testing/libfuzzer/tests:libfuzzer_tests",
diff --git a/gnu/packages/patches/chromium-system-libevent.patch b/gnu/packages/patches/chromium-system-libevent.patch
new file mode 100644
index 0000000000..91fc9e3b58
--- /dev/null
+++ b/gnu/packages/patches/chromium-system-libevent.patch
@@ -0,0 +1,84 @@
+description: build using system libevent
+author: Michael Gilbert <mgilbert@debian.org>
+
+https://anonscm.debian.org/cgit/pkg-chromium/pkg-chromium.git/tree/debian/patches/system/event.patch
+
+--- a/third_party/webrtc/base/task_queue_libevent.cc
++++ b/third_party/webrtc/base/task_queue_libevent.cc
+@@ -15,7 +15,7 @@
+ #include <string.h>
+ #include <unistd.h>
+
+-#include "base/third_party/libevent/event.h"
++#include <event.h>
+ #include "webrtc/base/checks.h"
+ #include "webrtc/base/logging.h"
+ #include "webrtc/base/task_queue_posix.h"
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -609,26 +609,6 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/time/time_now_posix.cc',
+ 'base/trace_event/heap_profiler_allocation_register_posix.cc',
+ ])
+- static_libraries['libevent'] = {
+- 'sources': [
+- 'base/third_party/libevent/buffer.c',
+- 'base/third_party/libevent/evbuffer.c',
+- 'base/third_party/libevent/evdns.c',
+- 'base/third_party/libevent/event.c',
+- 'base/third_party/libevent/event_tagging.c',
+- 'base/third_party/libevent/evrpc.c',
+- 'base/third_party/libevent/evutil.c',
+- 'base/third_party/libevent/http.c',
+- 'base/third_party/libevent/log.c',
+- 'base/third_party/libevent/poll.c',
+- 'base/third_party/libevent/select.c',
+- 'base/third_party/libevent/signal.c',
+- 'base/third_party/libevent/strlcpy.c',
+- ],
+- 'tool': 'cc',
+- 'include_dirs': [],
+- 'cflags': cflags + ['-DHAVE_CONFIG_H'],
+- }
+
+ if is_linux or is_aix:
+ ldflags.extend(['-pthread'])
+@@ -660,13 +640,7 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/allocator/allocator_shim.cc',
+ 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
+ ])
+- libs.extend(['-lrt', '-latomic', '-lnspr4'])
+- static_libraries['libevent']['include_dirs'].extend([
+- os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
+- ])
+- static_libraries['libevent']['sources'].extend([
+- 'base/third_party/libevent/epoll.c',
+- ])
++ libs.extend(['-lrt', '-latomic', '-lnspr4', '-levent'])
+ else:
+ libs.extend(['-lrt'])
+ static_libraries['base']['sources'].extend([
+@@ -703,12 +677,6 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/time/time_mac.cc',
+ 'base/threading/platform_thread_mac.mm',
+ ])
+- static_libraries['libevent']['include_dirs'].extend([
+- os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac')
+- ])
+- static_libraries['libevent']['sources'].extend([
+- 'base/third_party/libevent/kqueue.c',
+- ])
+
+ libs.extend([
+ '-framework', 'AppKit',
+--- a/base/message_loop/message_pump_libevent.cc
++++ b/base/message_loop/message_pump_libevent.cc
+@@ -14,7 +14,7 @@
+ #include "base/files/file_util.h"
+ #include "base/logging.h"
+ #include "base/posix/eintr_wrapper.h"
+-#include "base/third_party/libevent/event.h"
++#include <event.h>
+ #include "base/time/time.h"
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
diff --git a/gnu/packages/patches/chromium-system-libxml.patch b/gnu/packages/patches/chromium-system-libxml.patch
new file mode 100644
index 0000000000..23c42d79cb
--- /dev/null
+++ b/gnu/packages/patches/chromium-system-libxml.patch
@@ -0,0 +1,29 @@
+description: system libxml2 2.9.4 does not yet provide XML_PARSE_NOXXE
+author: Michael Gilbert <mgilbert@debian.org>
+
+Copied from:
+
+https://anonscm.debian.org/cgit/pkg-chromium/pkg-chromium.git/tree/debian/patches/system/libxml.patch
+
+--- a/third_party/libxml/chromium/libxml_utils.cc
++++ b/third_party/libxml/chromium/libxml_utils.cc
+@@ -24,8 +24,7 @@ XmlReader::~XmlReader() {
+
+ bool XmlReader::Load(const std::string& input) {
+ const int kParseOptions = XML_PARSE_RECOVER | // recover on errors
+- XML_PARSE_NONET | // forbid network access
+- XML_PARSE_NOXXE; // no external entities
++ XML_PARSE_NONET; // forbid network access
+ // TODO(evanm): Verify it's OK to pass NULL for the URL and encoding.
+ // The libxml code allows for these, but it's unclear what effect is has.
+ reader_ = xmlReaderForMemory(input.data(), static_cast<int>(input.size()),
+@@ -35,8 +34,7 @@ bool XmlReader::Load(const std::string&
+
+ bool XmlReader::LoadFile(const std::string& file_path) {
+ const int kParseOptions = XML_PARSE_RECOVER | // recover on errors
+- XML_PARSE_NONET | // forbid network access
+- XML_PARSE_NOXXE; // no external entities
++ XML_PARSE_NONET; // forbid network access
+ reader_ = xmlReaderForFile(file_path.c_str(), NULL, kParseOptions);
+ return reader_ != NULL;
+ }
diff --git a/gnu/packages/patches/chromium-system-nspr.patch b/gnu/packages/patches/chromium-system-nspr.patch
new file mode 100644
index 0000000000..5f2cca0c3b
--- /dev/null
+++ b/gnu/packages/patches/chromium-system-nspr.patch
@@ -0,0 +1,65 @@
+description: use system nspr library
+author: Michael Gilbert <mgilbert@debian.org>
+
+--- a/base/time/pr_time_unittest.cc
++++ b/base/time/pr_time_unittest.cc
+@@ -7,7 +7,7 @@
+
+ #include "base/compiler_specific.h"
+ #include "base/macros.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "base/time/time.h"
+ #include "build/build_config.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+--- a/base/time/time.cc
++++ b/base/time/time.cc
+@@ -14,7 +14,7 @@
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/strings/stringprintf.h"
+-#include "base/third_party/nspr/prtime.h"
++#include <nspr/prtime.h>
+ #include "build/build_config.h"
+
+ namespace base {
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -510,7 +510,6 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/third_party/dmg_fp/dtoa_wrapper.cc',
+ 'base/third_party/dmg_fp/g_fmt.cc',
+ 'base/third_party/icu/icu_utf.cc',
+- 'base/third_party/nspr/prtime.cc',
+ 'base/threading/non_thread_safe_impl.cc',
+ 'base/threading/post_task_and_reply_impl.cc',
+ 'base/threading/sequenced_task_runner_handle.cc',
+@@ -661,7 +660,7 @@ def write_gn_ninja(path, root_gen_dir, o
+ 'base/allocator/allocator_shim.cc',
+ 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
+ ])
+- libs.extend(['-lrt', '-latomic'])
++ libs.extend(['-lrt', '-latomic', '-lnspr4'])
+ static_libraries['libevent']['include_dirs'].extend([
+ os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
+ ])
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -58,6 +58,9 @@ config("base_flags") {
+ "-Wno-char-subscripts",
+ ]
+ }
++ ldflags = [
++ "-lnspr4",
++ ]
+ }
+
+ config("base_implementation") {
+@@ -868,8 +871,6 @@ component("base") {
+ "third_party/dmg_fp/g_fmt.cc",
+ "third_party/icu/icu_utf.cc",
+ "third_party/icu/icu_utf.h",
+- "third_party/nspr/prtime.cc",
+- "third_party/nspr/prtime.h",
+ "third_party/superfasthash/superfasthash.c",
+ "third_party/valgrind/memcheck.h",
+ "threading/non_thread_safe.h",