summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoan Figueras2021-02-19 01:20:58 +0100
committerJoan Figueras2021-02-19 01:20:58 +0100
commit20b9f76c31d9aa937d1becbeab038e335e715ff5 (patch)
tree6f2c28e58d0e3e9717bee5b75ec8a45441847c9a
parent553c8aab30b9c7f4d9422057f14a41ba0e74e261 (diff)
downloadaur-20b9f76c31d9aa937d1becbeab038e335e715ff5.tar.gz
Correct custom build for brave 1.20
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD14
-rw-r--r--brave-custom-build.patch218
3 files changed, 10 insertions, 224 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b72d2cd832c1..48e6e468c2e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -33,14 +33,12 @@ pkgbase = brave
source = brave-browser.desktop
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
source = https://github.com/stha09/chromium-patches/releases/download/chromium-88-patchset-3/chromium-88-patchset-3.tar.xz
- source = brave-custom-build.patch
source = subpixel-anti-aliasing-in-FreeType-2.8.1.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/subpixel-anti-aliasing-in-FreeType-2.8.1.patch?h=packages/chromium&id=4332a9b5a5f7e1d5ec8e95ee51581c3e55450f41
sha256sums = e7623d84f0bf1f4a17bd54d2cba609b64e7fb40915b6fd5abf6483cc7ecedab2
sha256sums = 725e2d0c32da4b3de2c27a02abaf2f5acca7a25dcea563ae458c537ac4ffc4d5
sha256sums = fa6ed4341e5fc092703535b8becaa3743cb33c72f683ef450edd3ef66f70d42d
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
sha256sums = e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9
- sha256sums = f206177b78f42bd2b5e28bf13ffacf9e555914ca6f7b65f0e15781712825c0b8
sha256sums = 1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6
pkgname = brave
diff --git a/PKGBUILD b/PKGBUILD
index c9d5b8f0fab6..632530b98707 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -48,8 +48,7 @@ source=("https://github.com/brave/brave-browser/archive/v${pkgver}.tar.gz"
'brave-launcher'
'brave-browser.desktop'
"chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz"
- "https://github.com/stha09/chromium-patches/releases/download/${patchset_name}/${patchset_name}.tar.xz"
- 'brave-custom-build.patch')
+ "https://github.com/stha09/chromium-patches/releases/download/${patchset_name}/${patchset_name}.tar.xz")
arch_revision=4332a9b5a5f7e1d5ec8e95ee51581c3e55450f41
for Patches in \
subpixel-anti-aliasing-in-FreeType-2.8.1.patch
@@ -65,7 +64,6 @@ sha256sums=('e7623d84f0bf1f4a17bd54d2cba609b64e7fb40915b6fd5abf6483cc7ecedab2'
'fa6ed4341e5fc092703535b8becaa3743cb33c72f683ef450edd3ef66f70d42d'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
'e5a60a4c9d0544d3321cc241b4c7bd4adb0a885f090c6c6c21581eac8e3b4ba9'
- 'f206177b78f42bd2b5e28bf13ffacf9e555914ca6f7b65f0e15781712825c0b8'
'1e2913e21c491d546e05f9b4edf5a6c7a22d89ed0b36ef692ca6272bcd5faec6')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
@@ -96,6 +94,12 @@ _unwanted_bundled_libs=(
# Add depends if user wants a release with custom cflags and system libs
if [ "$COMPONENT" = "4" ]; then
#echo "Build with system libs is disabled for now" && exit 1
+ brave_base_ver="$(echo $pkgver | cut -d . -f 1-2)"
+ brave_patchset="1"
+ brave_patchset_name="brave-${brave_base_ver}-patches-${brave_patchset}"
+ source+=("https://gitlab.com/hadogenes/brave-patches/-/archive/${brave_patchset_name}/brave-patches-${brave_patchset_name}.zip")
+ sha256sums+=("bd111797dc8a769a546612ab37c81983c4c4f8c04f83e707af7676e8fded45ff")
+
depends+=('libpulse' 'pciutils')
depends+=(${_system_libs[@]})
makedepends+=('lld' 'libva' 'libpipewire02' 'python2-xcb-proto')
@@ -150,7 +154,9 @@ prepare() {
tools/generate_shim_headers/generate_shim_headers.py
msg2 "Add patches for custom build"
- patch -Np1 -i "$srcdir/brave-custom-build.patch"
+ for _patch in "$srcdir/brave-patches-$brave_patchset_name"/*.patch; do
+ patch -Np1 -i "$_patch"
+ done
# Remove bundled libraries for which we will use the system copies; this
# *should* do what the remove_bundled_libraries.py script does, with the
diff --git a/brave-custom-build.patch b/brave-custom-build.patch
deleted file mode 100644
index 5677accab448..000000000000
--- a/brave-custom-build.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-diff -ru a/brave/components/brave_rewards/browser/logging.h b/brave/components/brave_rewards/browser/logging.h
---- a/brave/components/brave_rewards/browser/logging.h 2020-09-25 22:55:11.176666768 +0200
-+++ b/brave/components/brave_rewards/browser/logging.h 2020-10-01 12:16:30.493329812 +0200
-@@ -11,7 +11,7 @@
- namespace brave_rewards {
-
- #define BLOG(verbose_level, stream) Log(__FILE__, __LINE__, \
-- verbose_level, (std::ostringstream() << stream).str());
-+ verbose_level, static_cast<std::ostringstream &>(std::ostringstream() << stream).str());
-
- #define BLOG_IF(verbose_level, condition, stream) \
- !(condition) ? (void) 0 : BLOG(verbose_level, stream)
-diff -ru a/brave/vendor/adblock_rust_ffi/src/wrapper.cpp b/brave/vendor/adblock_rust_ffi/src/wrapper.cpp
---- a/brave/vendor/adblock_rust_ffi/src/wrapper.cpp 2020-09-26 00:29:10.890000602 +0200
-+++ b/brave/vendor/adblock_rust_ffi/src/wrapper.cpp 2020-10-01 12:15:47.649996482 +0200
-@@ -1,4 +1,5 @@
- #include "wrapper.hpp"
-+#include <cstring>
- #include <iostream>
- using namespace std;
-
-diff -ru a/brave/vendor/bat-native-ads/src/bat/ads/internal/logging.h b/brave/vendor/bat-native-ads/src/bat/ads/internal/logging.h
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/logging.h 2020-09-25 22:55:11.660000101 +0200
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/logging.h 2020-10-01 12:15:47.669996481 +0200
-@@ -52,7 +52,7 @@
- // 8 Database queries
-
- #define BLOG(verbose_level, stream) ads::Log(__FILE__, __LINE__, \
-- verbose_level, (std::ostringstream() << stream).str());
-+ verbose_level, static_cast<std::ostringstream &>(std::ostringstream() << stream).str());
-
- // You can also do conditional verbose logging when some extra computation and
- // preparation for logs is not needed:
-diff -ru a/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc b/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc
---- a/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc 2020-09-25 22:55:12.273333434 +0200
-+++ b/brave/vendor/bat-native-ledger/src/bat/ledger/internal/contribution/contribution.cc 2020-10-01 12:15:47.663329814 +0200
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cmath>
-+#include <ctime>
- #include <memory>
- #include <utility>
- #include <vector>
-diff -ru a/brave/vendor/bat-native-ledger/src/bat/ledger/internal/logging/logging.h b/brave/vendor/bat-native-ledger/src/bat/ledger/internal/logging/logging.h
---- a/brave/vendor/bat-native-ledger/src/bat/ledger/internal/logging/logging.h 2020-09-25 22:55:11.680000101 +0200
-+++ b/brave/vendor/bat-native-ledger/src/bat/ledger/internal/logging/logging.h 2020-10-01 12:38:06.619996468 +0200
-@@ -53,7 +53,7 @@
- // 9 Detailed debugging (response headers, etc)
-
- #define BLOG(verbose_level, stream) ledger::Log(__FILE__, __LINE__, \
-- verbose_level, (std::ostringstream() << stream).str());
-+ verbose_level, static_cast<std::ostringstream &>(std::ostringstream() << stream).str());
-
- // You can also do conditional verbose logging when some extra computation and
- // preparation for logs is not needed:
-diff -ru a/brave/vendor/bat-native-usermodel/src/transformation.cc b/brave/vendor/bat-native-usermodel/src/transformation.cc
---- a/brave/vendor/bat-native-usermodel/src/transformation.cc 2020-09-26 00:30:07.446667262 +0200
-+++ b/brave/vendor/bat-native-usermodel/src/transformation.cc 2020-10-01 12:15:47.669996481 +0200
-@@ -4,6 +4,7 @@
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- #include "transformation.h"
-+#include <algorithm>
- #include <codecvt>
- #include <math.h>
- namespace usermodel {
-diff --git a/brave/components/ipfs/ipfs_utils.cc b/brave/components/ipfs/ipfs_utils.cc
-index de984233dc..9414da92a3 100644
---- a/brave/components/ipfs/ipfs_utils.cc
-+++ b/brave/components/ipfs/ipfs_utils.cc
-@@ -6,6 +6,7 @@
- #include "brave/components/ipfs/ipfs_utils.h"
-
- #include <vector>
-+#include <algorithm>
-
- #include "url/gurl.h"
- #include "extensions/common/url_pattern.h"
-diff --git a/brave/components/ipfs/translate_ipfs_uri.cc b/brave/components/ipfs/translate_ipfs_uri.cc
-index d3bf012a5f..794ba63eb7 100644
---- a/brave/components/ipfs/translate_ipfs_uri.cc
-+++ b/brave/components/ipfs/translate_ipfs_uri.cc
-@@ -6,6 +6,7 @@
- #include "brave/components/ipfs/translate_ipfs_uri.h"
-
- #include <string>
-+#include <algorithm>
-
- #include "base/logging.h"
- #include "brave/components/ipfs/common/ipfs_constants.h"
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/ad_targeting/ad_targeting_util.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/ad_targeting/ad_targeting_util.cc
-index 977dd27c48..2e2e38da4a 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/ad_targeting/ad_targeting_util.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/ad_targeting/ad_targeting_util.cc
-@@ -5,6 +5,7 @@
-
- #include "bat/ads/internal/ad_targeting/ad_targeting_util.h"
-
-+#include <algorithm>
- #include "base/strings/string_split.h"
-
- namespace ads {
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/p2a/p2a_util.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/p2a/p2a_util.cc
-index 801ada1adf..3041a6954f 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/p2a/p2a_util.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/p2a/p2a_util.cc
-@@ -5,6 +5,7 @@
-
- #include "bat/ads/internal/p2a/p2a_util.h"
-
-+#include <algorithm>
- #include "bat/ads/internal/ad_targeting/ad_targeting_util.h"
-
- namespace ads {
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/ads_history/filters/ads_history_date_range_filter.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/ads_history/filters/ads_history_date_range_filter.cc
-index f9c29eca59..2669a9a0b1 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/ads_history/filters/ads_history_date_range_filter.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/ads_history/filters/ads_history_date_range_filter.cc
-@@ -5,6 +5,8 @@
-
- #include "bat/ads/internal/ads_history/filters/ads_history_date_range_filter.h"
-
-+#include <algorithm>
-+
- namespace ads {
-
- AdsHistoryDateRangeFilter::AdsHistoryDateRangeFilter() = default;
-diff --git a/brave/BUILD.gn b/brave/BUILD.gn
-index 0621414234..ffd7685f5d 100644
---- a/brave/BUILD.gn
-+++ b/brave/BUILD.gn
-@@ -2,6 +2,7 @@ import("//brave/build/cargo.gni")
- import("//brave/build/config.gni")
- import("//brave/components/brave_rewards/browser/buildflags/buildflags.gni")
- import("//build/config/locales.gni")
-+import("//build/config/sysroot.gni")
- import("//build/config/zip.gni")
- import("//build/util/process_version.gni")
- import("//extensions/buildflags/buildflags.gni")
-@@ -216,10 +217,12 @@ group("create_dist") {
- }
- }
- if (is_linux) {
-+ if (use_sysroot) {
-+ deps += [ "//chrome/installer/linux:$linux_channel" ]
-+ }
- deps += [
- ":theme_files",
- "//brave/app/linux:dist_resources",
-- "//chrome/installer/linux:$linux_channel",
- ]
- }
- }
-@@ -304,9 +307,12 @@ if (!is_android && !is_ios) {
- ":packed_resources",
- "build/$target_os:brave",
- "//chrome:packed_resources",
-- "//third_party/icu:icudata",
- ]
-
-+ if (icu_use_data_file) {
-+ deps += [ "//third_party/icu:icudata" ]
-+ }
-+
- if (!is_mac) {
- sources += [
- "$root_out_dir/$brave_exe",
-@@ -315,9 +321,12 @@ if (!is_android && !is_ios) {
- "$root_out_dir/brave_resources.pak",
- "$root_out_dir/chrome_100_percent.pak",
- "$root_out_dir/chrome_200_percent.pak",
-- "$root_out_dir/icudtl.dat",
- "$root_out_dir/resources.pak",
- ]
-
-+ if (icu_use_data_file) {
-+ sources += [ "$root_out_dir/icudtl.dat" ]
-+ }
-+
- if (v8_use_external_startup_data) {
- deps += [ "//v8" ]
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_day_frequency_cap.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_day_frequency_cap.cc
-index 24cb6aaeb8..f750604cc4 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_day_frequency_cap.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_day_frequency_cap.cc
-@@ -8,6 +8,7 @@
- #include <stdint.h>
-
- #include <deque>
-+#include <algorithm>
-
- #include "base/time/time.h"
- #include "bat/ads/internal/frequency_capping/frequency_capping_util.h"
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/dismissed_frequency_cap.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/dismissed_frequency_cap.cc
-index d17bef2f4d..2e5629335f 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/dismissed_frequency_cap.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/exclusion_rules/dismissed_frequency_cap.cc
-@@ -6,6 +6,7 @@
- #include "bat/ads/internal/frequency_capping/exclusion_rules/dismissed_frequency_cap.h"
-
- #include <stdint.h>
-+#include <algorithm>
-
- #include "base/strings/stringprintf.h"
- #include "base/time/time.h"
-diff --git a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_hour_frequency_cap.cc b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_hour_frequency_cap.cc
-index d85ce9664b..7f1bc9ce9e 100644
---- a/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_hour_frequency_cap.cc
-+++ b/brave/vendor/bat-native-ads/src/bat/ads/internal/frequency_capping/permission_rules/new_tab_page_ads_per_hour_frequency_cap.cc
-@@ -8,6 +8,7 @@
- #include <stdint.h>
-
- #include <deque>
-+#include <algorithm>
-
- #include "base/time/time.h"
- #include "bat/ads/internal/frequency_capping/frequency_capping_util.h"