summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/iridium/Makefile11
-rw-r--r--www/iridium/files/patch-build_config_compiler_BUILD.gn (renamed from www/iridium/files/extra-patch-llvm-base)49
-rw-r--r--www/iridium/files/patch-build_linux_chrome.map29
-rw-r--r--www/iridium/files/patch-build_toolchain_gcc_toolchain.gni45
-rw-r--r--www/iridium/files/patch-chrome_app_chrome__main__delegate.cc38
-rw-r--r--www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.cc11
-rw-r--r--www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h18
-rw-r--r--www/iridium/files/patch-mojo_public_c_system_thunks.cc29
8 files changed, 131 insertions, 99 deletions
diff --git a/www/iridium/Makefile b/www/iridium/Makefile
index 174a62ec0166..b70a7e428dd7 100644
--- a/www/iridium/Makefile
+++ b/www/iridium/Makefile
@@ -3,7 +3,7 @@
PORTNAME= iridium
PORTVERSION= 2018.5.67
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= www
MASTER_SITES= https://downloads.iridiumbrowser.de/source/
PKGNAMESUFFIX= -browser
@@ -21,6 +21,7 @@ BUILD_DEPENDS= gperf:devel/gperf \
bash:shells/bash \
flock:sysutils/flock \
node:www/node \
+ ${LOCALBASE}/bin/ar:devel/binutils \
${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \
${LOCALBASE}/share/usbids/usb.ids:misc/usbids \
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
@@ -61,7 +62,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \
ONLY_FOR_ARCHS= amd64 i386
-USES= bison desktop-file-utils gnome jpeg localbase:ldflags ninja \
+USES= bison desktop-file-utils gl gnome jpeg localbase:ldflags ninja \
perl5 pkgconfig python:2.7,build shebangfix tar:xz
USE_GL= gl
USE_LDCONFIG= ${DATADIR}
@@ -86,6 +87,7 @@ GN_ARGS+= clang_use_chrome_plugins=false \
enable_remoting=false \
fieldtrial_testing_like_official_build=true \
is_clang=true \
+ jumbo_file_merge_limit=8 \
toolkit_views=true \
treat_warnings_as_errors=false \
use_allocator="none" \
@@ -94,6 +96,7 @@ GN_ARGS+= clang_use_chrome_plugins=false \
use_bundled_fontconfig=false \
use_custom_libcxx=false \
use_gnome_keyring=false \
+ use_jumbo_build=true \
use_gtk3=true \
use_lld=true \
use_sysroot=false \
@@ -162,8 +165,8 @@ SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio
SNDIO_VARS= GN_ARGS+=use_sndio=true
SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false
-BUILD_DEPENDS+= ${LOCALBASE}/bin/ar:devel/binutils
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-llvm-base
+# Allow relocations against read-only segments (override lld default)
+LDFLAGS_i386= -Wl,-znotext
# TODO: -isystem, would be just as ugly as this approach, but more reliably
# build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set.
diff --git a/www/iridium/files/extra-patch-llvm-base b/www/iridium/files/patch-build_config_compiler_BUILD.gn
index 434eeac7b442..7d2bcbe9d37c 100644
--- a/www/iridium/files/extra-patch-llvm-base
+++ b/www/iridium/files/patch-build_config_compiler_BUILD.gn
@@ -1,50 +1,5 @@
---- build/toolchain/gcc_toolchain.gni.orig 2018-03-20 23:05:14.000000000 +0100
-+++ build/toolchain/gcc_toolchain.gni 2018-06-18 20:55:17.080248000 +0200
-@@ -25,6 +25,11 @@
- rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
- root_build_dir) + " --mode=clang"
-
-+declare_args() {
-+ extra_cxxflags = ""
-+ extra_ldflags = ""
-+}
-+
- # This template defines a toolchain for something that works like gcc
- # (including clang).
- #
-@@ -596,13 +601,23 @@
- }
-
- gcc_toolchain(target_name) {
-- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
-- cc = "$prefix/clang"
-- cxx = "$prefix/clang++"
-- ld = cxx
-- readelf = "${toolprefix}readelf"
-- ar = "${prefix}/llvm-ar"
-- nm = "${toolprefix}nm"
-+ if (is_bsd) {
-+ prefix = "/usr/local/bin"
-+ cc = "cc"
-+ cxx = "c++"
-+ ld = cxx
-+ readelf = "readelf"
-+ ar = "${prefix}/ar"
-+ nm = "${toolprefix}nm"
-+ } else {
-+ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
-+ cc = "$prefix/clang"
-+ cxx = "$prefix/clang++"
-+ ld = cxx
-+ readelf = "${toolprefix}readelf"
-+ ar = "${prefix}/llvm-ar"
-+ nm = "${toolprefix}nm"
-+ }
-
- forward_variables_from(invoker,
- [
---- build/config/compiler/BUILD.gn.orig 2018-06-13 00:10:02.000000000 +0200
-+++ build/config/compiler/BUILD.gn 2018-07-21 13:05:54.418405000 +0200
+--- build/config/compiler/BUILD.gn.orig 2018-05-09 21:05:34.000000000 +0200
++++ build/config/compiler/BUILD.gn 2019-01-07 22:08:08.301170000 +0100
@@ -51,7 +51,7 @@
# only two architectures that are currently checked in). Turn this off when
# you are using a custom toolchain and need to control -B in cflags.
diff --git a/www/iridium/files/patch-build_linux_chrome.map b/www/iridium/files/patch-build_linux_chrome.map
new file mode 100644
index 000000000000..f7f9e4f7338e
--- /dev/null
+++ b/www/iridium/files/patch-build_linux_chrome.map
@@ -0,0 +1,29 @@
+--- build/linux/chrome.map.orig 2019-01-07 21:40:23.691384000 +0100
++++ build/linux/chrome.map 2019-01-07 21:43:11.729540000 +0100
+@@ -1,4 +1,7 @@
+ {
++local:
++ *;
++
+ global:
+ __bss_start;
+ __data_start;
+@@ -20,6 +23,10 @@
+ # Program entry point.
+ _start;
+
++ # FreeBSD specific variables.
++ __progname;
++ environ;
++
+ # Memory allocation symbols. We want chrome and any libraries to
+ # share the same heap, so it is correct to export these symbols.
+ calloc;
+@@ -81,7 +88,4 @@
+ localtime64;
+ localtime64_r;
+ localtime_r;
+-
+-local:
+- *;
+ };
diff --git a/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni b/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni
new file mode 100644
index 000000000000..c7dd9876ce9e
--- /dev/null
+++ b/www/iridium/files/patch-build_toolchain_gcc_toolchain.gni
@@ -0,0 +1,45 @@
+--- build/toolchain/gcc_toolchain.gni.orig 2018-05-09 21:05:34.000000000 +0200
++++ build/toolchain/gcc_toolchain.gni 2019-01-07 22:08:08.298662000 +0100
+@@ -25,6 +25,11 @@
+ rebase_path("//build/toolchain/clang_static_analyzer_wrapper.py",
+ root_build_dir) + " --mode=clang"
+
++declare_args() {
++ extra_cxxflags = ""
++ extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -608,13 +613,23 @@
+ }
+
+ gcc_toolchain(target_name) {
+- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+- cc = "$prefix/clang"
+- cxx = "$prefix/clang++"
+- ld = cxx
+- readelf = "${toolprefix}readelf"
+- ar = "${prefix}/llvm-ar"
+- nm = "${toolprefix}nm"
++ if (is_bsd) {
++ prefix = "/usr/local/bin"
++ cc = "cc"
++ cxx = "c++"
++ ld = cxx
++ readelf = "readelf"
++ ar = "${prefix}/ar"
++ nm = "${toolprefix}nm"
++ } else {
++ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ cc = "$prefix/clang"
++ cxx = "$prefix/clang++"
++ ld = cxx
++ readelf = "${toolprefix}readelf"
++ ar = "${prefix}/llvm-ar"
++ nm = "${toolprefix}nm"
++ }
+
+ forward_variables_from(invoker,
+ [
diff --git a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc
index e4fd91ff05ba..e8a371c6577c 100644
--- a/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc
+++ b/www/iridium/files/patch-chrome_app_chrome__main__delegate.cc
@@ -1,6 +1,6 @@
---- chrome/app/chrome_main_delegate.cc.orig 2018-02-24 16:25:09.000000000 +0100
-+++ chrome/app/chrome_main_delegate.cc 2018-03-03 20:07:40.484969000 +0100
-@@ -98,7 +98,7 @@
+--- chrome/app/chrome_main_delegate.cc.orig 2018-05-09 21:05:35.000000000 +0200
++++ chrome/app/chrome_main_delegate.cc 2019-01-07 21:51:11.921543000 +0100
+@@ -97,7 +97,7 @@
#include "chrome/app/shutdown_signal_handlers_posix.h"
#endif
@@ -9,7 +9,7 @@
#include "components/nacl/common/nacl_paths.h"
#include "components/nacl/zygote/nacl_fork_delegate_linux.h"
#endif
-@@ -133,7 +133,7 @@
+@@ -131,7 +131,7 @@
#include "v8/include/v8.h"
#endif
@@ -18,7 +18,7 @@
#include "base/environment.h"
#endif
-@@ -238,7 +238,7 @@
+@@ -236,7 +236,7 @@
#endif // defined(OS_WIN)
@@ -27,7 +27,7 @@
void AdjustLinuxOOMScore(const std::string& process_type) {
// Browsers and zygotes should still be killable, but killed last.
const int kZygoteScore = 0;
-@@ -407,7 +407,7 @@
+@@ -404,7 +404,7 @@
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
@@ -36,7 +36,7 @@
// On Linux, Chrome does not support running multiple copies under different
// DISPLAYs, so the profile directory can be specified in the environment to
// support the virtual desktop use-case.
-@@ -581,7 +581,7 @@
+@@ -576,7 +576,7 @@
#if defined(OS_CHROMEOS)
chromeos::RegisterPathProvider();
#endif
@@ -45,25 +45,7 @@
nacl::RegisterPathProvider();
#endif
-@@ -603,7 +603,7 @@
- std::string format_str =
- command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
- if (format_str == "machine") {
-- format = diagnostics::DiagnosticsWriter::MACHINE;
-+ format = diagnostics::DiagnosticsWriter::THEMACHINE;
- } else if (format_str == "log") {
- format = diagnostics::DiagnosticsWriter::LOG;
- } else {
-@@ -653,7 +653,7 @@
- std::string format_str =
- command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
- if (format_str == "machine") {
-- format = diagnostics::DiagnosticsWriter::MACHINE;
-+ format = diagnostics::DiagnosticsWriter::THEMACHINE;
- } else if (format_str == "human") {
- format = diagnostics::DiagnosticsWriter::HUMAN;
- } else {
-@@ -915,7 +915,7 @@
+@@ -893,7 +893,7 @@
InitializePDF();
#endif
@@ -72,7 +54,7 @@
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
#if defined(OS_ANDROID)
-@@ -931,7 +931,7 @@
+@@ -909,7 +909,7 @@
breakpad::InitCrashReporter(process_type);
#endif // defined(OS_ANDROID)
}
@@ -81,7 +63,7 @@
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
-@@ -941,7 +941,7 @@
+@@ -919,7 +919,7 @@
void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
// Note: If you are adding a new process type below, be sure to adjust the
// AdjustLinuxOOMScore function too.
diff --git a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.cc b/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.cc
deleted file mode 100644
index 6d9ed48a481d..000000000000
--- a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- chrome/browser/diagnostics/diagnostics_writer.cc.orig 2017-06-05 19:03:02 UTC
-+++ chrome/browser/diagnostics/diagnostics_writer.cc
-@@ -263,7 +263,7 @@ bool DiagnosticsWriter::WriteResult(bool success,
- console_->SetColor(color);
- console_->Write(base::ASCIIToUTF16(result));
- }
-- if (format_ == MACHINE) {
-+ if (format_ == THEMACHINE) {
- return WriteInfoLine(base::StringPrintf(
- "%03d %s (%s)", outcome_code, id.c_str(), extra.c_str()));
- } else {
diff --git a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h b/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
index 3958b67b58f6..33d87a032987 100644
--- a/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
+++ b/www/iridium/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
@@ -1,11 +1,11 @@
---- chrome/browser/diagnostics/diagnostics_writer.h.orig 2017-06-05 19:03:02 UTC
-+++ chrome/browser/diagnostics/diagnostics_writer.h
-@@ -19,7 +19,7 @@ class DiagnosticsWriter : public DiagnosticsModel::Obs
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig 2018-05-09 21:05:37.000000000 +0200
++++ chrome/browser/diagnostics/diagnostics_writer.h 2019-01-07 21:53:10.249123000 +0100
+@@ -15,6 +15,8 @@
+ // Console base class used internally.
+ class SimpleConsole;
+
++#undef MACHINE
++
+ class DiagnosticsWriter : public DiagnosticsModel::Observer {
public:
// The type of formatting done by this writer.
- enum FormatType {
-- MACHINE,
-+ THEMACHINE,
- LOG,
- HUMAN
- };
diff --git a/www/iridium/files/patch-mojo_public_c_system_thunks.cc b/www/iridium/files/patch-mojo_public_c_system_thunks.cc
new file mode 100644
index 000000000000..ca948070d23d
--- /dev/null
+++ b/www/iridium/files/patch-mojo_public_c_system_thunks.cc
@@ -0,0 +1,29 @@
+--- mojo/public/c/system/thunks.cc.orig 2019-01-09 11:00:07.794493000 +0100
++++ mojo/public/c/system/thunks.cc 2019-01-09 11:03:08.369317000 +0100
+@@ -14,7 +14,7 @@
+ #include "build/build_config.h"
+ #include "mojo/public/c/system/core.h"
+
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
+ #include "base/optional.h"
+@@ -38,7 +38,7 @@
+ typedef void (*MojoGetSystemThunksFunction)(MojoSystemThunks* thunks);
+
+ CoreLibraryInitializer() {
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ auto environment = base::Environment::Create();
+
+ base::FilePath library_path;
+@@ -80,7 +80,7 @@
+ ~CoreLibraryInitializer() = default;
+
+ private:
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ base::Optional<base::ScopedNativeLibrary> library_;
+ #endif
+