make iridium build with system clang as well by applying the same
patches as for chromium plus some extra due to the version differences
This commit is contained in:
parent
3a78f6911b
commit
b6792279a3
@ -1,4 +1,6 @@
|
||||
# $OpenBSD: Makefile,v 1.63 2017/07/16 19:19:03 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.64 2017/07/23 19:03:33 robert Exp $
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
USE_WXNEEDED= Yes
|
||||
|
||||
@ -12,6 +14,8 @@ DISTNAME= iridium-browser-${V}
|
||||
PKGNAME= iridium-${V}
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
||||
|
||||
REVISION= 0
|
||||
|
||||
CATEGORIES= www
|
||||
|
||||
HOMEPAGE= https://iridiumbrowser.de/
|
||||
@ -36,6 +40,10 @@ COMPILER = clang gcc
|
||||
|
||||
MODPY_RUNDEP= No
|
||||
|
||||
.if ${PROPERTIES:Mclang}
|
||||
PATCH_LIST= patch-* clang-*
|
||||
.endif
|
||||
|
||||
PATCHORIG= .orig.port
|
||||
|
||||
# uses pledge()
|
||||
|
@ -0,0 +1,13 @@
|
||||
$OpenBSD: clang-third_party_WebKit_Source_platform_BUILD_gn,v 1.1 2017/07/23 19:03:33 robert Exp $
|
||||
|
||||
Index: third_party/WebKit/Source/platform/BUILD.gn
|
||||
--- third_party/WebKit/Source/platform/BUILD.gn.orig
|
||||
+++ third_party/WebKit/Source/platform/BUILD.gn
|
||||
@@ -145,6 +145,7 @@ executable("character_data_generator") {
|
||||
"//build/win:default_exe_manifest",
|
||||
"//third_party/icu",
|
||||
]
|
||||
+ libs = [ "c++abi" ]
|
||||
}
|
||||
|
||||
# This isn't strictly necessary since we can just add the deps to "platform",
|
@ -1,6 +1,16 @@
|
||||
$OpenBSD: patch-base_BUILD_gn,v 1.3 2017/04/28 22:22:36 robert Exp $
|
||||
--- base/BUILD.gn.orig.port Wed Apr 19 21:06:28 2017
|
||||
+++ base/BUILD.gn Thu Apr 27 22:44:28 2017
|
||||
$OpenBSD: patch-base_BUILD_gn,v 1.4 2017/07/23 19:03:33 robert Exp $
|
||||
Index: base/BUILD.gn
|
||||
--- base/BUILD.gn.orig
|
||||
+++ base/BUILD.gn
|
||||
@@ -1127,7 +1127,7 @@ component("base") {
|
||||
]
|
||||
|
||||
# Needed for <atomic> if using newer C++ library than sysroot
|
||||
- if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) {
|
||||
+ if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) && !is_clang) {
|
||||
libs = [ "atomic" ]
|
||||
}
|
||||
|
||||
@@ -1508,6 +1508,27 @@ component("base") {
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
$OpenBSD: patch-build_toolchain_gcc_toolchain_gni,v 1.3 2017/04/28 22:22:36 robert Exp $
|
||||
--- build/toolchain/gcc_toolchain.gni.orig.port Wed Apr 19 21:06:28 2017
|
||||
+++ build/toolchain/gcc_toolchain.gni Thu Apr 27 19:55:58 2017
|
||||
$OpenBSD: patch-build_toolchain_gcc_toolchain_gni,v 1.4 2017/07/23 19:03:33 robert Exp $
|
||||
Index: build/toolchain/gcc_toolchain.gni
|
||||
--- build/toolchain/gcc_toolchain.gni.orig
|
||||
+++ build/toolchain/gcc_toolchain.gni
|
||||
@@ -12,6 +12,11 @@ import("//build/toolchain/clang_static_analyzer.gni")
|
||||
import("//build/toolchain/goma.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
@ -13,21 +14,35 @@ $OpenBSD: patch-build_toolchain_gcc_toolchain_gni,v 1.3 2017/04/28 22:22:36 robe
|
||||
# This template defines a toolchain for something that works like gcc
|
||||
# (including clang).
|
||||
#
|
||||
@@ -280,7 +285,7 @@ template("gcc_toolchain") {
|
||||
# POSIX-like toolchains such as NaCl on Windows).
|
||||
ar_wrapper =
|
||||
rebase_path("//build/toolchain/gcc_ar_wrapper.py", root_build_dir)
|
||||
- command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} rcsD @\"$rspfile\""
|
||||
+ command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" {{arflags}} rcs @\"$rspfile\""
|
||||
description = "AR {{output}}"
|
||||
rspfile_content = "{{inputs}}"
|
||||
outputs = [
|
||||
@@ -483,7 +488,7 @@ template("clang_toolchain") {
|
||||
}
|
||||
|
||||
@@ -476,16 +481,9 @@ template("gcc_toolchain") {
|
||||
# actually just be doing a native compile. The invoker can optionally override
|
||||
# use_gold too.
|
||||
template("clang_toolchain") {
|
||||
- if (defined(invoker.toolprefix)) {
|
||||
- toolprefix = invoker.toolprefix
|
||||
- } else {
|
||||
- toolprefix = ""
|
||||
- }
|
||||
-
|
||||
gcc_toolchain(target_name) {
|
||||
- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
||||
+ prefix = "/usr/local/bin"
|
||||
cc = "$prefix/clang"
|
||||
cxx = "$prefix/clang++"
|
||||
- cc = "$prefix/clang"
|
||||
- cxx = "$prefix/clang++"
|
||||
+ cc = "cc"
|
||||
+ cxx = "c++"
|
||||
ld = cxx
|
||||
|
||||
if (use_clang_static_analyzer) {
|
||||
@@ -507,9 +505,9 @@ template("clang_toolchain") {
|
||||
root_build_dir)
|
||||
}
|
||||
|
||||
- readelf = "${toolprefix}readelf"
|
||||
- ar = "${toolprefix}ar"
|
||||
- nm = "${toolprefix}nm"
|
||||
+ readelf = "readelf"
|
||||
+ ar = "ar"
|
||||
+ nm = "nm"
|
||||
|
||||
forward_variables_from(invoker, [ "strip" ])
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-third_party_libjingle_xmpp_task_runner_taskrunner_cc,v 1.1 2017/07/23 19:03:33 robert Exp $
|
||||
|
||||
Index: third_party/libjingle_xmpp/task_runner/taskrunner.cc
|
||||
--- third_party/libjingle_xmpp/task_runner/taskrunner.cc.orig
|
||||
+++ third_party/libjingle_xmpp/task_runner/taskrunner.cc
|
||||
@@ -95,7 +95,7 @@ void TaskRunner::InternalRunTasks(bool in_destructor)
|
||||
std::vector<Task *>::iterator it;
|
||||
it = std::remove(tasks_.begin(),
|
||||
tasks_.end(),
|
||||
- reinterpret_cast<Task *>(NULL));
|
||||
+ nullptr);
|
||||
|
||||
tasks_.erase(it, tasks_.end());
|
||||
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-third_party_pdfium_third_party_base_logging_h,v 1.1 2017/07/23 19:03:33 robert Exp $
|
||||
|
||||
Index: third_party/pdfium/third_party/base/logging.h
|
||||
--- third_party/pdfium/third_party/base/logging.h.orig
|
||||
+++ third_party/pdfium/third_party/base/logging.h
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
#define NULL_DEREF_IF_POSSIBLE \
|
||||
- *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42;
|
||||
+ *(static_cast<volatile char*>(nullptr) + 42) = 0x42;
|
||||
#else
|
||||
#define NULL_DEREF_IF_POSSIBLE
|
||||
#endif
|
@ -0,0 +1,50 @@
|
||||
$OpenBSD: patch-third_party_sfntly_src_cpp_src_sfntly_table_core_cmap_table_cc,v 1.1 2017/07/23 19:03:33 robert Exp $
|
||||
|
||||
Index: third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc
|
||||
--- third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc.orig
|
||||
+++ third_party/sfntly/src/cpp/src/sfntly/table/core/cmap_table.cc
|
||||
@@ -439,7 +439,7 @@ CMapTable::CMapFormat0::Builder::Builder(
|
||||
}
|
||||
|
||||
CMapTable::CMapFormat0::Builder::Builder(const CMapId& cmap_id)
|
||||
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
|
||||
+ : CMap::Builder(static_cast<ReadableFontData*>(nullptr),
|
||||
CMapFormat::kFormat0,
|
||||
cmap_id) {
|
||||
}
|
||||
@@ -563,7 +563,7 @@ CMapTable::CMapFormat2::Builder::Builder(WritableFontD
|
||||
: CMapTable::CMap::Builder(data ? down_cast<WritableFontData*>(
|
||||
data->Slice(offset, data->ReadUShort(
|
||||
offset + Offset::kFormat0Length)))
|
||||
- : reinterpret_cast<WritableFontData*>(NULL),
|
||||
+ : static_cast<WritableFontData*>(nullptr),
|
||||
CMapFormat::kFormat2, cmap_id) {
|
||||
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
|
||||
}
|
||||
@@ -574,7 +574,7 @@ CMapTable::CMapFormat2::Builder::Builder(ReadableFontD
|
||||
: CMapTable::CMap::Builder(data ? down_cast<ReadableFontData*>(
|
||||
data->Slice(offset, data->ReadUShort(
|
||||
offset + Offset::kFormat0Length)))
|
||||
- : reinterpret_cast<ReadableFontData*>(NULL),
|
||||
+ : static_cast<ReadableFontData*>(nullptr),
|
||||
CMapFormat::kFormat2, cmap_id) {
|
||||
// TODO(arthurhsu): FIXIT: heavy lifting and leak, need fix.
|
||||
}
|
||||
@@ -958,7 +958,7 @@ CMapTable::CMapFormat4::Builder::Builder(WritableFontD
|
||||
CMapTable::CMapFormat4::Builder::Builder(SegmentList* segments,
|
||||
IntegerList* glyph_id_array,
|
||||
const CMapId& cmap_id)
|
||||
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
|
||||
+ : CMap::Builder(static_cast<ReadableFontData*>(nullptr),
|
||||
CMapFormat::kFormat4, cmap_id),
|
||||
segments_(segments->begin(), segments->end()),
|
||||
glyph_id_array_(glyph_id_array->begin(), glyph_id_array->end()) {
|
||||
@@ -966,7 +966,7 @@ CMapTable::CMapFormat4::Builder::Builder(SegmentList*
|
||||
}
|
||||
|
||||
CMapTable::CMapFormat4::Builder::Builder(const CMapId& cmap_id)
|
||||
- : CMap::Builder(reinterpret_cast<ReadableFontData*>(NULL),
|
||||
+ : CMap::Builder(static_cast<ReadableFontData*>(nullptr),
|
||||
CMapFormat::kFormat4, cmap_id) {
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
$OpenBSD: patch-tools_gn_bootstrap_bootstrap_py,v 1.3 2017/04/28 22:22:36 robert Exp $
|
||||
--- tools/gn/bootstrap/bootstrap.py.orig.port Mon Apr 24 16:40:24 2017
|
||||
+++ tools/gn/bootstrap/bootstrap.py Fri Apr 28 19:05:25 2017
|
||||
$OpenBSD: patch-tools_gn_bootstrap_bootstrap_py,v 1.4 2017/07/23 19:03:33 robert Exp $
|
||||
Index: tools/gn/bootstrap/bootstrap.py
|
||||
--- tools/gn/bootstrap/bootstrap.py.orig
|
||||
+++ tools/gn/bootstrap/bootstrap.py
|
||||
@@ -32,7 +32,8 @@ SRC_ROOT = os.path.dirname(os.path.dirname(GN_ROOT))
|
||||
is_win = sys.platform.startswith('win')
|
||||
is_linux = sys.platform.startswith('linux')
|
||||
@ -18,7 +19,7 @@ $OpenBSD: patch-tools_gn_bootstrap_bootstrap_py,v 1.3 2017/04/28 22:22:36 robert
|
||||
+
|
||||
+
|
||||
+ if is_openbsd:
|
||||
+ ldflags.extend(['-lpthread', '-lexecinfo'])
|
||||
+ ldflags.extend(['-L/usr/local/lib', '-lpthread', '-lexecinfo'])
|
||||
+ include_dirs += ["/usr/local/include"]
|
||||
+
|
||||
+ static_libraries['xdg_user_dirs'] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user