gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / ungoogled-chromium-system-nspr.patch
CommitLineData
c91c132f
MB
1Build with the system nspr library.
2
3Originally based on a Debian patch:
4https://salsa.debian.org/chromium-team/chromium/-/blob/master/debian/patches/system/nspr.patch
5
6--- a/base/time/pr_time_unittest.cc
7+++ b/base/time/pr_time_unittest.cc
8@@ -7,7 +7,7 @@
9
10 #include "base/compiler_specific.h"
11 #include "base/stl_util.h"
12-#include "base/third_party/nspr/prtime.h"
13+#include <nspr/prtime.h>
14 #include "base/time/time.h"
15 #include "build/build_config.h"
16 #include "testing/gtest/include/gtest/gtest.h"
17--- a/base/time/time.cc
18+++ b/base/time/time.cc
19@@ -14,7 +14,7 @@
689d8845
MB
20 #include "base/optional.h"
21 #include "base/strings/string_util.h"
c91c132f
MB
22 #include "base/strings/stringprintf.h"
23-#include "base/third_party/nspr/prtime.h"
24+#include <nspr/prtime.h>
25 #include "base/time/time_override.h"
26 #include "build/build_config.h"
27
28--- a/base/BUILD.gn
29+++ b/base/BUILD.gn
689d8845 30@@ -102,6 +102,9 @@
c91c132f
MB
31 "-Wglobal-constructors",
32 ]
33 }
34+ ldflags = [
35+ "-lnspr4",
36+ ]
37 }
38
39 config("base_implementation") {
689d8845 40@@ -720,8 +723,6 @@
c91c132f
MB
41 "third_party/cityhash_v103/src/city_v103.h",
42 "third_party/icu/icu_utf.cc",
43 "third_party/icu/icu_utf.h",
44- "third_party/nspr/prtime.cc",
45- "third_party/nspr/prtime.h",
46 "third_party/superfasthash/superfasthash.c",
47 "thread_annotations.h",
48 "threading/hang_watcher.cc",
49--- a/tools/gn/build/gen.py
50+++ b/tools/gn/build/gen.py
689d8845 51@@ -380,6 +380,9 @@
c91c132f
MB
52 if not options.no_static_libstdcpp:
53 ldflags.append('-static-libstdc++')
54
55+ # Additional system libraries that are used.
56+ libs.append('-lnspr4')
57+
689d8845
MB
58 if platform.is_mingw() or platform.is_msys():
59 cflags.remove('-std=c++17')
60 cflags.extend([
c91c132f
MB
61--- a/third_party/blink/renderer/platform/BUILD.gn
62+++ b/third_party/blink/renderer/platform/BUILD.gn
689d8845 63@@ -110,6 +110,9 @@
c91c132f
MB
64 "//build/win:default_exe_manifest",
65 "//third_party/icu",
66 ]
67+ ldflags = [
68+ "-lnspr4"
69+ ]
70 }
71
72 # This isn't strictly necessary since we can just add the deps to "platform",
73--- a/third_party/crashpad/crashpad/handler/BUILD.gn
74+++ b/third_party/crashpad/crashpad/handler/BUILD.gn
689d8845 75@@ -144,6 +144,9 @@
c91c132f
MB
76 "../third_party/mini_chromium:base",
77 "../tools:tool_support",
78 ]
79+ ldflags = [
80+ "-lnspr4"
81+ ]
82
83 if (crashpad_is_win) {
84 if (crashpad_is_in_chromium || crashpad_is_in_dart) {
85--- a/chrome/common/search/BUILD.gn
86+++ b/chrome/common/search/BUILD.gn
87@@ -20,6 +20,9 @@
88 "//chrome/common/themes:autogenerated_theme_util",
89 "//skia",
90 ]
91+ ldflags = [
92+ "-lnspr4"
93+ ]
94 }
95
96 compiled_action("generate_chrome_colors_info") {
97--- a/components/url_formatter/spoof_checks/top_domains/BUILD.gn
98+++ b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
99@@ -31,6 +31,9 @@
100 "//net/tools/huffman_trie:huffman_trie_generator_sources",
101 "//url:url",
102 ]
103+ ldflags = [
104+ "-lnspr4",
105+ ]
106 if (is_ios) {
689d8845 107 frameworks = [ "UIKit.framework" ]
c91c132f
MB
108 }
109--- a/components/schema_org/BUILD.gn
110+++ b/components/schema_org/BUILD.gn
111@@ -33,6 +33,9 @@
112 "//base",
113 "//url",
114 ]
115+ ldflags = [
116+ "-lnspr4",
117+ ]
118 }
119
120 compiled_action("schema_org_name_data") {