Merge pull request #334 from tectiv3/develop

Fix macOS patches
This commit is contained in:
Eloston
2018-02-25 23:42:17 -06:00
committed by GitHub
6 changed files with 51 additions and 15 deletions
+1
View File
@@ -185,6 +185,7 @@ The buildspace tree can be relocated to another system for building if necessary
```
cd buildspace/tree
chmod +x ungoogled_packaging/build.sh
./ungoogled_packaging/build.sh
```
@@ -1,5 +1,6 @@
ungoogled-chromium/macos/disable-symbol-order-verification.patch
ungoogled-chromium/macos/add-trknotify-gn-dependency.patch
ungoogled-chromium/macos/fix-widevine-macos.patch
ungoogled-chromium/macos/fix-gn-bootstrap.patch
ungoogled-chromium/macos/fix-gn-safe_browsing.patch
ungoogled-chromium/macos/fix-mapped_file.patch
ungoogled-chromium/macos/fix-visibility.patch
@@ -2,7 +2,7 @@
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -708,6 +708,10 @@
@@ -708,6 +708,11 @@
'base/sys_info_mac.mm',
'base/time/time_mac.cc',
'base/threading/platform_thread_mac.mm',
@@ -10,6 +10,7 @@
+ 'base/mac/mac_util.mm',
+ 'base/mac/scoped_nsobject.mm',
+ 'base/mac/mac_logging.mm',
+ 'base/time/time_exploded_posix.cc',
])
static_libraries['libevent']['include_dirs'].extend([
os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac')
@@ -0,0 +1,13 @@
# Fix compiling on macOS 10.11
--- a/base/files/memory_mapped_file_posix.cc
+++ b/base/files/memory_mapped_file_posix.cc
@@ -116,7 +116,7 @@
// available via fcntl.
// See also: https://openradar.8pp2p8t.qjz9zk/32720223
fstore_t params = {F_ALLOCATEALL, F_PEOFPOSMODE, region.offset,
- region.size, 0};
+ (off_t)region.size, 0};
if (fcntl(file_.GetPlatformFile(), F_PREALLOCATE, &params) != 0) {
DPLOG(ERROR) << "F_PREALLOCATE";
// This can fail because the filesystem doesn't support it so don't
@@ -0,0 +1,33 @@
# Fix compiling on macOS
--- a/tools/gn/visibility.h
+++ b/tools/gn/visibility.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/values.h"
#include "tools/gn/label_pattern.h"
#include "tools/gn/source_dir.h"
@@ -49,7 +50,7 @@
std::string Describe(int indent, bool include_brackets) const;
// Returns value representation of this visibility
- std::unique_ptr<base::Value> AsValue() const;
+ std::unique_ptr<base::ListValue> AsValue() const;
// Helper function to check visibility between the given two items. If
// to is invisible to from, returns false and sets the error.
--- a/tools/gn/visibility.cc
+++ b/tools/gn/visibility.cc
@@ -84,7 +84,7 @@
return result;
}
-std::unique_ptr<base::Value> Visibility::AsValue() const {
+std::unique_ptr<base::ListValue> Visibility::AsValue() const {
auto res = std::make_unique<base::ListValue>();
for (const auto& pattern : patterns_)
res->AppendString(pattern.Describe());
@@ -1,13 +0,0 @@
# Fix WidevineCDM compiling on macOS
--- a/third_party/widevine/cdm/BUILD.gn
+++ b/third_party/widevine/cdm/BUILD.gn
@@ -110,7 +110,7 @@ if (widevine_cdm_binary_files != []) {
"//build/config:exe_and_shlib_deps",
]
- if (is_mac) {
+ if (false) {
ldflags = [
# Not to strip important symbols by -Wl,-dead_strip.
"-Wl,-exported_symbol,_PPP_GetInterface",