Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions tur-chromium/chromium-stable/0002-ubuntu-2404.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
https://github.com/chromium/chromium/commit/75fc93ec9b3a5c7398f80119cd28b5736ae609f2
https://github.com/chromium/chromium/commit/9f16b9e9b8cb1ea47de33b6c491c55c69d410620
https://github.com/chromium/chromium/commit/ec95ddd5c8ab54fa42e817049f09696bea8166ac

--- a/build/install-build-deps.py
+++ b/build/install-build-deps.py
@@ -148,7 +148,7 @@
distro_id = subprocess.check_output(["lsb_release", "--id",
"--short"]).decode().strip()

- supported_codenames = ["bionic", "focal", "jammy", "noble"]
+ supported_codenames = ["focal", "jammy", "noble"]
supported_ids = ["Debian"]

if (distro_codename() not in supported_codenames
@@ -156,11 +156,12 @@
print(
"WARNING: The following distributions are supported,",
"but distributions not in the list below can also try to install",
- "dependencies by passing the `--unsupported` parameter",
- "\tUbuntu 18.04 LTS (bionic with EoL April 2028)",
- "\tUbuntu 20.04 LTS (focal with EoL April 2030)",
- "\tUbuntu 22.04 LTS (jammy with EoL April 2032)",
- "\tUbuntu 24.04 LTS (noble with EoL June 2029)",
+ "dependencies by passing the `--unsupported` parameter.",
+ "EoS refers to end of standard support and does not include",
+ "extended security support.",
+ "\tUbuntu 20.04 LTS (focal with EoS April 2025)",
+ "\tUbuntu 22.04 LTS (jammy with EoS June 2027)",
+ "\tUbuntu 24.04 LTS (noble with EoS June 2029)",
"\tDebian 10 (buster) or later",
sep="\n",
file=sys.stderr,
@@ -332,7 +333,6 @@
# List of required run-time libraries
def lib_list():
packages = [
- "libasound2",
"libatk1.0-0",
"libatspi2.0-0",
"libc6",
@@ -399,7 +399,9 @@
elif package_exists("libffi6"):
packages.append("libffi6")

- if package_exists("libpng16-16"):
+ if package_exists("libpng16-16t64"):
+ packages.append("libpng16-16t64")
+ elif package_exists("libpng16-16"):
packages.append("libpng16-16")
else:
packages.append("libpng12-0")
@@ -420,12 +422,16 @@
if package_exists("libinput10"):
packages.append("libinput10")

- # Work around for dependency On Ubuntu 24.04 LTS (noble)
- if distro_codename() == "noble":
+ if package_exists("libncurses6"):
packages.append("libncurses6")
else:
packages.append("libncurses5")

+ if package_exists("libasound2t64"):
+ packages.append("libasound2t64")
+ else:
+ packages.append("libasound2")
+
return packages


@@ -478,8 +484,7 @@
pattern = re.compile(r"g\+\+-[0-9.]+-multilib")
packages += re.findall(pattern, lines)

- # Work around for 32-bit dependency On Ubuntu 24.04 LTS (noble)
- if distro_codename() == "noble":
+ if package_exists("libncurses6:i386"):
packages.append("libncurses6:i386")
else:
packages.append("libncurses5:i386")
@@ -613,37 +618,12 @@

# arm cross toolchain packages needed to build chrome on armhf
packages = [
+ "g++-arm-linux-gnueabihf",
+ "gcc-arm-linux-gnueabihf",
"libc6-dev-armhf-cross",
"linux-libc-dev-armhf-cross",
- "g++-arm-linux-gnueabihf",
]

- # Work around for dependency issue Ubuntu: http://crbug.com/435056
- if distro_codename() == "bionic":
- packages.extend([
- "g++-5-multilib-arm-linux-gnueabihf",
- "gcc-5-multilib-arm-linux-gnueabihf",
- "gcc-arm-linux-gnueabihf",
- ])
- elif distro_codename() == "focal":
- packages.extend([
- "g++-10-multilib-arm-linux-gnueabihf",
- "gcc-10-multilib-arm-linux-gnueabihf",
- "gcc-arm-linux-gnueabihf",
- ])
- elif distro_codename() == "jammy":
- packages.extend([
- "gcc-arm-linux-gnueabihf",
- "g++-11-arm-linux-gnueabihf",
- "gcc-11-arm-linux-gnueabihf",
- ])
- elif distro_codename() == "noble":
- packages.extend([
- "gcc-arm-linux-gnueabihf",
- "g++-13-arm-linux-gnueabihf",
- "gcc-13-arm-linux-gnueabihf",
- ])
-
return packages


@@ -709,12 +689,14 @@
else:
packages.append("libudev0:i386")

- # Work around for nacl dependency On Ubuntu 24.04 LTS (noble)
- if distro_codename() == "noble":
+ if package_exists("libncurses6:i386"):
packages.append("libncurses6:i386")
- packages.append("lib32ncurses-dev")
else:
packages.append("libncurses5:i386")
+
+ if package_exists("lib32ncurses-dev"):
+ packages.append("lib32ncurses-dev")
+ else:
packages.append("lib32ncurses5-dev")

return packages
23 changes: 23 additions & 0 deletions tur-chromium/chromium-stable/0003-ldpreload-libffi7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- a/build/gn_run_binary.py
+++ b/build/gn_run_binary.py
@@ -23,7 +23,19 @@
# The rest of the arguments are passed directly to the executable.
args = [path] + sys.argv[2:]

-ret = subprocess.call(args)
+# Modified by Termux: When building for termux, this wrapper will
+# be used to run the binary which is built for host machine, using
+# the rootfs provided by Google. We need to set LD_PRELOAD with
+# libffi.so.7 as the host machine (Ubuntu 24.04) doesn't provide it.
+envs = os.environ.copy()
+if "./clang_x86_v8_arm/" in path or "./clang_x86/" in path:
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_i386-sysroot")
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/i386-linux-gnu/libffi.so.7"
+elif "./host/" in path or "./clang_x64_v8_arm64/" in path or "./clang_x64/" in path:
+ base_sysroot = os.path.join(os.path.dirname(__file__), "linux", "debian_bullseye_amd64-sysroot")
+ envs["LD_PRELOAD"] = base_sysroot + "/usr/lib/x86_64-linux-gnu/libffi.so.7"
+
+ret = subprocess.call(args, env=envs)
if ret != 0:
if ret <= -100:
# Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
12 changes: 7 additions & 5 deletions tur-chromium/chromium-stable/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ termux_step_configure() {
# Install amd64 rootfs and deps
env -i PATH="$PATH" sudo apt update
env -i PATH="$PATH" sudo apt install lsb-release -yq
env -i PATH="$PATH" sudo apt install libfontconfig1 libffi7 -yq
env -i PATH="$PATH" sudo apt install libfontconfig1 libffi8 -yq
env -i PATH="$PATH" sudo ./build/install-build-deps.sh --no-syms --no-android --no-arm --no-chromeos-fonts --no-nacl --no-prompt
build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
local _amd64_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'amd64-sysroot')"
Expand Down Expand Up @@ -109,8 +109,6 @@ termux_step_configure() {
# This is needed to build cups
cp -Rf $TERMUX_PREFIX/bin/cups-config usr/bin/
chmod +x usr/bin/cups-config
# Cherry-pick LWG3545 for NDK r26
patch -p1 < $TERMUX_SCRIPTDIR/common-files/chromium-patches/sysroot-patches/libcxx-17-lwg3545.diff
popd
mv $TERMUX_PKG_TMPDIR/sysroot $TERMUX_PKG_CACHEDIR/sysroot-$TERMUX_ARCH
fi
Expand All @@ -129,7 +127,7 @@ termux_step_configure() {
_v8_toolchain_name="clang_x64_v8_arm64"
elif [ "$TERMUX_ARCH" = "arm" ]; then
# Install i386 rootfs and deps
env -i PATH="$PATH" sudo apt install libfontconfig1:i386 libffi7:i386 -yq
env -i PATH="$PATH" sudo apt install libfontconfig1:i386 libffi8:i386 -yq
env -i PATH="$PATH" sudo ./build/install-build-deps.sh --lib32 --no-syms --no-android --no-arm --no-chromeos-fonts --no-nacl --no-prompt
build/linux/sysroot_scripts/install-sysroot.py --arch=i386
local _i386_sysroot_path="$(pwd)/build/linux/$(ls build/linux | grep 'i386-sysroot')"
Expand Down Expand Up @@ -166,7 +164,7 @@ target_rpath = \"$TERMUX_PREFIX/lib\"
target_sysroot = \"$_target_sysroot\"
custom_toolchain = \"//build/toolchain/linux/unbundle:default\"
custom_toolchain_clang_base_path = \"$TERMUX_STANDALONE_TOOLCHAIN\"
custom_toolchain_clang_version = "17"
custom_toolchain_clang_version = "18"
host_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:host\"
v8_snapshot_toolchain = \"$TERMUX_PKG_CACHEDIR/custom-toolchain:$_v8_toolchain_name\"
clang_use_chrome_plugins = false
Expand All @@ -181,6 +179,10 @@ use_custom_libcxx = false
use_custom_libcxx_for_host = true
use_allocator_shim = false
use_partition_alloc_as_malloc = false
enable_backup_ref_ptr_slow_checks = false
enable_dangling_raw_ptr_checks = false
enable_dangling_raw_ptr_feature_flag = false
backup_ref_ptr_extra_oob_checks = false
enable_backup_ref_ptr_support = false
enable_pointer_compression_support = false
use_nss_certs = true
Expand Down
Loading