From a4eb71896b5622bd8d5481f1f586171d4dbcbd3d Mon Sep 17 00:00:00 2001 From: Duncaen Date: Thu, 14 Nov 2024 17:02:35 +0100 Subject: [PATCH 1/2] chromium: update to 131.0.6778.69. --- .../chromium/patches/build-support-musl.patch | 79 +++++-------------- srcpkgs/chromium/template | 26 +++--- 2 files changed, 35 insertions(+), 70 deletions(-) diff --git a/srcpkgs/chromium/patches/build-support-musl.patch b/srcpkgs/chromium/patches/build-support-musl.patch index 1e5b0b8afae02f..635c592b0a37e9 100644 --- a/srcpkgs/chromium/patches/build-support-musl.patch +++ b/srcpkgs/chromium/patches/build-support-musl.patch @@ -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 = "" diff --git a/srcpkgs/chromium/template b/srcpkgs/chromium/template index 9f6823243459b1..2188134ada61f5 100644 --- a/srcpkgs/chromium/template +++ b/srcpkgs/chromium/template @@ -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 @@ -27,8 +28,9 @@ short_desc="Google's attempt at creating a safer, faster, and more stable browse maintainer="Duncaen " 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 @@ -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). @@ -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() { From 089120a4cff26669d6d6bb7b805a015a6c49073f Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sat, 16 Nov 2024 18:02:24 +0100 Subject: [PATCH 2/2] New package: gn-0.0.20240706 --- srcpkgs/gn/template | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 srcpkgs/gn/template diff --git a/srcpkgs/gn/template b/srcpkgs/gn/template new file mode 100644 index 00000000000000..5eef3c9cb9be5d --- /dev/null +++ b/srcpkgs/gn/template @@ -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 " +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 +}