Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromium 131 #53088

Merged
merged 2 commits into from
Nov 17, 2024
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
79 changes: 18 additions & 61 deletions srcpkgs/chromium/patches/build-support-musl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,66 +13,23 @@
shlib_extension = ".dylib"
--- a/build/config/rust.gni
+++ b/build/config/rust.gni
@@ -185,11 +185,23 @@
@@ -196,7 +196,18 @@
# a cargo project that dumps the `CARGO_CFG_TARGET_ABI` from its build.rs. See
# https://issues.chromium.org/u/1/issues/372512092#comment5 for an example.
rust_abi_target = ""
if (is_linux || is_chromeos) {
-if (is_linux || is_chromeos) {
+if (is_musl) {
+ if (current_cpu == "arm64") {
+ rust_abi_target = "aarch64-unknown-linux-musl"
+ cargo_target_abi = ""
+ } else if (current_cpu == "x86") {
+ rust_abi_target = "i686-unknown-linux-musl"
+ cargo_target_abi = ""
+ } else if (current_cpu == "x64") {
+ rust_abi_target = "x86_64-unknown-linux-musl"
+ cargo_target_abi = ""
+ }
+} else if (is_linux || is_chromeos) {
if (current_cpu == "arm64") {
- rust_abi_target = "aarch64-unknown-linux-gnu"
+ if (is_musl) {
+ rust_abi_target = "aarch64-unknown-linux-musl"
+ } else {
+ rust_abi_target = "aarch64-unknown-linux-gnu"
+ }
} else if (current_cpu == "x86") {
- rust_abi_target = "i686-unknown-linux-gnu"
+ if (is_musl) {
+ rust_abi_target = "i686-unknown-linux-musl"
+ } else {
+ rust_abi_target = "i686-unknown-linux-gnu"
+ }
} else if (current_cpu == "x64") {
- rust_abi_target = "x86_64-unknown-linux-gnu"
+ if (is_musl) {
+ rust_abi_target = "x86_64-unknown-linux-musl"
+ } else {
+ rust_abi_target = "x86_64-unknown-linux-gnu"
+ }
} else if (current_cpu == "arm") {
if (arm_float_abi == "hard") {
float_suffix = "hf"
@@ -198,15 +210,31 @@
}
if (arm_arch == "armv7-a" || arm_arch == "armv7") {
# No way to inform Rust about the -a suffix.
- rust_abi_target = "armv7-unknown-linux-gnueabi" + float_suffix
+ if (is_musl) {
+ rust_abi_target = "armv7-unknown-linux-musleabi" + float_suffix
+ } else {
+ rust_abi_target = "armv7-unknown-linux-gnueabi" + float_suffix
+ }
} else {
- rust_abi_target = "arm-unknown-linux-gnueabi" + float_suffix
+ if (is_musl) {
+ rust_abi_target = "arm-unknown-linux-musleabi" + float_suffix
+ } else {
+ rust_abi_target = "arm-unknown-linux-gnueabi" + float_suffix
+ }
}
} else if (current_cpu == "riscv64") {
- rust_abi_target = "riscv64gc-unknown-linux-gnu"
+ if (is_musl) {
+ rust_abi_target = "riscv64gc-unknown-linux-musl"
+ } else {
+ rust_abi_target = "riscv64gc-unknown-linux-gnu"
+ }
} else {
# Best guess for other future platforms.
- rust_abi_target = current_cpu + "-unknown-linux-gnu"
+ if (is_musl) {
+ rust_abi_target = current_cpu + "-unknown-linux-musl"
+ } else {
+ rust_abi_target = current_cpu + "-unknown-linux-gnu"
+ }
}
} else if (is_android) {
import("//build/config/android/abi.gni")
rust_abi_target = "aarch64-unknown-linux-gnu"
cargo_target_abi = ""
26 changes: 17 additions & 9 deletions srcpkgs/chromium/template
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Template file for 'chromium'
pkgname=chromium
# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
version=130.0.6723.69
version=131.0.6778.69
revision=1
archs="i686* x86_64* aarch64* armv7l*"
hostmakedepends="
$(vopt_if clang "clang18 lld18 llvm18 compiler-rt")
bison git gperf hwids ninja nodejs perl pkg-config python3
libepoxy-devel libevent-devel libglib-devel rust rust-bindgen"
libepoxy-devel libevent-devel libglib-devel rust rust-bindgen
gn"
makedepends="
alsa-lib-devel libdav1d-devel brotli-devel cups-devel elfutils-devel
fontconfig-devel freetype-devel gtk+3-devel libXScrnSaver-devel
Expand All @@ -27,8 +28,9 @@ short_desc="Google's attempt at creating a safer, faster, and more stable browse
maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.chromium.org/"
distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
checksum=b7e4d6a2154c61e558659bbc5b8b05c9f6f317d1420bf8624f5ffac097df565d
# distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${version}.tar.xz"
distfiles="https://chromium-tarballs.distfiles.gentoo.org/chromium-${version}.tar.xz"
checksum=56d332bd53b26ad4f9a8f36c4cba37e9f05126a353d57666d12690944769bfaa

lib32disabled=yes

Expand Down Expand Up @@ -139,10 +141,12 @@ _setup_toolchain() {
do_configure() {
local system=() conf=()

# compile gn early, so it can be used to generate gni stuff
AR="ar" CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD LD=$CXX_FOR_BUILD \
CFLAGS=$CFLAGS_FOR_BUILD CXXFLAGS=$CXXFLAGS_FOR_BUILD LDFLAGS=$LDFLAGS_FOR_BUILD \
tools/gn/bootstrap/bootstrap.py ${makejobs} --skip-generate-buildfiles
if false; then
# compile gn early, so it can be used to generate gni stuff
AR="ar" CC=$CC_FOR_BUILD CXX=$CXX_FOR_BUILD LD=$CXX_FOR_BUILD \
CFLAGS=$CFLAGS_FOR_BUILD CXXFLAGS=$CXXFLAGS_FOR_BUILD LDFLAGS=$LDFLAGS_FOR_BUILD \
tools/gn/bootstrap/bootstrap.py ${makejobs} --skip-generate-buildfiles
fi

# Use system-provided libraries.
# TODO: use_system_hunspell (upstream changes needed).
Expand Down Expand Up @@ -299,7 +303,11 @@ do_configure() {
esac
fi
_setup_toolchain
out/Release/gn gen out/Release --args="${conf[*]}"
if false; then
out/Release/gn gen out/Release --args="${conf[*]}"
else
gn gen out/Release --args="${conf[*]}"
fi
}

do_build() {
Expand Down
40 changes: 40 additions & 0 deletions srcpkgs/gn/template
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Template file for 'gn'
pkgname=gn
version=0.0.20240706
revision=1
_ref=b3a0bff47dd81073bfe67a402971bad92e4f2423
create_wrksrc=yes
hostmakedepends="python3 ninja"
short_desc="Meta-build system that generates build files for Ninja"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://gn.googlesource.com/gn"
distfiles="https://gn.googlesource.com/gn/+archive/${_ref}.tar.gz"
checksum=907cf038d586147c5708216536b6f8a8cc03c2635488f3f0b669c57faa4582a5

do_configure() {
cat <<-EOF >src/gn/last_commit_position.h
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_

#define LAST_COMMIT_POSITION_NUM 0
#define LAST_COMMIT_POSITION "0 (${_ref})"

#endif // OUT_LAST_COMMIT_POSITION_H_
EOF
./build/gen.py --no-last-commit-position --no-static-libstdc++ --no-strip --allow-warnings
}

do_build() {
ninja ${makejobs} -C out gn
}

do_check() {
ninja ${makejobs} -C out gn_unittests
./out/gn_unittests
}

do_install() {
vbin out/gn
vlicense LICENSE
}
Loading