summaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2023-03-11 10:05:28 +0000
committer Eric Hameleers <alien@slackware.com>2023-03-11 10:05:28 +0000
commit3d43d8cfdf2aacfdbb38ce26a26acf652e39c2af (patch)
treefe34e27dddff7ba320c246d330aea300774783d0 /chromium
parent8d0f8a97b8cfa6ffb17663fd4d9ea0adcd07f3b7 (diff)
downloadasb-3d43d8cfdf2aacfdbb38ce26a26acf652e39c2af.tar.gz
asb-3d43d8cfdf2aacfdbb38ce26a26acf652e39c2af.tar.xz
Initial revision
Diffstat (limited to 'chromium')
-rwxr-xr-xchromium/build/chromium.SlackBuild_15.01755
1 files changed, 1755 insertions, 0 deletions
diff --git a/chromium/build/chromium.SlackBuild_15.0 b/chromium/build/chromium.SlackBuild_15.0
new file mode 100755
index 00000000..959a0b32
--- /dev/null
+++ b/chromium/build/chromium.SlackBuild_15.0
@@ -0,0 +1,1755 @@
+#!/bin/bash
+# $Id$
+# Copyright 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: chromium
+# Descr: Open Source version of Chrome Web Browser
+# URL: http://www.chromium.org/
+# Build needs: - ninja;
+# - nodejs >= 15.6.0;
+# - gcc >= 8 , llvm >= 16 for bootstrapping gn;
+# - nasm >= 2.14;
+# - cmake >= 3.13.4;
+# - python3 >= 3.7, python3-setuptools;
+# - java runtime;
+# - Internet access (for downloading toolchain bins).
+# Needs:
+# Changelog:
+# 31.0.1650.57-1: 18/nov/2013 by Eric Hameleers <alien@slackware.com>
+# * Initial build.
+# 31.0.1650.63-1: 18/Nov/2013 by Eric Hameleers <alien@slackware.com>
+# 31.0.1650.67-1: 19/dec/2013 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 32.0.1700.77-1: 14/jan/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 32.0.1700.102-1: 29/jan/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 32.0.1700.107-1: 04/feb/2014 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 33.0.1750.117-1: 21/feb/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 33.0.1750.146-1: 04/mar/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 33.0.1750.149-1: 11/mar/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 33.0.1750.152-1: 18/mar/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 34.0.1847.116-1: 09/apr/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 34.0.1847.132-1: 25/apr/2014 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 34.0.1847.137-1: 14/may/2014 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 35.0.1916.114-1: 20/may/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 35.0.1916.153-1: 10/jun/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# 36.0.1985.125-1: 16/jun/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with several security fixes.
+# We can no longer download toolchain binaries in advance,
+# so the build will now require internet connectivity.
+# 36.0.1985.143-1: 12/aug/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes, Chrome also comes with an
+# updated Flash plugin: 14.0.0.177.
+# 37.0.2062.94-1: 27/aug/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes.
+# New: an embedded PDF viewer.
+# 37.0.2062.120-1: 09/sep/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes, Chrome also comes with an
+# updated Flash plugin: 15.0.0.152.
+# 38.0.2125.101-1: 08/oct/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes.
+# 38.0.2125.104-1: 18/oct/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes. Chrome also updates its
+# Flash plugin to 15.0.0.189.
+# 38.0.2125.111-1: 28/oct/2014 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 38.0.2125.122-1: 11/nov/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes. Chrome also updates its
+# Flash plugin to 15.0.0.223.
+# 39.0.2171.65-1: 17/nov/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes. See
+# http://googlechromereleases.blogspot.nl/2014/11/stable-channel-update_18.html
+# 39.0.2171.71-1: 26/nov/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes. Chrome also updates its
+# Flash plugin to 15.0.0.239.
+# 39.0.2171.95-1: 09/dec/2014 by Eric Hameleers <alien@slackware.com>
+# * Update comes with security fixes. Chrome also updates its
+# Flash plugin to 16.0.0.235.
+# 39.0.2171.95-2: 01/jan/2015 by Eric Hameleers <alien@slackware.com>
+# * Add support for the WIdevine CDM plugin (i.e. Netflix playback)
+# 39.0.2171.99-1: 14/jan/2015 by Eric Hameleers <alien@slackware.com>
+# * New release accompanied by pepperflash 16.0.0.257.
+# 40.0.2214.91-1: 21/jan/2015 by Eric Hameleers <alien@slackware.com>
+# * New release.
+# 40.0.2214.111-1: 06/feb/2015 by Eric Hameleers <alien@slackware.com>
+# * New release.
+# 41.0.2272.76-1: 05/mar/2015 by Eric Hameleers <alien@slackware.com>
+# * First release of Chromium 41 stable.
+# 41.0.2272.118-1: 02/apr/2015 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 42.0.2311.90-1: 15/apr/2015 by Eric Hameleers <alien@slackware.com>
+# * First release of Chromium 42 stable.
+# 42.0.2311.135-1: 30/apr/2015 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 43.0.2357.65-1: 20/may/2015 by Eric Hameleers <alien@slackware.com>
+# * Security update, first 43 version.
+# 43.0.2357.81-1: 29/may/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 43.0.2357.124-1: 09/jun/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 43.0.2357.125-1: 12/jun/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 43.0.2357.125-2: 19/jun/2015 by Eric Hameleers <alien@slackware.com>
+# * Disable "OK Google" hotwording completely.
+# 43.0.2357.130-1: 22/jun/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 43.0.2357.130-2: 25/jun/2015 by Eric Hameleers <alien@slackware.com>
+# * Fix broken password manager in KDE.
+# 43.0.2357.132-1: 08/jul/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 43.0.2357.134-1: 15/jul/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 44.0.2403.89-1: 22/jul/2015 by Eric Hameleers <alien@slackware.com>
+# * Update - first 44 release.
+# 44.0.2403.107-1: 25/jul/2015 by Eric Hameleers <alien@slackware.com>
+# * Update - emergency bugfix release.
+# 44.0.2403.155-1: 11/aug/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 44.0.2403.157-1: 21/aug/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 45.0.2454.85-1: 02/sep/2015 by Eric Hameleers <alien@slackware.com>
+# * Update - first 45 release.
+# 45.0.2454.93-1: 16/sep/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 45.0.2454.101-1: 25/sep/2015 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 46.0.2490.71-1: 14/oct/2015 by Eric Hameleers <alien@slackware.com>
+# * First 46 release.
+# 46.0.2490.86-1: 22/nov/2015 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 47.0.2526.73-1: 03/dec/2015 by Eric Hameleers <alien@slackware.com>
+# * First 47 release.
+# 48.0.2564.82-1: 24/jan/2016 by Eric Hameleers <alien@slackware.com>
+# * First 48 release.
+# 48.0.2564.97-1: 31/jan/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 48.0.2564.109-1: 13/feb/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 49.0.2623.75-1: 05/mar/2016 by Eric Hameleers <alien@slackware.com>
+# * First 49 release. Binary plugins such as widevine and
+# pepperflash are no longer available for 32-bit since
+# Google stopped providing binaries for 32-bit Chrome.
+# 49.0.2623.108-1: 25/feb/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 49.0.2623.112-1: 08/apr/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 50.0.2661.75-1: 14/apr/2016 by Eric Hameleers <alien@slackware.com>
+# * First 50 release.
+# 50.0.2661.94-1: 29/apr/2016 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 50.0.2661.102-1: 12/may/2016 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 51.0.2704.63-1: 26/may/2016 by Eric Hameleers <alien@slackware.com>
+# * First 51 release.
+# 51.0.2704.84-1: 07/jun/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 51.0.2704.103-1: 17/jun/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 52.0.2743.82-1: 24/jul/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 52.0.2743.116-1: 04/aug/2016 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 53.0.2785.92-1: 06/sep/2016 by Eric Hameleers <alien@slackware.com>
+# * First 53 release.
+# 53.0.2785.92-2: 12/sep/2016 by Eric Hameleers <alien@slackware.com>
+# * Apply patch required for Slackware 14.1.
+# 54.0.2840.90-1: 03/nov/2016 by Eric Hameleers <alien@slackware.com>
+# * First 54 release. Build system changed from gyp to gn.
+# 54.0.2840.100-1: 17/nov/2016 by Eric Hameleers <alien@slackware.com>
+# * Updated. Security fix. Removed the VAAPI patch because
+# several people have issues with it.
+# 55.0.2883.75-1: 12/dec/2016 by Eric Hameleers <alien@slackware.com>
+# * First 55 release.
+# 56.0.2924.76-1: 30/jan/2017 by Eric Hameleers <alien@slackware.com>
+# * First 56 release.
+# 56.0.2924.76-2: 25/feb/2017 by Eric Hameleers <alien@slackware.com>
+# * Built for Slackware 14.1 with some additional patches.
+# 57.0.2987.98-1: 14/mar/2017 by Eric Hameleers <alien@slackware.com>
+# * First 57 release.
+# 58.0.3029.96-1: 04/may/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 58.
+# 59.0.3071.86-1: 06/jun/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 59.
+# 60.0.3112.78-1: 25/jun/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 60.
+# 61.0.3163.79-1: 11/sep/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 61.
+# 61.0.3163.100-1: 25/sep/2017 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 62.0.3202.62-1: 18/oct/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 62.
+# 62.0.3202.75-1: 27/oct/2017 by Eric Hameleers <alien@slackware.com>
+# * Update, switch compiler to clang instead of gcc.
+# 62.0.3202.94-1: 25/nov/2017 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 63.0.3239.108-1: 17/dec/2017 by Eric Hameleers <alien@slackware.com>
+# * Update to 63.
+# 63.0.3239.132-1: 07/jan/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 64.0.3282.119-1: 26/jan/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to 64.
+# 64.0.3282.119-2: 29/jan/2018 by Eric Hameleers <alien@slackware.com>
+# * Enable HEVC support.
+# 64.0.3282.140-1: 05/feb/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 64.0.3282.186-1: 06/mar/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 65.0.3325.146-1: 09/mar/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to M65.
+# 65.0.3325.162-1: 16/mar/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 65.0.3325.181-1: 31/mar/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 66.0.3359.117-1: 25/apr/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to M66.
+# 66.0.3359.139-1: 25/apr/2018 by Eric Hameleers <alien@slackware.com>
+# * Security update (CVE-2018-6118).
+# 66.0.3359.181-1: 18/may/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 67.0.3396.62-1: 31/may/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to M67.
+# 67.0.3396.79-1: 08/jun/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 67.0.3396.99-1: 02/jul/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 68.0.3440.84-1: 01/aug/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to 68.
+# 69.0.3497.81-1: 05/sep/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to 69.
+# 69.0.3497.100-1: 28/sep/2018 by Eric Hameleers <alien@slackware.com>
+# * Update, trying to fix pulseaudio.
+# 70.0.3538.67-1: 24/oct/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to 70.
+# 70.0.3538.102-1: 11/nov/2018 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 71.0.3578.80-1: 05/dec/2018 by Eric Hameleers <alien@slackware.com>
+# * Update to M71.
+# 72.0.3626.81-1: 31/jan/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M72.
+# 72.0.3626.121-1: 03/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to 72.0.3626.121.
+# 73.0.3683.75-1: 15/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M73.
+# 73.0.3683.75-2: 17/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Fix 32bit build.
+# 73.0.3683.86-1: 31/mar/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 73.0.3683.103-1: 14/apr/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 74.0.3729.108-1: 24/apr/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M74.
+# 74.0.3729.169-1: 22/may/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 75.0.3770.80-1: 08/jun/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M75.
+# 75.0.3770.90-1: 13/jun/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 75.0.3770.100-1: 20/jun/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 75.0.3770.100-2: 20/jun/2019 by Eric Hameleers <alien@slackware.com>
+# * Fix HEVC support.
+# 75.0.3770.142-1: 15/jul/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 76.0.3809.87-1: 31/jul/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M76.
+# 76.0.3809.132-1: 30/aug/2019 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 77.0.3865.75-1: 11/sep/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M77.
+# 77.0.3865.90-1: 11/sep/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 77.0.3865.120-1: 10/oct/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 78.0.3904.70-1: 10/oct/2019 by Eric Hameleers <alien@slackware.com>
+# * Update to M78.
+# 78.0.3904.87-1: 01/nov/2019 by Eric Hameleers <alien@slackware.com>
+# * Critical security update.
+# 78.0.3904.97-1: 11/nov/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 78.0.3904.108-1: 19/nov/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 79.0.3945.79-1: 11/dec/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 79.0.3945.88-1: 18/dec/2019 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 79.0.3945.117-1: 08/jan/2020 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 79.0.3945.130-1: 19/jan/2020 by Eric Hameleers <alien@slackware.com>
+# * Security update.
+# 80.0.3987.87-1: 05/feb/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M80.
+# 80.0.3987.106-1: 14/feb/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 80.0.3987.122-1: 27/feb/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 80.0.3987.132-1: 04/mar/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 80.0.3987.149-1: 18/mar/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 81.0.4044.92-1: 08/apr/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M81.
+# 81.0.4044.113-1: 16/apr/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 81.0.4044.122-1: 25/apr/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 81.0.4044.129-1: 29/apr/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 81.0.4044.138-1: 06/may/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 83.0.4103.61-1: 20/may/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M83.
+# 83.0.4103.97-1: 07/jun/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 83.0.4103.106-1: 16/jun/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 83.0.4103.116-1: 23/jun/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# Add support for VAAPI. This is off by default but
+# can be enabled by adding '--ignore-gpu-blacklist' and
+# then one of '--use-gl=desktop' or '--use-gl=egl'.
+# See https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/vaapi.md#VaAPI-on-Linux
+# for the intended usage (Intel VAAPI and MESA VAAPI).
+# To support Nvidia and other GPUs, patches would be needed.
+# 84.0.4147.89-1: 20/jul/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M84.
+# 84.0.4147.94-1: 23/jul/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated. Use a newer nodejs to make the sources compile
+# on 32bit Slackware 14, plus this also fixes the
+# broken development tools.
+# 84.0.4147.105-1: 01/aug/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 85.0.4183.83-1: 28/aug/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M85.
+# 85.0.4183.102-1: 09/sep/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 85.0.4183.121-1: 22/sep/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 86.0.4240.75-1: 07/oct/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M86.
+# 86.0.4240.111-1: 22/oct/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 86.0.4240.183-1: 03/nov/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 86.0.4240.198-1: 13/nov/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 87.0.4280.66-1: 23/nov/2020 by Eric Hameleers <alien@slackware.com>
+# * Update to M87.
+# 87.0.4280.88-1: 03/dec/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 87.0.4280.141-1: 07/jan/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 88.0.4324.96-1: 21/jan/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M88.
+# 88.0.4324.146-1: 04/feb/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 88.0.4324.150-1: 06/feb/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 88.0.4324.182-1: 17/feb/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 88.0.4324.190-1: 23/feb/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 89.0.4389.72-1: 03/mar/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M89.
+# 89.0.4389.82-1: 07/mar/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 89.0.4389.90-1: 13/mar/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 89.0.4389.114-1: 31/mar/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 89.0.4389.128-1: 14/apr/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 90.0.4430.72-1: 15/apr/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M90.
+# 90.0.4430.93-1: 28/apr/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 90.0.4430.212-1: 11/may/2021 by Eric Hameleers <alien@slackware.com>
+# * Updated.
+# 91.0.4472.101-1: 11/jun/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 91.0.4472.114-1: 19/jun/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 92.0.4515.107-1: 22/jul/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M92.
+# 92.0.4515.131-1: 05/aug/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 92.0.4515.159-1: 17/aug/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 93.0.4577.63-1: 01/sep/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M93. Add some mods that hopefully make building
+# on ARM platforms easier.
+# 93.0.4577.82-1: 13/sep/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 94.0.4606.71-1: 02/oct/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M94.
+# 95.0.4638.69-1: 28/oct/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M95.
+# 96.0.4664.45-1: 15/nov/2021 by Eric Hameleers <alien@slackware.com>
+# * Update to M96.
+# 96.0.4664.93-1: 09/dec/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 96.0.4664.110-1: 14/dec/2021 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 97.0.4692.71-1: 05/jan/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M97.
+# 97.0.4692.99-1: 20/jan/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 98.0.4758.80-1: 02/feb/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M98.
+# 98.0.4758.102-1: 16/feb/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 99.0.4844.51-1: 02/mar/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M99.
+# 99.0.4844.74-1: 16/mar/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 99.0.4844.82-1: 24/mar/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 99.0.4844.84-1: 27/mar/2022 by Eric Hameleers <alien@slackware.com>
+# * Emergency update.
+# 100.0.4896.60-1: 30/mar/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M100.
+# 100.0.4896.75-1: 05/apr/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 100.0.4896.88-1: 12/apr/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 100.0.4896.127-1:15/apr/2022 by Eric Hameleers <alien@slackware.com>
+# * Emergency update.
+# 101.0.4951.41-1: 28/apr/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M101.
+# 101.0.4951.54-1: 02/may/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 101.0.4951.64-1: 11/may/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 102.0.5005.61-1: 25/may/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M102.
+# 102.0.5005.115-1:10/jun/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 103.0.5060.53-1: 25/jun/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M103.
+# 103.0.5060.134-1:20/jul/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 104.0.5112.79-1: 02/aug/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M104.
+# 104.0.5112.101-1:17/aug/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 105.0.5195.52-1: 02/aug/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M105.
+# 105.0.5195.102-1:04/aug/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 105.0.5195.125-1:21/sep/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 106.0.5249.61-1: 28/sep/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M106.
+# 106.0.5249.91-1: 02/oct/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 106.0.5249.103-1:09/oct/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 106.0.5249.119-1:18/oct/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 107.0.5304.68-1: 26/oct/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M107.
+# 107.0.5304.87-1: 28/oct/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 107.0.5304.110-1: 09/nov/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 107.0.5304.121-1: 25/nov/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 108.0.5359.71-1: 02/dec/2022 by Eric Hameleers <alien@slackware.com>
+# * Update to M108.
+# 108.0.5359.94-1: 02/dec/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 108.0.5359.94-2: 06/dec/2022 by Eric Hameleers <alien@slackware.com>
+# * Fix undefined symbol "gbm_bo_get_modifier" on 14.2.
+# 108.0.5359.98-1: 08/dec/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 108.0.5359.124-1: 17/dec/2022 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 109.0.5414.74-1: 15/jan/2023 by Eric Hameleers <alien@slackware.com>
+# * Update to M109.
+# 109.0.5414.74-2: 17/jan/2023 by Eric Hameleers <alien@slackware.com>
+# * System libdrm on Slackware 14.2 is too old.
+# 109.0.5414.119-1: 25/jan/2023 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 110.0.5481.77-1: 09/feb/2023 by Eric Hameleers <alien@slackware.com>
+# * Update to M110.
+# 110.0.5481.100-1:15/feb/2023 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 110.0.5481.177-1:26/feb/2023 by Eric Hameleers <alien@slackware.com>
+# * Update.
+#
+# -----------------------------------------------------------------------------
+#
+# Run 'sh chromium.SlackBuild' to build a Slackware package.
+# The package (.txz) and .txt file as well as build logs are created in /tmp .
+# Install it using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+# Build an ungoogled chromium package (default no):
+USE_UNGOOGLED=${USE_UNGOOGLED:-0}
+
+# Build a development version of chromium (default no):
+USE_DEV=${USE_DEV:-0}
+
+[ ${USE_DEV} -ne 0 ] && SRCEXT="-dev" || SRCEXT=""
+[ ${USE_UNGOOGLED} -ne 0 ] && SRCEXT="${SRCEXT}-ungoogled"
+
+# -----------------------------------------------------------------------------
+
+SRCNAM=chromium
+PRGNAM=${SRCNAM}${SRCEXT} # chromium, chromium-dev, chromium-ungoogled, etc
+VERSION=${VERSION:-110.0.5481.177}
+UNGOOGLED=${UNGOOGLED:-110.0.5481.177-1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-alien}
+
+# Cross-compiling 32bit binaries on 64bit Slackware; set to "YES":
+CROSS32=${CROSS32:-"NO"}
+
+# Debug build (disabled by default):
+USE_DEBUG=${USE_DEBUG:-0}
+
+# Differentiate between stable and development releases:
+if [ $USE_DEV -ne 0 ]; then
+ CRFLAGS="CHROMIUM_DEV_FLAGS"
+ CRUSERFLAGS="CHROMIUM_DEV_USER_FLAGS"
+elif [ $USE_UNGOOGLED -ne 0 ]; then
+ CRFLAGS="CHROMIUM_UNGOOGLED_FLAGS"
+ CRUSERFLAGS="CHROMIUM_UNGOOGLED_USER_FLAGS"
+else
+ CRFLAGS="CHROMIUM_FLAGS"
+ CRUSERFLAGS="CHROMIUM_USER_FLAGS"
+fi
+
+# If pulseaudio is installed we support it unless you explicitly disable it:
+if /usr/bin/pkg-config --exists libpulse 2>/dev/null ; then
+ USE_PA=${USE_PA:-1}
+else
+ USE_PA=${USE_PA:-0}
+fi
+
+# Build Chromium using a debian sysroot for Slackware 14.2 or older;
+# FYI, this will actually also just work for Slackware > 14.2:
+if [ $(cat /etc/slackware-version |cut -d' ' -f2- |cut -d. -f1) -lt 15 ]; then
+ USE_SYSROOT=${USE_SYSROOT:-1}
+else
+ USE_SYSROOT=${USE_SYSROOT:-0}
+fi
+# When using a sysroot, we also use its internal libffi:
+USE_INTFFI=${USE_SYSROOT}
+
+# Enable Wayland on Slackware 15.0 & newer where we don't use a debian sysroot.
+if /usr/bin/pkg-config --exists wayland-client 2>/dev/null ; then
+ if [ ${USE_SYSROOT} -eq 0 ]; then
+ USE_WAYLAND=${USE_WAYLAND:-1}
+ else
+ USE_WAYLAND=${USE_WAYLAND:-0}
+ fi
+else
+ USE_WAYLAND=${USE_WAYLAND:-0}
+fi
+
+# Enable Qt UI on Slackware 15.0 & newer where we do not need a debian sysroot.
+# Until Chromium 110, enable Qt5 UI using param '--enable-features=AllowQt':
+if pkg-config --exists "Qt5Core >= 5.15.3" ; then
+ if [ ${USE_SYSROOT} -eq 0 ]; then
+ USE_QT=${USE_QT:-1}
+ else
+ USE_QT=${USE_QT:-0}
+ fi
+else
+ USE_QT=${USE_QT:-0}
+fi
+
+# By default the ffmpeg and other component libraries are built statically
+# into the chromium binary. This takes more time at the linking stage but
+# will speed up the browser's startup.
+# You can instead build shared libraries, among which will be libffmpeg.so
+# (formerly libffmpegsumo.so) if you want to be able to swap the libffmpeg.so
+# library for someone else's library with more features:
+SHARED_FFMPEG=${SHARED_FFMPEG:-false} # other option is 'true'
+
+# The branding determines what (proprietary) codec support will be added:
+FFMPEG_BRANDING=${FFMPEG_BRANDING:-ChromeOS} # or "Chrome", or "Chromium"
+
+# HEVC support. Set to '0' to disable, '1' to enable:
+FFMPEG_HEVC=${FFMPEG_HEVC:-1}
+
+# Use the clang compiler. Results in faster build and smaller binaries.
+# This default to "1" (on) because gcc support is getting stale
+# and the gcc of Slackware 14.2 is already too old.
+# You will have to download and apply lots of patches when using gcc anyway.
+# This script can compile google's modified clang from source, so that 32bit
+# can be supported on older Slackware (Google offers only 64bit pre-built
+# clang for download0:
+USE_CLANG=${USE_CLANG:-1}
+
+# Build a custom clang or use the system clang?
+# CLANG_MIN is the minimal clang version needed to compile chromium,
+# see 'CLANG_REVISION' and 'RELEASE_VERSION' in tools/clang/scripts/update.py :
+CLANG_MIN=16
+if [ $(clang -dumpversion |cut -d. -f1) -ge ${CLANG_MIN} ]; then
+ BUILD_CLANG=${BUILD_CLANG:-0}
+else
+ BUILD_CLANG=${BUILD_CLANG:-1}
+fi
+
+# If you don't want to enable support for Widevine CDM
+# (content decryption module) say "0" here.
+USE_CDM=${USE_CDM:-1}
+
+# Chromium supports VAAPI (we disable it when the platform is not capable):
+USE_VAAPI=${USE_VAAPI:-1}
+
+# Building Chromium against the system libstdc++ requires additional patches.
+# Luckily, https://github.com/stha09/chromium-patches maintains a patch set.
+USE_SYSCXX=${USE_SYSCXX:-1}
+
+# If you are OK with the "OK Google" hotwording feature which will
+# automatically download a binary blob with proprietary code, set this to "1".
+# Some people object to a download without consent so it is disabled by default:
+USE_HOTWORD=${USE_HOTWORD:-0}
+
+DOCS="AUTHORS BUILD.gn CODE_OF_CONDUCT.md DEPS LICENSE* OWNERS WATCHLISTS README*"
+
+# Where do we look for sources?
+SRCDIR=$(cd $(dirname $0); pwd)
+
+# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
+TMP=${TMP:-/tmp/build}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Visible directory listing of anything Chrome related is:
+# http://gsdview.appspot.com/
+# Official location (non-browsable) of the above is:
+# https://commondatastorage.googleapis.com/
+
+# This package used to be built with Alien's Google API keys for Chromium.
+# The keys must be present in the file "chromium_apikeys".
+# If you rebuild this package, you can use your own API keys. See:
+# http://www.chromium.org/developers/how-tos/api-keys
+# This browser is now compiled without API keys. This will disable stuff like
+# browser sync and other functionality which accesses Google APIs.
+# The following variables must be set to access Google's public APIs:
+# _google_api_key
+# _google_default_client_id
+# _google_default_client_secret
+_google_api_key=""
+_google_default_client_id=""
+_google_default_client_secret=""
+if [ ${USE_UNGOOGLED} -eq 0 ]; then
+ if [ -f ${HOME}/.chromium_apikeys ]; then
+ . ${HOME}/.chromium_apikeys
+ elif [ -f ${SRCDIR}/chromium_apikeys ]; then
+ . ${SRCDIR}/chromium_apikeys
+ fi
+ if [ -z "$_google_api_key" ]; then
+ cat <<EOT
+No values were supplied for the following variables:
+ _google_api_key
+ _google_default_client_id
+ _google_default_client_secret
+You can supply your own Google API keys and compile them into Chromium now.
+Else you can always provide Google API keys at runtime through the environment.
+To achieve that, create '/etc/${PRGNAM}/01-apikeys.conf' as root:
+ # echo "export GOOGLE_API_KEY='yourkey'" >> /etc/${PRGNAM}/01-apikeys.conf
+ # echo "export GOOGLE_DEFAULT_CLIENT_ID='yourclientid'" >> /etc/${PRGNAM}/01-apikeys.conf
+ # echo "export GOOGLE_DEFAULT_CLIENT_SECRET='yourclientsecret'" >> /etc/${PRGNAM}/01-apikeys.conf
+
+Press Ctrl-C to abort this script and add your own Google API keys,
+or wait 10 seconds to continue compilation without adding keys.
+
+EOT
+ sleep 10
+ fi
+fi
+
+##
+## --- with a little luck, you won't have to edit below this point --- ##
+##
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7*) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+case "$ARCH" in
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
+ # Fix for using lld while linking chromium in a 32bit chroot:
+ SLKLDFLAGS="-Wl,-z,notext"; LIBDIRSUFFIX=""
+ DSSE="1"
+ FFMPEG_ARCH="ia32"
+ SYSROOT_ARCH="i386"
+ SYSROOT_TARGET="i386-linux-gnu"
+ PKGARCH="$ARCH"
+ ;;
+ x86_64) # Ensure that 32bit libraries are found first if we cross-compile:
+ if [ "${CROSS32}" = "YES" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS="-L/usr/lib"; LIBDIRSUFFIX=""
+ FFMPEG_ARCH="ia32"
+ SYSROOT_ARCH="i386"
+ SYSROOT_TARGET="i386-linux-gnu"
+ PKGARCH="i586"
+ else
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ FFMPEG_ARCH="x64"
+ SYSROOT_ARCH="amd64"
+ SYSROOT_TARGET="x86_64-linux-gnu"
+ PKGARCH="$ARCH"
+ fi
+ #DSSE="0"
+ DSSE="1"
+ ;;
+ armv7*) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+ SLKLDFLAGS="-Wl,-z,notext"; LIBDIRSUFFIX=""
+ DSSE="1"
+ # Widevine not supported (no binary library available):
+ USE_CDM=0
+ # VAAPI not supported:
+ USE_VAAPI=0
+ FFMPEG_ARCH="arm"
+ SYSROOT_ARCH="arm"
+ SYSROOT_TARGET="arm-linux-gnueabihf"
+ PKGARCH="$ARCH"
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ DSSE="1"
+ # Widevine not supported by default:
+ USE_CDM=0
+ # VAAPI not supported by default:
+ USE_VAAPI=0
+ FFMPEG_ARCH="$ARCH"
+ SYSROOT_ARCH="$ARCH"
+ SYSROOT_TARGET="$ARCH-linux-gnu"
+ PKGARCH="$ARCH"
+ ;;
+esac
+
+case "$ARCH" in
+ armv7*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ arm*) TARGET=${SYSROOT_ARCH}-slackware-linux-gnueabihf ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
+# Source locations:
+SOURCE[0]="$SRCDIR/${SRCNAM}-${VERSION}.tar.xz"
+SRCURL[0]="https://commondatastorage.googleapis.com/${SRCNAM}-browser-official/${SRCNAM}-${VERSION}.tar.xz"
+
+SOURCE[1]="$SRCDIR/widevine-versions.txt"
+SRCURL[1]="https://dl.google.com/widevine-cdm/versions.txt"
+
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ SOURCE[2]="$SRCDIR/ungoogled-chromium-${UNGOOGLED}.tar.gz"
+ SRCURL[2]="https://github.com/Eloston/ungoogled-chromium/archive/${UNGOOGLED}.tar.gz"
+ #SRCURL[2]="https://github.com/tangalbert919/ungoogled-chromium/archive/${UNGOOGLED}.tar.gz"
+fi
+
+# Create working directories:
+mkdir -p $OUTPUT # place for the package to be saved
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # always erase old package's contents
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+rm -rf $OUTPUT/{configure,make,install,error,makepkg,patch}-$PRGNAM.log
+ # remove old log files
+
+# Source file availability:
+for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
+ if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi
+ if ! [ "x${SRCURL[$i]}" == "x" ]; then
+ echo "Will download file to $(dirname $SOURCE[$i])"
+ wget --no-check-certificate -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
+ echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build."
+ mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
+ exit 1
+ fi
+ else
+ echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
+ exit 1
+ fi
+ fi
+done
+
+if [ "$P1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
+fi
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+cd $TMP/tmp-$PRGNAM
+echo "Extracting the source archive(s) for $PRGNAM..."
+tar -xf ${SOURCE[0]}
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ tar -xf ${SOURCE[2]}
+fi
+cd ${SRCNAM}-${VERSION}
+
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ # Give chromium-ungoogled our own Slackware grey logo:
+ for size in 16 32 ; do
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/default_200_percent/chromium/product_logo_$size.png
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/default_100_percent/chromium/product_logo_$size.png
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/default_100_percent/chromium/linux/product_logo_$size.png
+ done
+ for size in 24 48 64 128 256; do
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/chromium/product_logo_$size.png
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/chromium/linux/product_logo_$size.png
+ done
+ for size in 32 ; do
+ convert ${SRCDIR}/${PRGNAM}.png -resize ${size}x${size} \
+ chrome/app/theme/chromium/linux/product_logo_$size.xpm
+ done
+fi
+
+if [ ${USE_SYSROOT} -eq 1 ]; then
+ # Download a sysroot image:
+ echo "-- Downloading sysroot image."
+ python3 build/linux/sysroot_scripts/install-sysroot.py --arch=${SYSROOT_ARCH}
+fi
+
+# For chromium >= 102, download a specific build.py which allows us to
+# compile our 32bit package successfully:
+if [ ${VERSION%%.*} -ge 102 ]; then
+ wget --no-check-certificate -O - https://raw.githubusercontent.com/chromium/chromium/ad35291af36d609042e1d320adb1568daafef9a8/tools/clang/scripts/build.py > tools/clang/scripts/build.py
+fi
+
+# Allow building against system libraries in official builds:
+sed -e 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+ -i tools/generate_shim_headers/generate_shim_headers.py
+
+# Patches and bug fixes:
+touch $OUTPUT/patch-${PRGNAM}.log
+# https://github.com/protocolbuffers/protobuf/issues/9792
+cat $SRCDIR/patches/chromium_protobuf_32bit.patch \
+ | patch -p0 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+
+# Be compatible with gcc 10:
+cat $SRCDIR/patches/chromium_gcc10.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Fix the link on 32bit:
+sed -e '/ldflags /s/-m32/&", "-Wl,-z,notext/' \
+ -i build/config/compiler/BUILD.gn \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+if [ "$ARCH" == "i586" ] ; then
+ # Don't complain about unsupported flags when we add
+ # "--disable-seccomp-sandbox" on 32bit OS:
+ cat $SRCDIR/patches/chromium_slax_nobadflagsmessage.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
+
+if [ ${USE_SYSCXX} -eq 1 ]; then
+ echo "-- Compiling against system libstdc++"
+ # Apply patches from https://github.com/stha09/chromium-patches
+ # to be able to compile Chromium against our GCC's libstdc++:
+ cat $SRCDIR/patches/chromium-103-VirtualCursor-std-layout.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+ cat $SRCDIR/patches/chromium-110-NativeThemeBase-fabs.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+ cat $SRCDIR/patches/chromium-110-CredentialUIEntry-const.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+ cat $SRCDIR/patches/chromium-110-InProgressDownloadManager-include.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+ cat $SRCDIR/patches/chromium-110-DarkModeLABColorSpace-pow.patch \
+ | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
+
+# Prevent an error 'Looking for xmlReadMemory - not found ' building clang:
+sed \
+ -i tools/clang/scripts/build.py \
+ -e "s%'lib', 'libxml2.a'%'lib$LIBDIRSUFFIX', 'libxml2.a'%"
+sed \
+ -i third_party/libxml/src/libxml2-config.cmake.in \
+ -e 's%set(LIBXML2_LIBRARY_DIR *${_libxml2_rootdir}/lib%&'${LIBDIRSUFFIX}'%'
+
+## Fix a compilation error because we enable HEVC but are not ChromeOS:
+#cat $SRCDIR/patches/chromium_hevc_non_chromeos.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Slackware specific:
+# When compiling google's clang on 32bit Slackware or on ARM, add our triplets.
+# I am a python noob so this is clumsy, better implementation is welcome :-)
+cp $SRCDIR/patches/clang.toolchains.slackware.triple.diff .
+cat $SRCDIR/patches/chromium_slackware_triplet.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Don't crap out when gzip does not support '--rsyncable' (Slackware < 14.2):
+if ! gzip --help |grep -q rsyncable ; then
+ cat $SRCDIR/patches/chromium_no_rsyncable.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
+if [ $FFMPEG_HEVC -eq 1 ]; then
+ # Add essential proprietary codecs to the "chrome" branding of ffmpeg:
+ cat $SRCDIR/patches/chromium_ffmpeg_prop.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
+
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ # Apply ungoogled-chromium patch kit:
+ UGDIR=$TMP/tmp-$PRGNAM/ungoogled-chromium-${UNGOOGLED}
+ echo "-- Un-googling internal binaries:"
+ python3 ${UGDIR}/utils/prune_binaries.py ./ ${UGDIR}/pruning.list
+ echo "-- Un-googling sources; apply patches:"
+ python3 ${UGDIR}/utils/patches.py apply ./ ${UGDIR}/patches
+ # We will have to un-google internally used domain list later.
+fi
+
+# Also needed for Slackware <= 14.2:
+if [ $(LC_ALL=C gcc -dumpversion |cut -d. -f1) -eq 4 ]; then
+ cat $SRCDIR/patches/chromium56_gcc4.patch | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
+
+# When compiling google's clang, we want 32bit too - don't limit us, devs:
+sed -i tools/clang/scripts/build.py -e "s/x86_64-unknown-linux-gnu/$TARGET/g"
+
+# And fix the 32bit compilation while we are at it:
+sed -i tools/clang/scripts/build.py -e "s/ldflags = \[\]/ldflags = \['-latomic'\]/"
+
+## Avoid failure because the built clang version is not what update.py expects:
+#sed -i tools/clang/scripts/update.py -e "s/RELEASE_VERSION = '16'/RELEASE_VERSION = '16.0.0'/"
+cat $SRCDIR/patches/chromium_clang_versiondetect.patch | patch -p0 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+
+# Fix "unable to find library -l:libffi_pic.a":
+cat $SRCDIR/patches/chromium_libffi_pic.patch | patch -p0 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+
+# ARM platform specifics:
+if [[ "$ARCH" =~ arm.* ]]; then
+ # Fix the hard-coded bootstrap target 'X86':
+ sed -i tools/clang/scripts/build.py \
+ -e "s/bootstrap_targets = 'X86'/bootstrap_targets = 'ARM'/"
+
+ # Compile only the relevant back-ends (ARM, AArch64 and X86):
+ sed -i tools/clang/scripts/build.py \
+ -e "s/\(^ *targets = \).*$/&1'ARM;X86;AArch64'/"
+fi
+
+# When compiling google's clang, use the system cmake
+# (prebuilt binary from google is only available as 64bit):
+sed -i tools/clang/scripts/build.py -e 's/^ *AddCMakeToPath/#&/'
+
+# We require a 32bit gn binary, devs!
+sed -i BUILD.gn \
+ -e 's/target_os != "linux" || /target_os == "linux" || /'
+
+# Prevent a build failure (yes, 'x64' even on 32bit Slackware):
+mkdir -p third_party/node/linux/node-linux-x64/bin
+ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
+ln -s /usr/lib${LIBDIRSUFFIX}/java/bin/java third_party/jdk/current/bin/
+
+if [ "$PRGNAM" != "$SRCNAM" ]; then
+ # Save configuration in ~/.config/$PRGNAM:
+ sed -e 's|filename = "chromium-browser|&'$SRCEXT'|' \
+ -e 's|confdir = "chromium|&'$SRCEXT'|' \
+ -i chrome/BUILD.gn
+ sed -e 's|data_dir_basename = "chromium|&'$SRCEXT'|' \
+ -e 's|config_dir.Append("chromium|&'$SRCEXT'|' \
+ -i chrome/common/chrome_paths_linux.cc
+ if [ -f chrome/browser/web_applications/external_web_app_manager.cc ]; then
+ sed -e 's|/etc/chromium|&'$SRCEXT'|' \
+ -e 's|/usr/share/chromium|&'$SRCEXT'|' \
+ -i chrome/browser/web_applications/external_web_app_manager.cc
+ else
+ sed -e 's|/etc/chromium|&'$SRCEXT'|' \
+ -e 's|/usr/share/chromium|&'$SRCEXT'|' \
+ -i chrome/browser/web_applications/preinstalled_web_app_manager.cc
+ fi
+ sed -e 's|/etc/chromium|&'$SRCEXT'|' \
+ -e 's|/usr/share/chromium|&'$SRCEXT'|' \
+ -i chrome/common/chrome_paths.cc
+ sed -e 's|/etc/chromium|&'$SRCEXT'|' \
+ -i components/policy/tools/template_writers/writer_configuration.py
+fi
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a+X-s .
+
+echo Building ...
+
+[ ${USE_CLANG} -eq 1 ] && do_clang=true || do_clang=false
+[ ${BUILD_CLANG} -eq 1 ] && do_custclang=true || do_custclang=false
+[ ${USE_CDM} -eq 1 ] && do_cdm=true || do_cdm=false
+[ ${USE_HOTWORD} -eq 1 ] && do_hotword=true || do_hotword=false
+[ ${USE_INTFFI} -eq 1 ] && do_syslibffi=false || do_syslibffi=true
+[ ${USE_PA} -eq 1 ] && do_pa=true || do_pa=false
+[ ${USE_QT} -eq 1 ] && do_qt=true || do_qt=false
+[ ${USE_SYSCXX} -eq 1 ] && do_custcxx=false || do_custcxx=true
+[ ${USE_SYSROOT} -eq 1 ] && do_sysroot=true || do_sysroot=false
+[ ${USE_VAAPI} -eq 1 ] && do_vaapi=true || do_vaapi=false
+[ ${USE_WAYLAND} -eq 1 ] && do_wayland=true || do_wayland=false
+[ ${FFMPEG_HEVC} -eq 1 ] && do_hevc=true || do_hevc=false
+
+export LDFLAGS="$SLKLDFLAGS"
+export CXXFLAGS="$SLKCFLAGS -Wno-unknown-warning-option"
+export CFLAGS="$SLKCFLAGS -Wno-unused-local-typedefs -Wno-unknown-warning-option"
+export PATH="$TMP/tmp-$PRGNAM/privatebin:$PATH"
+
+# After building gn, run:
+# "./out/Release/gn args out/Release --list"
+# for a list of all variables.
+_chromium_conf=(
+ 'blink_enable_generated_code_formatting=false'
+ 'blink_symbol_level=0'
+ "enable_hevc_parser_and_hw_decoder=${do_hevc}"
+ "enable_platform_hevc=${do_hevc}"
+ "enable_platform_hevc_decoding=${do_hevc}"
+ "enable_platform_encrypted_hevc=${do_hevc}"
+ 'enable_platform_ac3_eac3_audio=true'
+ 'enable_platform_mpeg_h_audio=true'
+ 'enable_platform_dolby_vision=true'
+ 'enable_mse_mpeg2ts_stream_parser=true'
+ 'enable_precompiled_headers=false'
+ 'enable_pseudolocales=false'
+ 'enable_webrtc=true'
+ 'fatal_linker_warnings=false'
+ "ffmpeg_branding=\"${FFMPEG_BRANDING}\""
+ "is_clang=${do_clang}"
+ #"llvm_force_head_revision=${do_clang}"
+ 'is_debug=false'
+ "is_component_build=${SHARED_FFMPEG}"
+ "is_component_ffmpeg=${SHARED_FFMPEG}"
+ "link_pulseaudio=${do_pa}"
+ "linux_sandbox_path=\"/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_sandbox\""
+ #'linux_strip_binary=true'
+ 'linux_use_bundled_binutils=false'
+ "ozone_platform_wayland=${do_wayland}"
+ "rtc_use_pipewire=${do_wayland}"
+ "rtc_link_pipewire=${do_wayland}"
+ 'proprietary_codecs=true'
+ 'remove_webcore_debug_symbols=true'
+ 'symbol_level=0'
+ 'treat_warnings_as_errors=false'
+ "usb_ids_path=\"/usr/share/hwdata/usb.ids\""
+ 'use_allocator="none"'
+ 'use_bundled_fontconfig=false'
+ 'use_cfi_icall=false' # https://crbug.com/866290
+ 'use_cups=true'
+ "use_custom_libcxx=${do_custcxx}"
+ 'use_gconf=false'
+ 'use_kerberos=false'
+ 'use_lld=true'
+ 'use_ozone=true'
+ "use_pulseaudio=${do_pa}"
+ "use_system_libffi=${do_syslibffi}"
+ 'use_system_minigbm=false'
+ "use_qt=${do_qt}"
+ "use_sysroot=${do_sysroot}"
+ "use_vaapi=${do_vaapi}"
+ "use_xkbcommon=${do_wayland}"
+ "enable_wayland_server=${do_wayland}"
+ "extra_cxxflags=\"${CXXFLAGS}\""
+ "extra_ldflags=\"${LDFLAGS}\""
+)
+# Needed for Ungoogled Chromium 94 to prevent compile error related to
+# missing pref 'kGoogleServicesConsentedToSync' because 'is_debug=false' seems
+# to no longer suffice. Also, need to reduce crash proneness according to
+# https://groups.google.com/a/chromium.org/g/chromium-packagers/c/2E5AayFuFt4 :
+_chromium_conf+=(
+ 'is_official_build=true'
+ 'dcheck_always_on=false'
+)
+# Prevent segfaults with llvm-12.0.1 (Chromium 94), thanks Void Linux:
+_chromium_conf+=(
+ 'is_cfi=false'
+ 'use_thin_lto=false'
+ 'use_cfi_icall=false'
+ 'chrome_pgo_phase=0'
+)
+if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 0 ]; then
+ # Use system toolchain:
+ _chromium_conf+=(
+ 'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+ 'host_toolchain="//build/toolchain/linux/unbundle:default"'
+ )
+fi
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ # Add ungoogled flags if requested:
+ readarray -t -O ${#_chromium_conf[@]} _chromium_conf < ${UGDIR}/flags.gn
+else
+ # Add remainder of standard chromium flags:
+ # https://chromium.googlesource.com/chromium/src/+/refs/heads/main/testing/variations/README.md
+ _chromium_conf+=(
+ "clang_use_chrome_plugins=${do_custclang}"
+ 'enable_hangout_services_extension=true'
+ "enable_hotwording=${do_hotword}"
+ 'enable_js_type_check=true'
+ 'enable_nacl=false'
+ 'enable_nacl_nonsfi=false'
+ 'enable_pepper_cdms=true'
+ "enable_widevine=${do_cdm}"
+ 'exclude_unwind_tables=true'
+ 'disable_fieldtrial_testing_config=true'
+ 'logging_like_official_build=true'
+ )
+fi
+# Add Google API key if defined:
+if [ -n "$_google_api_key" ]; then
+ _chromium_conf+=(
+ "google_api_key=\"$_google_api_key\""
+ )
+ # Also add client id/secret if it was provided:
+ if [ -n "$_google_default_client_id" ]; then
+ _chromium_conf+=(
+ "google_default_client_id=\"$_google_default_client_id\""
+ "google_default_client_secret=\"$_google_default_client_secret\""
+ )
+ fi
+fi
+
+if [ $(cat /etc/slackware-version |cut -d' ' -f2- |cut -d. -f1) -lt 15 ]; then
+ # For older Slackware:
+ _chromium_conf+=( 'use_system_libdrm=false' )
+fi
+
+#if [ "$ARCH" == "i586" ] || [ "${CROSS32}" = "YES" ]; then
+# _chromium_conf+=( 'target_cpu="x86"' )
+#fi
+if [[ "$ARCH" =~ arm.* ]]; then
+ _chromium_conf+=( 'target_cpu="arm"' 'target_os="linux"' )
+fi
+
+ # Change this back when CRBUG 592268 is fixed (error during final link:
+ # undefined reference to `base::i18n::GetRawIcuMemory())
+ # See https://bugs.chromium.org/p/chromium/issues/detail?id=592268
+ # icu_use_data_file_flag=false
+
+## The array of possible replacements of embedded with system libraries is
+## found in 'build/linux/unbundle/replace_gn_files.py':
+#gn_system_libraries=(
+# # 'bzip2'
+# # 'ffmpeg'
+# # 'flac'
+# # 'freetype2'
+# # 'harfbuzz'
+# # 'icu'
+# # 'libdrm'
+# # 'libevent'
+# # 'libjpeg'
+# # 'libpng'
+# # 'libvpx'
+# # 'libwebp'
+# # 'libxml'
+# # 'libxslt'
+# # 'opus'
+# # 're2'
+# # 'snappy'
+# # 'zlib'
+# )
+#
+## Unbundle the libraries which we use from the system.
+## (taken from Arch Linux:)
+## This *should* do what the remove_bundled_libraries.py script does,
+## with the added benefit of not having to list all the remaining libraries:
+#echo "-- Unbundling system libraries from $PRGNAM sources."
+#for ULIB in ${gn_system_libraries[@]}; do
+# find -type f -path "*third_party/$ULIB/*" \
+# \! -path "*third_party/$ULIB/chromium/*" \
+# \! -path "*third_party/$ULIB/google/*" \
+# \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
+# \! -regex '.*\.\(gn\|gni\|isolate\)' \
+# -delete
+#done
+#
+## Change bundled libraries to system ones:
+#echo "-- Change bundled to system libraries in $PRGNAM sources."
+#python3 build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries[@]}
+#
+
+# Do not make the build fail, see Chromium issue #386097:
+python3 third_party/libaddressinput/chromium/tools/update-strings.py \
+ 2>&1 | tee $OUTPUT/update_strings-${PRGNAM}.log
+
+# Use usb.ids at run time instead of compiling it in:
+sed -i services/device/public/cpp/usb/BUILD.gn \
+ -e 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g'
+
+# Do not make the build fail, see https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion :
+touch chrome/test/data/webui/i18n_process_css_test.html
+
+# Do not make the build fail:
+if [ ! -f chrome/test/data/webui_test_resources.grd ]; then
+cat <<EOF >chrome/test/data/webui_test_resources.grd
+<?xml version="1.0" encoding="UTF-8"?>
+<grit latest_public_release="0" current_release="1">
+ <outputs>
+ <output filename="chrome/test/data/grit/webui_test_resources.h" type="rc_header">
+ <emit emit_type='prepend'></emit>
+ </output>
+ <output filename="webui_test_resources.pak" type="data_package" />
+ </outputs>
+ <release seq="1">
+ </release>
+</grit>
+EOF
+fi
+
+if [ ${USE_SYSROOT} -eq 1 ]; then
+ # Take care of Debian/Ubuntu related missing header issues:
+ SYSROOTDIR=$(basename $(ls build/linux/ |grep ${SYSROOT_ARCH}-sysroot))
+
+ ln -s ../../lib/${SYSROOT_TARGET}/glib-2.0/include/glibconfig.h \
+ build/linux/${SYSROOTDIR}/usr/include/glib-2.0/glibconfig.h
+ ln -s ../../../lib/${SYSROOT_TARGET}/dbus-1.0/include/dbus/dbus-arch-deps.h \
+ build/linux/${SYSROOTDIR}/usr/include/dbus-1.0/dbus/dbus-arch-deps.h
+ ln -s ../../lib/${SYSROOT_TARGET}/graphene-1.0/include/graphene-config.h \
+ build/linux/${SYSROOTDIR}/usr/include/graphene-1.0/graphene-config.h
+
+ # Take care of Debian/Ubuntu related linker issues:
+ #echo "/usr/lib/${SYSROOT_TARGET}/nss" >> \
+ # build/linux/${SYSROOTDIR}/etc/ld.so.conf.d/${SYSROOT_TARGET}.conf
+ for SOFILE in build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/nss/*.so ;
+ do
+ ln -sf nss/$(basename $SOFILE) \
+ build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/
+ done
+ ln -s libsqlite3.so.0 \
+ build/linux/${SYSROOTDIR}/usr/lib/${SYSROOT_TARGET}/libsqlite3.so
+
+ # The platform-specific alias for the ARM readelf binary is missing
+ # from the debian sysroot image:
+ if [ ! -f build/linux/${SYSROOTDIR}/usr/bin/${SYSROOT_TARGET}-readelf ]; then
+ ln -s /usr/bin/readelf \
+ build/linux/${SYSROOTDIR}/usr/bin/${SYSROOT_TARGET}-readelf
+ fi
+fi
+
+# Do not make the build fail on stripping chromedriver,
+# because Chromium installs a 64bit version of eu-strip on the 32bit & ARM OS:
+if [ "$ARCH" != "x86_64" ]; then
+ if file $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/buildtools/third_party/eu-strip/bin/eu-strip 2>/dev/null | grep -q "ELF 64-bit" ; then
+ install -D -m0755 -t $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/buildtools/third_party/eu-strip/bin /usr/bin/eu-strip
+ fi
+fi
+
+# --- Compile --- #
+
+# Final link uses lots of file descriptors.
+ulimit -n 2048
+
+# Compile google's internal clang sources if needed
+if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then
+ # Build clang from source instead of downloading:
+ echo "-- Building google's clang toolchain."
+ HDR2REM=""
+ if [ "$ARCH" == "i586" ]; then
+ # Actually 32bit compilation fails by not finding 'bits/c++config.h'.
+ # I could only work around this using a kludge:
+ # cp -ia /usr/include/c++/$(gcc -dumpversion)/${TARGET}/bits/* /usr/include/c++/$(gcc -dumpversion)/bits/
+ # Keep a list of the symlinks we'll be creating:
+ for HDR in /usr/include/c++/$(gcc -dumpversion)/${TARGET}/bits/*.h ; do
+ if [ ! -f /usr/include/c++/$(gcc -dumpversion)/bits/$(basename $HDR) ];
+ then
+ ln -s $HDR /usr/include/c++/$(gcc -dumpversion)/bits/
+ HDR2REM="$(basename $HDR) $HDR2REM"
+ fi
+ done
+ fi
+ LDFLAGS="$LDFLAGS" \
+ python3 tools/clang/scripts/build.py \
+ --bootstrap \
+ --disable-asserts \
+ --gcc-toolchain /usr \
+ --host-cc /usr/bin/gcc \
+ --host-cxx /usr/bin/g++ \
+ --skip-checkout \
+ --use-system-cmake \
+ --without-android \
+ --without-fuchsia \
+ 2>&1 | tee $OUTPUT/clang_build-${PRGNAM}.log
+ #--llvm-force-head-revision \
+
+ # Building gn for Chromium 110 fails when this file is not present:
+ if [ ! -f third_party/llvm-build/Release+Asserts/cr_build_revision ]; then
+ CLANG_REVISION=$(grep ^CLANG_REVISION tools/clang/scripts/update.py |cut -d= -f2 |tr -d " '")
+ CLANG_SUB_REVISION=$(grep ^CLANG_SUB_REVISION tools/clang/scripts/update.py |cut -d= -f2 |tr -d " '")
+ echo "${CLANG_REVISION}-${CLANG_SUB_REVISION}" > third_party/llvm-build/Release+Asserts/cr_build_revision
+ fi
+
+ # Ensure that only this new clang is used, ignoring the system version:
+ MYCLANG_PATH="$TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/third_party/llvm-build/Release+Asserts/bin"
+ export PATH="$MYCLANG_PATH:$PATH"
+
+ # Package up this custom clang compiler so that next time, we can speed up
+ # the Chromium build:
+ if [ -f $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/third_party/llvm-build/Release+Asserts/bin/clang ]; then
+ if [ -f $SRCDIR/google-clang.build ]; then
+ source $SRCDIR/google-clang.build \
+ 2>&1 | tee $OUTPUT/clang_package-${PRGNAM}.log
+ fi
+ fi
+
+
+fi
+
+# For Chromium 92, disable ffmpeg re-configuration on 32bit OS,
+# to avoid linking errors like:
+# "FAILED: v8_context_snapshot_generator - ld.lld: error: undefined symbol: ff_psdsp_init_x86"
+if [ ${FFMPEG_HEVC} -eq 1 ] && [ "${FFMPEG_ARCH}" != "ia32" ]; then
+ echo "-- Re-configuring bundled ffmpeg..."
+ if [ ${FFMPEG_HEVC} -eq 1 ]; then
+ echo " +- Adding HEVC support..."
+ FFMPEG_CUSTOM_ARGS="--enable-decoder=hevc --enable-demuxer=hevc --enable-parser=hevc"
+ else
+ FFMPEG_CUSTOM_ARGS=""
+ fi
+ if [ "${FFMPEG_ARCH}" = "ia32" ]; then
+ # Re-configure bundled ffmpeg to make it compile on 32bit Slackware:
+ echo " +- Disabling assembler code..."
+ FFMPEG_CUSTOM_ARGS="${FFMPEG_CUSTOM_ARGS} --disable-asm"
+ fi
+ cd third_party/ffmpeg
+ ## To prevent error on x86_64:
+ ## "clang-5.0: error: invalid linker name in argument '-fuse-ld=lld'"
+ ## in third_party/ffmpeg/build.x64.linux/ChromeOS/ffbuild/config.log
+ #sed -e "s/--extra-ldflags=-fuse-ld=lld/--extra-ldflags=''/" \
+ # -i chromium/scripts/build_ffmpeg.py
+ # Actual reconfigure steps:
+ python3 chromium/scripts/build_ffmpeg.py linux ${FFMPEG_ARCH} \
+ --branding ${FFMPEG_BRANDING} -- ${FFMPEG_CUSTOM_ARGS} \
+ 2>&1 | tee $OUTPUT/ffmpeg_configure-${PRGNAM}.log
+ python3 chromium/scripts/copy_config.sh \
+ 2>&1 | tee -a $OUTPUT/ffmpeg_configure-${PRGNAM}.log
+ # Runs into 'SyntaxError: invalid syntax' with Python2:
+ python3 chromium/scripts/generate_gn.py \
+ 2>&1 | tee -a $OUTPUT/ffmpeg_configure-${PRGNAM}.log
+ cd - 2>/dev/null
+fi
+
+if [ ${USE_UNGOOGLED} -ne 0 ]; then
+ echo "-- Un-googling internally used domain list:"
+ python3 ${UGDIR}/utils/domain_substitution.py apply \
+ -r ${UGDIR}/domain_regex.list \
+ -f ${UGDIR}/domain_substitution.list \
+ -c domainsubcache.tar.gz ./
+fi
+
+# If gn is not installed we need to compile it ourselves:
+if ! which gn 1>/dev/null 2>/dev/null ; then
+ echo "-- Bootstrapping 'gn'."
+
+ if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then
+ # Symlink ld to lld to make gn linking stage succeed:
+ cd $MYCLANG_PATH ; ln -s lld ld ; cd - 1>/dev/null
+ fi
+
+ LDFLAGS="$LDFLAGS" python3 tools/gn/bootstrap/bootstrap.py \
+ 2>&1 | tee $OUTPUT/gnbootstrap-${PRGNAM}.log
+ #--use-custom-libcxx \
+
+ #if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then
+ # # Remove symlink again:
+ # rm $MYCLANG_PATH/ld
+ #fi
+fi
+
+if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then
+ if [ -n "$HDR2REM" ]; then
+ # Remove the temporary header symlinks we created earlier:
+ ( cd /usr/include/c++/$(gcc -dumpversion)/bits/ && rm $HDR2REM)
+ fi
+fi
+
+echo "-- Generating ninja build files."
+if ! which gn 1>/dev/null 2>/dev/null ; then
+ out/Release/gn gen out/Release -v --args="${_chromium_conf[*]}" \
+ 2>&1 | tee -a $OUTPUT/gngen-${PRGNAM}.log
+else
+ gn gen out/Release -v --args="${_chromium_conf[*]}" \
+ 2>&1 | tee -a $OUTPUT/gngen-${PRGNAM}.log
+fi
+
+# Compile everything:
+echo "-- Compiling the lot."
+
+if [ ${USE_CLANG} -eq 1 ] && [ ${BUILD_CLANG} -eq 1 ]; then
+ # Use the clang that we build in-tree instead of using the system version:
+ echo "-- Using our custom clang."
+ export CC="$MYCLANG_PATH/clang"
+ export CXX="$MYCLANG_PATH/clang++"
+ export LD="$MYCLANG_PATH/lld"
+ export AR="$MYCLANG_PATH/llvm-ar"
+ export NM="$MYCLANG_PATH/llvm-nm"
+elif [ "$USE_CLANG" = "0" ]; then
+ # Be careful not to override CC and CXX (may have been set by gcc5):
+ echo "-- Using gcc/g++ compilers."
+ export CC=${CC:-"gcc"}
+ export CXX=${CXX:-"g++"}
+else
+ # Use the system clang:
+ echo "-- Using the system clang."
+ export CC="/usr/bin/clang"
+ export CXX="/usr/bin/clang++"
+ export LD="/usr/bin/lld"
+ export AR="/usr/bin/llvm-ar"
+ export NM="/usr/bin/llvm-nm"
+fi
+export AS=as
+
+LDFLAGS="$LDFLAGS" \
+LC_ALL=C \
+ninja -C out/Release \
+ chrome chrome_sandbox chromedriver \
+ 2>&1 | tee $OUTPUT/ninja-${PRGNAM}.log
+
+if [ $USE_UNGOOGLED -eq 0 ] && [ ! -f out/Release/chrome_crashpad_handler ]
+then
+ # ungoogled-chromium has crash-reporting disabled:
+ LDFLAGS="$LDFLAGS" \
+ LC_ALL=C \
+ ninja -C out/Release \
+ chrome_crashpad_handler \
+ 2>&1 | tee -a $OUTPUT/ninja-${PRGNAM}.log
+fi
+
+# Manually install everything:
+echo "-- Manually installing everything."
+
+# The main binary:
+install -D out/Release/chrome $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/${PRGNAM}
+
+# The sandbox:
+install -D -m4755 -o root -g root out/Release/chrome_sandbox \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome-sandbox
+
+# The Chromium implementation of the WebDriver wire protocol
+# (automated testing of web apps):
+install -D out/Release/chromedriver $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver
+
+if [ $USE_UNGOOGLED -eq 0 ]; then
+ # Crashpad, the Chromium crash-reporting client:
+ install -D out/Release/chrome_crashpad_handler $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_crashpad_handler
+fi
+
+# Copy libraries:
+for CRLIB in {libEGL,libGLESv2,libVkICD_mock_icd,libVkLayer_khronos_validation,libminigbm,libvk_swiftshader}.so libvulkan.so.1
+ do
+ install -D -m0755 -o root -g root out/Release/$CRLIB \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/$CRLIB
+done
+install -D -m0755 -o root -g root out/Release/vk_swiftshader_icd.json \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/vk_swiftshader_icd.json
+
+# Copy over the remaining binaries:
+cp -a \
+ out/Release/angledata \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+# Un-googled chromium disables MEI Preload:
+if [ -d out/Release/MEIPreload ]; then
+ cp -a \
+ out/Release/MEIPreload \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+fi
+cp -a \
+ out/Release/*.pak \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+if [ -f out/Release/libffmpeg*.so ]; then
+ cp -a \
+ out/Release/libffmpeg*.so* \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+elif [ -f out/Release/lib/libffmpeg.so ]; then
+ mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/
+ cp -a \
+ out/Release/lib/libffmpeg.so* \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/
+fi
+if [ ${USE_QT} -eq 1 ]; then
+ cp -a \
+ out/Release/libqt5_shim.so \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+fi
+for BLOB in out/Release/{natives_blob.bin,snapshot_blob.bin,v8_context_snapshot.bin};
+do
+ if [ -f $BLOB ]; then
+ cp -a $BLOB $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+ fi
+done
+
+# Install appdata:
+mkdir -p $PKG/usr/share/metainfo
+if [ $USE_UNGOOGLED -eq 0 ]; then
+ # Remove text with relevance to Google only (thanks Arch):
+ sed -n \
+ -e "s/chromium-browser\.desktop/chromium-browser${SRCEXT}.desktop/" \
+ -e '/<update_contact>/d' \
+ -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
+ -e '/^<?xml/,$p' \
+ chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
+ > $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml
+elif [ -f $SRCDIR/${PRGNAM}.appdata.xml ]; then
+ # A customized un-googled version for this package:
+ cat $SRCDIR/${PRGNAM}.appdata.xml \
+ > $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml
+fi
+chmod 644 $PKG/usr/share/metainfo/${PRGNAM}.appdata.xml
+
+if [ $USE_DEBUG -eq 0 ]; then
+ # Manually strip binaries:
+ strip --strip-unneeded \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/{${PRGNAM},chrome-sandbox} \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver
+ strip --strip-unneeded \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/*.so
+ if [ $USE_UNGOOGLED -eq 0 ]; then
+ strip --strip-unneeded \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/chrome_crashpad_handler
+ fi
+ if [ -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/libffmpeg*.so ]; then
+ strip --strip-unneeded \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/lib/lib*.so
+ fi
+fi
+
+# Add locales:
+cp -a out/Release/locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+ln -s locales $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/remoting_locales
+
+# Add resource files:
+cp -a out/Release/resources $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+
+# This step used to be done for us, now we need to do it manually.
+# First, fix an incompatibility with the 'date' command in Slackware before 15.0:
+sed -e 's/--rfc-email/-R/g' \
+ -i $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/chrome/installer/linux/common/installer.include
+# We source this script since its 'process_template' function is needed,
+# in order to generate man page and desktop file:
+source $TMP/tmp-$PRGNAM/${SRCNAM}-${VERSION}/chrome/installer/linux/common/installer.include
+PACKAGE=${PRGNAM}
+PROGNAME=${PRGNAM}
+MENUNAME="${PRGNAM^} Web Browser"
+USR_BIN_SYMLINK_NAME=${PRGNAM}
+
+# Install a man page:
+process_template chrome/app/resources/manpage.1.in out/Release/${PRGNAM}.1
+install -D -m0644 out/Release/${PRGNAM}.1 $PKG/usr/man/man1/${PRGNAM}.1
+
+# Add a desktop file:
+process_template chrome/installer/linux/common/desktop.template \
+ out/Release/${PRGNAM}.desktop
+install -D -m0644 out/Release/${PRGNAM}.desktop \
+ $PKG/usr/share/applications/${PRGNAM}.desktop
+
+# Install desktop icons:
+for size in 16 32; do
+ install -D -m0644 \
+ chrome/app/theme/default_100_percent/chromium/product_logo_$size.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png
+ ln -s ${PRGNAM}.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png
+done
+for size in 24 48 64 128 256; do
+ install -D -m0644 \
+ chrome/app/theme/chromium/product_logo_$size.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/${PRGNAM}.png
+ ln -s ${PRGNAM}.png \
+ $PKG/usr/share/icons/hicolor/${size}x${size}/apps/chromium-browser${SRCEXT}.png
+done
+
+# Without this file, chromium refuses to start:
+cp -a out/Release/icudtl.dat $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/
+
+# Install a wrapper script:
+install -D -m0755 $SRCDIR/${SRCNAM}.sh $PKG/usr/bin/${PRGNAM}
+sed \
+ -e "s/@PRGNAM@/${PRGNAM}/g" \
+ -e "s/@SRCEXT@/${SRCEXT}/g" \
+ -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
+ -e "s/@CRFLAGS@/${CRFLAGS}/g" \
+ -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \
+ -i $PKG/usr/bin/${PRGNAM}
+
+# Make the chromedriver available in the $PATH :
+ln -s ../lib${LIBDIRSUFFIX}/${PRGNAM}/chromedriver $PKG/usr/bin/chromedriver${SRCEXT}
+
+# xdg-utils looks for "chromium-browser" so symlink it to the wrapper:
+ln -s ${PRGNAM} $PKG/usr/bin/chromium-browser${SRCEXT}
+
+# Move the 'default' file into place.
+# This allows users to override command-line options:
+mkdir -p $PKG/etc/${PRGNAM}
+cat $SRCDIR/${SRCNAM}.default | sed \
+ -e "s/@PRGNAM@/${PRGNAM}/g" \
+ -e "s/@SRCEXT@/${SRCEXT}/g" \
+ -e "s/@CRFLAGS@/${CRFLAGS}/g" \
+ -e "s/@CRUSERFLAGS@/${CRUSERFLAGS}/g" \
+ -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
+ > $PKG/etc/${PRGNAM}/00-default.conf.new
+
+if [ $USE_UNGOOGLED -eq 0 ]; then
+ if [ -z "$_google_api_key" ]; then
+ # If the package was built without an API key, install the sample file:
+ cat $SRCDIR/${SRCNAM}.apikeys.sample \
+ > $PKG/etc/${PRGNAM}/01-apikeys.conf.new
+ else
+ # Else add it to the docs:
+ mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION}
+ cat $SRCDIR/${SRCNAM}.apikeys.sample \
+ > $PKG/usr/doc/${PRGNAM}-${VERSION}/01-apikeys.conf
+ fi
+fi
+
+# Add this to the doinst.sh:
+mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+# Handle the incoming configuration files:
+config() {
+ for infile in \$1; do
+ NEW="\$infile"
+ OLD="\`dirname \$NEW\`/\`basename \$NEW .new\`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\`cat \$OLD | md5sum\`" = "\`cat \$NEW | md5sum\`" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+ done
+}
+
+config etc/${PRGNAM}/00-default.conf.new
+
+# Update the desktop database:
+if [ -x usr/bin/update-desktop-database ]; then
+ chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1
+fi
+
+# Update hicolor theme cache:
+if [ -d usr/share/icons/hicolor ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
+ fi
+fi
+
+# Update the mime database:
+if [ -x usr/bin/update-mime-database ]; then
+ chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+EOINS
+
+if [ -z "$_google_api_key" ] && [ $USE_UNGOOGLED -eq 0 ]; then
+ echo "config etc/${PRGNAM}/01-apikeys.conf.new" >> $PKG/install/doinst.sh
+fi
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/patches
+cp -a $SRCDIR/patches/*.{diff,patch} $PKG/usr/doc/$PRGNAM-$VERSION/patches/
+cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Add a package description:
+[ $USE_DEV -eq 0 ] && DEV_SPECIFICS="" \
+ || DEV_SPECIFICS=" This package contains the development version."
+[ $USE_UNGOOGLED -eq 0 ] && UG_SPECIFICS="" \
+ || UG_SPECIFICS=" This package contains the un-googled version."
+mkdir -p $PKG/install
+cat <<EOT >$PKG/install/slack-desc
+$PRGNAM: chromium (Open Source version of Chrome Web Browser)
+$PRGNAM:
+$PRGNAM: Chromium is the open-source project behind Google Chrome,
+$PRGNAM: an attempt at creating a safer, faster, and more stable browser.
+$PRGNAM:$DEV_SPECIFICS
+$PRGNAM:$UG_SPECIFICS
+$PRGNAM:
+$PRGNAM:
+$PRGNAM:
+$PRGNAM: chromium home: http://www.chromium.org/
+$PRGNAM:
+EOT
+
+# Build the package:
+cd $PKG
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
+cd -
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${PKGARCH}-${BUILD}${TAG}.txt
+
+# Restore the original umask:
+umask ${_UMASK_}