diff --git a/resources/config_bundles/common/patch_order.list b/resources/config_bundles/common/patch_order.list index 0908b683..a0170b91 100644 --- a/resources/config_bundles/common/patch_order.list +++ b/resources/config_bundles/common/patch_order.list @@ -29,7 +29,6 @@ inox-patchset/9000-disable-metrics.patch debian/gn/libcxx.patch debian/gn/parallel.patch debian/gn/narrowing.patch -debian/disable/fonts.patch debian/disable/fuzzers.patch debian/disable/welcome-page.patch debian/disable/google-api-warning.patch @@ -37,16 +36,18 @@ debian/disable/device-notifications.patch debian/fixes/mojo.patch debian/fixes/optimize.patch debian/fixes/ps-print.patch +debian/fixes/namespace.patch debian/fixes/inspector.patch debian/fixes/gpu-timeout.patch -debian/fixes/incomplete-types.patch debian/fixes/ambiguous-aliases.patch -debian/fixes/widevine-revision.patch debian/fixes/connection-message.patch debian/fixes/chromedriver-revision.patch debian/fixes/skia_buildfix.patch +debian/warnings/multichar.patch debian/warnings/sequence-point.patch debian/warnings/initialization.patch +debian/warnings/null-destination.patch +debian/warnings/misleading-indentation.patch iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch diff --git a/resources/config_bundles/debian_buster/patch_order.list b/resources/config_bundles/debian_buster/patch_order.list index 9bdfeca9..b5c8fc59 100644 --- a/resources/config_bundles/debian_buster/patch_order.list +++ b/resources/config_bundles/debian_buster/patch_order.list @@ -1,5 +1,8 @@ +debian/disable/openh264.patch + +debian/system/ffmpeg.patch debian/system/openjpeg.patch -debian/master-preferences.patch +debian/debianization/master-preferences.patch debian/system/lcms2.patch ungoogled-chromium/linux/manpage.patch diff --git a/resources/config_bundles/debian_stretch/patch_order.list b/resources/config_bundles/debian_stretch/patch_order.list index d28b63a0..3109e4ec 100644 --- a/resources/config_bundles/debian_stretch/patch_order.list +++ b/resources/config_bundles/debian_stretch/patch_order.list @@ -1,9 +1,11 @@ +debian/disable/openh264.patch + debian_stretch/system/vpx.patch debian_stretch/system/ffmpeg.patch opensuse/system-libdrm.patch -debian/master-preferences.patch +debian/debianization/master-preferences.patch ungoogled-chromium/linux/manpage.patch ungoogled-chromium/linux/fix-libstdcxx-errors.patch diff --git a/resources/config_bundles/linux_rooted/gn_flags.map b/resources/config_bundles/linux_rooted/gn_flags.map index f4cdfd59..a5f529e4 100644 --- a/resources/config_bundles/linux_rooted/gn_flags.map +++ b/resources/config_bundles/linux_rooted/gn_flags.map @@ -9,6 +9,7 @@ optimize_for_size=false use_allocator="none" use_cups=true use_custom_libcxx=false +use_gio=true use_gold=true use_gtk3=true use_kerberos=false diff --git a/resources/config_bundles/linux_rooted/patch_order.list b/resources/config_bundles/linux_rooted/patch_order.list index fc0582cc..bf18be03 100644 --- a/resources/config_bundles/linux_rooted/patch_order.list +++ b/resources/config_bundles/linux_rooted/patch_order.list @@ -1,7 +1,9 @@ inox-patchset/chromium-vaapi-r18.patch debian/system/icu.patch +debian/system/jpeg.patch debian/system/nspr.patch debian/system/event.patch +debian/system/fontconfig.patch ungoogled-chromium/linux/use-system-libraries-in-official-build.patch diff --git a/resources/packaging/debian/buster/clean b/resources/packaging/debian/buster/clean index 8ee6f29d..a6421342 100644 --- a/resources/packaging/debian/buster/clean +++ b/resources/packaging/debian/buster/clean @@ -3,24 +3,26 @@ debian/files Makefile third_party/flot/*.js -third_party/ffmpeg/BUILD.gn -third_party/flac/BUILD.gn base/third_party/libevent/BUILD.gn build/secondary/third_party/libjpeg_turbo/BUILD.gn + +third_party/re2/BUILD.gn +third_party/icu/BUILD.gn +third_party/flac/BUILD.gn +third_party/zlib/BUILD.gn +third_party/opus/BUILD.gn +third_party/snappy/BUILD.gn +third_party/ffmpeg/BUILD.gn +third_party/libxml/BUILD.gn third_party/libdrm/BUILD.gn third_party/libpng/BUILD.gn third_party/libvpx/BUILD.gn third_party/libwebp/BUILD.gn -third_party/libxml/BUILD.gn +third_party/libjpeg/BUILD.gn third_party/libxslt/BUILD.gn -third_party/re2/BUILD.gn -third_party/snappy/BUILD.gn -third_party/yasm/yasm_assemble.gni -third_party/zlib/BUILD.gn -third_party/icu/BUILD.gn -third_party/opus/BUILD.gn third_party/freetype/BUILD.gn -tihrd_party/fontconfig/BUILD.gn +third_party/fontconfig/BUILD.gn third_party/harfbuzz-ng/harfbuzz.gni +third_party/yasm/yasm_assemble.gni build/config/freetype/freetype.gni diff --git a/resources/packaging/debian/buster/control b/resources/packaging/debian/buster/control index deb660ca..4eec6003 100644 --- a/resources/packaging/debian/buster/control +++ b/resources/packaging/debian/buster/control @@ -7,7 +7,7 @@ Uploaders: Vcs-Git: https://github.com/Eloston/ungoogled-chromium.git Vcs-Browser: https://github.com/Eloston/ungoogled-chromium Homepage: https://github.com/Eloston/ungoogled-chromium -Rules-Requires-Root: binary-targets +Rules-Requires-Root: no Build-Depends: debhelper (>= 11), clang-6.0, @@ -103,7 +103,6 @@ Suggests: ungoogled-chromium-l10n, ungoogled-chromium-shell, ungoogled-chromium-driver, - ungoogled-chromium-widevine, Provides: www-browser, gnome-www-browser, @@ -160,23 +159,6 @@ Description: web browser - minimal shell This package provides a minimal version of the chromium user interface (the content shell). -Package: ungoogled-chromium-widevine -Section: contrib/web -Architecture: i386 amd64 arm64 armhf -Depends: - ${misc:Depends}, - ${shlibs:Depends}, - ungoogled-chromium (= ${binary:Version}), -Replaces: - chromium-widevine, -Breaks: - chromium-widevine, -Description: web browser - widevine content decryption support - Web browser that aims to build a safer, faster, and more stable internet - browsing experience. - . - This package provides support for the widevine content decryption module. - Package: ungoogled-chromium-driver Architecture: i386 amd64 arm64 armhf Depends: diff --git a/resources/packaging/debian/buster/rules.in b/resources/packaging/debian/buster/rules.in index 87b815b2..d2be7b82 100755 --- a/resources/packaging/debian/buster/rules.in +++ b/resources/packaging/debian/buster/rules.in @@ -6,6 +6,9 @@ export DH_VERBOSE=1 # enable all build hardening flags export DEB_BUILD_MAINT_OPTIONS=hardening=+all +# indicate that binary targets do not require root +export DEB_RULES_REQUIRES_ROOT=no + # use system LLVM via unbundling export AR=llvm-ar-6.0 export NM=llvm-nm-6.0 @@ -32,9 +35,7 @@ ifeq (arm64,$(DEB_HOST_ARCH)) defines+=host_cpu=\"arm64\" endif ifeq (armhf,$(DEB_HOST_ARCH)) -defines+=host_cpu=\"arm\" \ - arm_use_neon=false \ - +defines+=host_cpu=\"arm\" arm_use_neon=false endif # auto-inserted gn flags diff --git a/resources/packaging/debian/buster/scripts/unbundle b/resources/packaging/debian/buster/scripts/unbundle index 4a39159c..36826eac 100755 --- a/resources/packaging/debian/buster/scripts/unbundle +++ b/resources/packaging/debian/buster/scripts/unbundle @@ -23,7 +23,7 @@ def strip(path): else: os.remove(removal) -keepers = ('openh264') +keepers = ('openh264', 'libjpeg') # strip out regenerating files in each build def remove_file(path): @@ -40,6 +40,7 @@ for lib,rule in replace_gn_files.REPLACEMENTS.items(): strip(os.path.dirname(rule)) # remove the gn file that builds the embedded library if os.path.lexists(rule): + print('removing: %s'%rule) os.remove(rule) # create a symlink to the unbundle gn file symlink = "ln -s " diff --git a/resources/packaging/debian/buster/ungoogled-chromium-widevine.install.in b/resources/packaging/debian/buster/ungoogled-chromium-widevine.install.in deleted file mode 100644 index 0c3ab707..00000000 --- a/resources/packaging/debian/buster/ungoogled-chromium-widevine.install.in +++ /dev/null @@ -1 +0,0 @@ -$ungoog{build_output}/libwidevinecdmadapter.so usr/lib/chromium diff --git a/resources/packaging/debian/stretch/clean b/resources/packaging/debian/stretch/clean index fd0ef676..e76edc2d 100644 --- a/resources/packaging/debian/stretch/clean +++ b/resources/packaging/debian/stretch/clean @@ -3,18 +3,24 @@ debian/files Makefile third_party/flot/*.js -third_party/ffmpeg/BUILD.gn -third_party/flac/BUILD.gn base/third_party/libevent/BUILD.gn build/secondary/third_party/libjpeg_turbo/BUILD.gn -third_party/libpng/BUILD.gn -third_party/libwebp/BUILD.gn -third_party/libxml/BUILD.gn -third_party/libxslt/BUILD.gn + third_party/re2/BUILD.gn -third_party/snappy/BUILD.gn -third_party/yasm/yasm_assemble.gni -third_party/zlib/BUILD.gn third_party/icu/BUILD.gn +third_party/flac/BUILD.gn +third_party/zlib/BUILD.gn third_party/opus/BUILD.gn +third_party/snappy/BUILD.gn +third_party/ffmpeg/BUILD.gn +third_party/libxml/BUILD.gn +third_party/libdrm/BUILD.gn +third_party/libpng/BUILD.gn +third_party/libvpx/BUILD.gn +third_party/libwebp/BUILD.gn +third_party/libjpeg/BUILD.gn +third_party/libxslt/BUILD.gn third_party/freetype/BUILD.gn +third_party/fontconfig/BUILD.gn +third_party/harfbuzz-ng/harfbuzz.gni +third_party/yasm/yasm_assemble.gni diff --git a/resources/packaging/debian/stretch/control b/resources/packaging/debian/stretch/control index 53c32be3..7640496a 100644 --- a/resources/packaging/debian/stretch/control +++ b/resources/packaging/debian/stretch/control @@ -7,7 +7,7 @@ Uploaders: Vcs-Git: https://github.com/Eloston/ungoogled-chromium.git Vcs-Browser: https://github.com/Eloston/ungoogled-chromium Homepage: https://github.com/Eloston/ungoogled-chromium -Rules-Requires-Root: binary-targets +Rules-Requires-Root: no Build-Depends: debhelper (>= 11), clang-6.0, @@ -102,7 +102,6 @@ Suggests: ungoogled-chromium-l10n, ungoogled-chromium-shell, ungoogled-chromium-driver, - ungoogled-chromium-widevine, Provides: www-browser, gnome-www-browser, @@ -159,23 +158,6 @@ Description: web browser - minimal shell This package provides a minimal version of the chromium user interface (the content shell). -Package: ungoogled-chromium-widevine -Section: contrib/web -Architecture: i386 amd64 arm64 armhf -Depends: - ${misc:Depends}, - ${shlibs:Depends}, - ungoogled-chromium (= ${binary:Version}), -Replaces: - chromium-widevine, -Breaks: - chromium-widevine, -Description: web browser - widevine content decryption support - Web browser that aims to build a safer, faster, and more stable internet - browsing experience. - . - This package provides support for the widevine content decryption module. - Package: ungoogled-chromium-driver Architecture: i386 amd64 arm64 armhf Depends: diff --git a/resources/packaging/debian/stretch/scripts/unbundle b/resources/packaging/debian/stretch/scripts/unbundle index 4f96ea75..3c21ad4f 100755 --- a/resources/packaging/debian/stretch/scripts/unbundle +++ b/resources/packaging/debian/stretch/scripts/unbundle @@ -23,7 +23,7 @@ def strip(path): else: os.remove(removal) -keepers = ('openh264','harfbuzz-ng') +keepers = ('openh264', 'libjpeg', 'harfbuzz-ng') # strip out regenerating files in each build def remove_file(path): @@ -40,6 +40,7 @@ for lib,rule in replace_gn_files.REPLACEMENTS.items(): strip(os.path.dirname(rule)) # remove the gn file that builds the embedded library if os.path.lexists(rule): + print('removing: %s'%rule) os.remove(rule) # create a symlink to the unbundle gn file symlink = "ln -s " diff --git a/resources/patches/debian/master-preferences.patch b/resources/patches/debian/debianization/master-preferences.patch similarity index 100% rename from resources/patches/debian/master-preferences.patch rename to resources/patches/debian/debianization/master-preferences.patch diff --git a/resources/patches/debian/disable/fonts.patch b/resources/patches/debian/disable/fonts.patch deleted file mode 100644 index 3d198662..00000000 --- a/resources/patches/debian/disable/fonts.patch +++ /dev/null @@ -1,14 +0,0 @@ -description: content_shell_fonts depends on prebuilt ttf files -author: Michael Gilbert - ---- a/content/shell/test_runner/BUILD.gn -+++ b/content/shell/test_runner/BUILD.gn -@@ -203,7 +203,7 @@ group("resources") { - deps += [ ":copy_android_fonts_config" ] - data_deps += [ ":copy_android_fonts_config" ] - } -- if (is_android || is_linux || is_fuchsia) { -+ if (false) { - deps += [ "//third_party/test_fonts" ] - data_deps += [ "//third_party/test_fonts" ] - } diff --git a/resources/patches/debian/disable/openh264.patch b/resources/patches/debian/disable/openh264.patch new file mode 100644 index 00000000..f3cb3120 --- /dev/null +++ b/resources/patches/debian/disable/openh264.patch @@ -0,0 +1,11 @@ +--- a/third_party/webrtc/webrtc.gni ++++ b/third_party/webrtc/webrtc.gni +@@ -121,7 +121,7 @@ declare_args() { + # also: |rtc_initialize_ffmpeg|. + # CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING. + # http://www.openh264.org, https://www.ffmpeg.org/ +- rtc_use_h264 = proprietary_codecs && !is_android && !is_ios ++ rtc_use_h264 = false + + # By default, use normal platform audio support or dummy audio, but don't + # use file-based audio playout and record. diff --git a/resources/patches/debian/disable/welcome-page.patch b/resources/patches/debian/disable/welcome-page.patch index fa261a4a..839afd44 100644 --- a/resources/patches/debian/disable/welcome-page.patch +++ b/resources/patches/debian/disable/welcome-page.patch @@ -4,7 +4,7 @@ bug-debian: http://bugs.debian.org/857767 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc -@@ -1048,7 +1048,7 @@ void ProfileManager::InitProfileUserPref +@@ -1061,7 +1061,7 @@ void ProfileManager::InitProfileUserPref profile->GetPrefs()->SetString(prefs::kSupervisedUserId, supervised_user_id); } diff --git a/resources/patches/debian/fixes/ambiguous-aliases.patch b/resources/patches/debian/fixes/ambiguous-aliases.patch index 9efb89fa..c7a8a836 100644 --- a/resources/patches/debian/fixes/ambiguous-aliases.patch +++ b/resources/patches/debian/fixes/ambiguous-aliases.patch @@ -3,23 +3,20 @@ author: Michael Gilbert --- a/extensions/common/manifest_handlers/permissions_parser.cc +++ b/extensions/common/manifest_handlers/permissions_parser.cc -@@ -27,13 +27,13 @@ +@@ -26,10 +26,10 @@ #include "extensions/common/url_pattern_set.h" #include "url/url_constants.h" +-namespace extensions { +namespace keys = extensions::manifest_keys; +namespace errors = extensions::manifest_errors; -+ - namespace extensions { - - namespace { -namespace keys = manifest_keys; -namespace errors = manifest_errors; -- - struct ManifestPermissions : public Extension::ManifestData { - ManifestPermissions(std::unique_ptr permissions); - ~ManifestPermissions() override; ++namespace extensions { + + namespace { + --- a/extensions/common/manifest_handlers/requirements_info.cc +++ b/extensions/common/manifest_handlers/requirements_info.cc @@ -12,10 +12,10 @@ @@ -38,23 +35,20 @@ author: Michael Gilbert : webgl(false), window_shape(false) {} --- a/extensions/common/manifest_handlers/sandboxed_page_info.cc +++ b/extensions/common/manifest_handlers/sandboxed_page_info.cc -@@ -17,13 +17,13 @@ +@@ -17,10 +17,10 @@ #include "extensions/common/manifest_constants.h" #include "extensions/common/url_pattern.h" -+namespace keys = extensions::manifest_keys; +-namespace extensions { +- + namespace keys = extensions::manifest_keys; +-namespace errors = manifest_errors; +namespace errors = extensions::manifest_errors; + - namespace extensions { ++namespace extensions { namespace { --namespace keys = extensions::manifest_keys; --namespace errors = manifest_errors; -- - const char kDefaultSandboxedPageContentSecurityPolicy[] = - "sandbox allow-scripts allow-forms allow-popups allow-modals; " - "script-src 'self' 'unsafe-inline' 'unsafe-eval'; child-src 'self';"; --- a/extensions/common/manifest_handlers/shared_module_info.cc +++ b/extensions/common/manifest_handlers/shared_module_info.cc @@ -22,11 +22,11 @@ diff --git a/resources/patches/debian/fixes/incomplete-types.patch b/resources/patches/debian/fixes/incomplete-types.patch deleted file mode 100644 index 98325d9d..00000000 --- a/resources/patches/debian/fixes/incomplete-types.patch +++ /dev/null @@ -1,17 +0,0 @@ -description: gcc requires complete definition when types are used in unique_ptr -author: Michael Gilbert - ---- a/components/policy/core/browser/browser_policy_connector_base.h -+++ b/components/policy/core/browser/browser_policy_connector_base.h -@@ -14,10 +14,10 @@ - #include "components/policy/core/common/schema.h" - #include "components/policy/core/common/schema_registry.h" - #include "components/policy/policy_export.h" -+#include "components/policy/core/common/configuration_policy_provider.h" - - namespace policy { - --class ConfigurationPolicyProvider; - class PolicyService; - class PolicyServiceImpl; - diff --git a/resources/patches/debian/fixes/namespace.patch b/resources/patches/debian/fixes/namespace.patch new file mode 100644 index 00000000..1d5f9b58 --- /dev/null +++ b/resources/patches/debian/fixes/namespace.patch @@ -0,0 +1,21 @@ +description: gcc 6 isn't able to correctly deduce the namespace +author: Michael Gilbert + +--- a/third_party/blink/renderer/platform/graphics/path.h ++++ b/third_party/blink/renderer/platform/graphics/path.h +@@ -199,13 +199,13 @@ class PLATFORM_EXPORT Path { + SkPath path_; + }; + +-class PLATFORM_EXPORT RefCountedPath : public Path, ++class PLATFORM_EXPORT RefCountedPath : public blink::Path, + public RefCounted { + USING_FAST_MALLOC(RefCountedPath); + + public: + template +- RefCountedPath(Args&&... args) : Path(std::forward(args)...) {} ++ RefCountedPath(Args&&... args) : blink::Path(std::forward(args)...) {} + }; + + // Only used for DCHECKs diff --git a/resources/patches/debian/fixes/skia_buildfix.patch b/resources/patches/debian/fixes/skia_buildfix.patch index 0b319912..6768575e 100644 --- a/resources/patches/debian/fixes/skia_buildfix.patch +++ b/resources/patches/debian/fixes/skia_buildfix.patch @@ -1,3 +1,6 @@ +description: build fix for armhf +author: Riku Voipio + --- a/third_party/skia/src/opts/SkRasterPipeline_opts.h +++ b/third_party/skia/src/opts/SkRasterPipeline_opts.h @@ -653,7 +653,7 @@ SI F approx_powf(F x, F y) { diff --git a/resources/patches/debian/fixes/widevine-revision.patch b/resources/patches/debian/fixes/widevine-revision.patch deleted file mode 100644 index eb598c85..00000000 --- a/resources/patches/debian/fixes/widevine-revision.patch +++ /dev/null @@ -1,13 +0,0 @@ -description: set widevine version as undefined -author: Michael Gilbert - ---- a/third_party/widevine/cdm/stub/widevine_cdm_version.h -+++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h -@@ -10,6 +10,7 @@ - - #include "third_party/widevine/cdm/widevine_cdm_common.h" - -+#define WIDEVINE_CDM_VERSION_STRING "undefined" - #define WIDEVINE_CDM_AVAILABLE - - #endif // WIDEVINE_CDM_VERSION_H_ diff --git a/resources/patches/debian/gn/libcxx.patch b/resources/patches/debian/gn/libcxx.patch index 19fc3972..70a2f602 100644 --- a/resources/patches/debian/gn/libcxx.patch +++ b/resources/patches/debian/gn/libcxx.patch @@ -3,7 +3,7 @@ author: Michael Gilbert --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -663,6 +663,8 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -713,6 +713,8 @@ def write_gn_ninja(path, root_gen_dir, o } if is_linux or is_aix: @@ -12,7 +12,7 @@ author: Michael Gilbert static_libraries['xdg_user_dirs'] = { 'sources': [ 'base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc', -@@ -688,85 +690,6 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -738,85 +740,6 @@ def write_gn_ninja(path, root_gen_dir, o 'base/threading/platform_thread_linux.cc', ]) if is_linux: diff --git a/resources/patches/debian/gn/narrowing.patch b/resources/patches/debian/gn/narrowing.patch index eb611b64..68734bc4 100644 --- a/resources/patches/debian/gn/narrowing.patch +++ b/resources/patches/debian/gn/narrowing.patch @@ -3,7 +3,7 @@ author: Michael Gilbert --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -380,7 +380,7 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -428,7 +428,7 @@ def write_gn_ninja(path, root_gen_dir, o '-pipe', '-fno-exceptions' ]) diff --git a/resources/patches/debian/gn/parallel.patch b/resources/patches/debian/gn/parallel.patch index f4ccb433..2859ad17 100644 --- a/resources/patches/debian/gn/parallel.patch +++ b/resources/patches/debian/gn/parallel.patch @@ -3,15 +3,15 @@ author: Michael Gilbert --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -115,6 +115,7 @@ def main(argv): - 'relative to the src directory. (eg. out/Release)') +@@ -154,6 +154,7 @@ def main(argv): + 'the out_bootstrap to be located in the parent directory') parser.add_option('-v', '--verbose', action='store_true', help='Log more details') + parser.add_option('-j', '--jobs', help='Number of jobs') options, args = parser.parse_args(argv) if args: -@@ -236,6 +237,8 @@ def build_gn_with_ninja_manually(tempdir +@@ -282,6 +283,8 @@ def build_gn_with_ninja_manually(tempdir cmd = ['ninja', '-C', tempdir, '-w', 'dupbuild=err'] if options.verbose: cmd.append('-v') diff --git a/resources/patches/debian/system/event.patch b/resources/patches/debian/system/event.patch index 424db198..3ccc5086 100644 --- a/resources/patches/debian/system/event.patch +++ b/resources/patches/debian/system/event.patch @@ -1,4 +1,4 @@ -description: build using system libevent +description: use system libevent author: Michael Gilbert --- a/third_party/webrtc/rtc_base/task_queue_libevent.cc @@ -14,7 +14,7 @@ author: Michael Gilbert #include "rtc_base/logging.h" --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -643,26 +643,6 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -693,26 +693,6 @@ def write_gn_ninja(path, root_gen_dir, o 'base/time/time_conversion_posix.cc', 'base/trace_event/heap_profiler_allocation_register_posix.cc', ]) @@ -41,7 +41,7 @@ author: Michael Gilbert if is_linux or is_aix: ldflags.extend(['-pthread']) -@@ -696,13 +676,7 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -746,13 +726,7 @@ def write_gn_ninja(path, root_gen_dir, o 'base/allocator/allocator_shim.cc', 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', ]) @@ -56,7 +56,7 @@ author: Michael Gilbert else: ldflags.extend(['-pthread']) libs.extend(['-lrt']) -@@ -742,12 +716,6 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -792,12 +766,6 @@ def write_gn_ninja(path, root_gen_dir, o 'base/time/time_mac.cc', 'base/threading/platform_thread_mac.mm', ]) diff --git a/resources/patches/debian/system/ffmpeg.patch b/resources/patches/debian/system/ffmpeg.patch new file mode 100644 index 00000000..58807113 --- /dev/null +++ b/resources/patches/debian/system/ffmpeg.patch @@ -0,0 +1,25 @@ +description: system ffmpeg build still relies on old ffmpeg_features label +author: chromium 65 authors + +--- a/build/linux/unbundle/ffmpeg.gn ++++ b/build/linux/unbundle/ffmpeg.gn +@@ -14,8 +14,8 @@ pkg_config("system_ffmpeg") { + ] + } + +-buildflag_header("ffmpeg_buildflags") { +- header = "ffmpeg_buildflags.h" ++buildflag_header("ffmpeg_features") { ++ header = "ffmpeg_features.h" + flags = [ "USE_SYSTEM_FFMPEG=true" ] + } + +@@ -30,7 +30,7 @@ shim_headers("ffmpeg_shim") { + + source_set("ffmpeg") { + deps = [ +- ":ffmpeg_buildflags", ++ ":ffmpeg_features", + ":ffmpeg_shim", + ] + public_configs = [ ":system_ffmpeg" ] diff --git a/resources/patches/debian/system/fontconfig.patch b/resources/patches/debian/system/fontconfig.patch new file mode 100644 index 00000000..97fb79dc --- /dev/null +++ b/resources/patches/debian/system/fontconfig.patch @@ -0,0 +1,49 @@ +description: disable build commands for embedded fontconfig +author: Michael Gilbert + +--- a/build/config/posix/BUILD.gn ++++ b/build/config/posix/BUILD.gn +@@ -2,7 +2,6 @@ + # Use of this source code is governed by a BSD-style license that can be + # found in the LICENSE file. + +-import("//buildtools/deps_revisions.gni") + import("//build/config/c++/c++.gni") + import("//build/config/clang/clang.gni") + import("//build/config/sanitizers/sanitizers.gni") +--- a/base/test/BUILD.gn ++++ b/base/test/BUILD.gn +@@ -187,13 +187,6 @@ static_library("test_support") { + + if (is_linux) { + public_deps += [ ":fontconfig_util_linux" ] +- data_deps = [ +- "//third_party/test_fonts", +- ] +- if (current_toolchain == host_toolchain) { +- data_deps += [ ":do_generate_fontconfig_caches" ] +- data += [ "$root_out_dir/fontconfig_caches/" ] +- } + } + + if (is_ios) { +@@ -340,7 +333,7 @@ if (is_linux) { + ] + } + +- if (current_toolchain == host_toolchain) { ++ if (false) { + executable("generate_fontconfig_caches") { + testonly = true + sources = [ +--- a/content/shell/test_runner/BUILD.gn ++++ b/content/shell/test_runner/BUILD.gn +@@ -203,7 +203,7 @@ group("resources") { + deps += [ ":copy_android_fonts_config" ] + data_deps += [ ":copy_android_fonts_config" ] + } +- if (is_android || is_linux || is_fuchsia) { ++ if (false) { + deps += [ "//third_party/test_fonts" ] + data_deps += [ "//third_party/test_fonts" ] + } diff --git a/resources/patches/debian/system/icu.patch b/resources/patches/debian/system/icu.patch index 8bff7338..1584c943 100644 --- a/resources/patches/debian/system/icu.patch +++ b/resources/patches/debian/system/icu.patch @@ -11,18 +11,3 @@ author: Michael Gilbert import("//third_party/protobuf/proto_library.gni") import("//tools/grit/grit_rule.gni") import("//url/features.gni") ---- a/third_party/blink/renderer/platform/graphics/logging_canvas.cc -+++ b/third_party/blink/renderer/platform/graphics/logging_canvas.cc -@@ -531,8 +531,12 @@ String StringForUTF32LEText(const void* - utf16 = icu::UnicodeString::fromUTF32(reinterpret_cast(text), - static_cast(byte_length)); - #endif -+#if U_ICU_VERSION_MAJOR_NUM >= 59 - return String(icu::toUCharPtr(utf16.getBuffer()), - static_cast(utf16.length())); -+#else -+ return String(utf16.getBuffer(),static_cast(utf16.length())); -+#endif - } - - String StringForText(const void* text, diff --git a/resources/patches/debian/system/jpeg.patch b/resources/patches/debian/system/jpeg.patch new file mode 100644 index 00000000..dd18872f --- /dev/null +++ b/resources/patches/debian/system/jpeg.patch @@ -0,0 +1,18 @@ +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -671,7 +671,6 @@ group("gn_all") { + "//third_party/angle:libEGL", + "//third_party/angle:libGLESv2", + "//third_party/leveldatabase:leveldb_test_targets", +- "//third_party/libjpeg_turbo:simd", + "//third_party/opus:opus_compare", + "//third_party/opus:opus_demo", + "//third_party/opus:test_opus_api", +@@ -695,7 +694,6 @@ group("gn_all") { + if (enable_nacl) { + deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ] + } +- deps += [ "//third_party/libjpeg_turbo:simd_asm" ] + } + if (is_linux && current_toolchain == host_toolchain) { + deps += [ "//v8:v8_shell" ] diff --git a/resources/patches/debian/system/lcms2.patch b/resources/patches/debian/system/lcms2.patch index a92f6a49..5bb572f3 100644 --- a/resources/patches/debian/system/lcms2.patch +++ b/resources/patches/debian/system/lcms2.patch @@ -4,15 +4,15 @@ bug-debian: http://bugs.debian.org/879153 --- a/third_party/pdfium/BUILD.gn +++ b/third_party/pdfium/BUILD.gn -@@ -192,6 +192,7 @@ jumbo_static_library("pdfium") { +@@ -194,6 +194,7 @@ jumbo_static_library("pdfium") { ":fxge", ":fxjs", ":pwl", + "third_party:lcms2", "third_party:bigint", "third_party:pdfium_base", - "third_party:skia_shared", -@@ -682,6 +683,7 @@ jumbo_static_library("fpdftext") { + ] +@@ -687,6 +688,7 @@ jumbo_static_library("fpdftext") { configs += [ ":pdfium_core_config" ] deps = [ ":fxcrt", @@ -20,11 +20,11 @@ bug-debian: http://bugs.debian.org/879153 ] } -@@ -1080,6 +1082,7 @@ jumbo_static_library("fxge") { +@@ -1081,6 +1083,7 @@ jumbo_static_library("fxge") { deps = [ ":fxcrt", + "third_party:lcms2", ] - if (is_component_build || use_system_freetype) { + defines = [ "DEFINE_PS_TABLES" ] diff --git a/resources/patches/debian/system/nspr.patch b/resources/patches/debian/system/nspr.patch index 30829fe7..84b627db 100644 --- a/resources/patches/debian/system/nspr.patch +++ b/resources/patches/debian/system/nspr.patch @@ -25,7 +25,7 @@ author: Michael Gilbert --- a/tools/gn/bootstrap/bootstrap.py +++ b/tools/gn/bootstrap/bootstrap.py -@@ -555,7 +555,6 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -605,7 +605,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', @@ -33,7 +33,7 @@ author: Michael Gilbert 'base/threading/post_task_and_reply_impl.cc', 'base/threading/scoped_blocking_call.cc', 'base/threading/sequence_local_storage_map.cc', -@@ -697,7 +696,7 @@ def write_gn_ninja(path, root_gen_dir, o +@@ -747,7 +746,7 @@ def write_gn_ninja(path, root_gen_dir, o 'base/allocator/allocator_shim.cc', 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', ]) @@ -44,7 +44,7 @@ author: Michael Gilbert ]) --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -76,6 +76,9 @@ config("base_flags") { +@@ -75,6 +75,9 @@ config("base_flags") { "-Wexit-time-destructors", ] } @@ -54,7 +54,7 @@ author: Michael Gilbert } config("base_implementation") { -@@ -883,8 +886,6 @@ jumbo_component("base") { +@@ -899,8 +902,6 @@ jumbo_component("base") { "third_party/dmg_fp/g_fmt.cc", "third_party/icu/icu_utf.cc", "third_party/icu/icu_utf.h", diff --git a/resources/patches/debian/warnings/misleading-indentation.patch b/resources/patches/debian/warnings/misleading-indentation.patch new file mode 100644 index 00000000..bd35bb1b --- /dev/null +++ b/resources/patches/debian/warnings/misleading-indentation.patch @@ -0,0 +1,16 @@ +description: fix misleading indentation warning +author: Michael Gilbert + +--- a/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc ++++ b/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc +@@ -151,8 +151,8 @@ void AXMenuListPopup::DidHide() { + cache.PostNotification(this, AXObjectCacheImpl::kAXHide); + if (ActiveDescendant()) + cache.PostNotification(this, AXObjectCacheImpl::kAXChildrenChanged); +- cache.PostNotification(ActiveDescendant(), +- AXObjectCacheImpl::kAXMenuListItemUnselected); ++ cache.PostNotification(ActiveDescendant(), ++ AXObjectCacheImpl::kAXMenuListItemUnselected); + } + + void AXMenuListPopup::DidShow() { diff --git a/resources/patches/debian/warnings/multichar.patch b/resources/patches/debian/warnings/multichar.patch new file mode 100644 index 00000000..4a7333ff --- /dev/null +++ b/resources/patches/debian/warnings/multichar.patch @@ -0,0 +1,13 @@ +description: crashpad relies on multicharacter integer assigments +author: Michael Gilbert + +--- a/third_party/crashpad/crashpad/build/BUILD.gn ++++ b/third_party/crashpad/crashpad/build/BUILD.gn +@@ -20,6 +20,7 @@ import("crashpad_buildconfig.gni") + + config("crashpad_is_in_chromium") { + if (crashpad_is_in_chromium) { ++ cflags = [ "-Wno-multichar" ] + defines = [ "CRASHPAD_IS_IN_CHROMIUM" ] + } + } diff --git a/resources/patches/debian/warnings/null-destination.patch b/resources/patches/debian/warnings/null-destination.patch new file mode 100644 index 00000000..bc258cff --- /dev/null +++ b/resources/patches/debian/warnings/null-destination.patch @@ -0,0 +1,22 @@ +description: use stack_buf before possible branching (see gcc bug #83139) +author: Michael Gilbert + +--- a/base/strings/stringprintf.cc ++++ b/base/strings/stringprintf.cc +@@ -61,14 +61,14 @@ static void StringAppendVT(StringType* d + int result = vsnprintfT(stack_buf, arraysize(stack_buf), format, ap_copy); + va_end(ap_copy); + +- if (result >= 0 && result < static_cast(arraysize(stack_buf))) { ++ int mem_length = static_cast(arraysize(stack_buf)); ++ if (result >= 0 && result < mem_length) { + // It fit. + dst->append(stack_buf, result); + return; + } + + // Repeatedly increase buffer size until it fits. +- int mem_length = arraysize(stack_buf); + while (true) { + if (result < 0) { + #if defined(OS_WIN) diff --git a/resources/patches/debian/warnings/sequence-point.patch b/resources/patches/debian/warnings/sequence-point.patch index 32ce8341..fe26c61c 100644 --- a/resources/patches/debian/warnings/sequence-point.patch +++ b/resources/patches/debian/warnings/sequence-point.patch @@ -12,3 +12,14 @@ author: Michael Gilbert shared_quad_state = render_pass->CreateAndAppendSharedQuadState(); PopulateScaledSharedQuadState(shared_quad_state, device_scale_factor, +--- a/headless/lib/browser/protocol/browser_handler.cc ++++ b/headless/lib/browser/protocol/browser_handler.cc +@@ -71,7 +71,7 @@ Response BrowserHandler::Close() { + Response BrowserHandler::SetWindowBounds( + int window_id, + std::unique_ptr window_bounds) { +- HeadlessWebContentsImpl* web_contents = web_contents = ++ HeadlessWebContentsImpl* web_contents = + browser()->GetWebContentsForWindowId(window_id); + if (!web_contents) + return Response::Error("Browser window not found");