From 5d53ec47661b9e23dad278e2d3ae1a6faa52f404 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 3 Feb 2024 22:41:33 -0500 Subject: apparently rust is required now? --- www-client/chromium/Manifest | 2 +- www-client/chromium/chromium-123.0.6272.2.ebuild | 34 +++++++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest index 42b6f76..95b190a 100644 --- a/www-client/chromium/Manifest +++ b/www-client/chromium/Manifest @@ -49,4 +49,4 @@ DIST chromium-122.0.6226.2.tar.xz 3305442564 BLAKE2B dc1030f1913f18ebdf382bab858 DIST chromium-123.0.6272.2.tar.xz 3402595812 BLAKE2B 4c3e2edd56585972635c2006fa6dbdcf4e3f10d6d884e8ad3a787097d47dd1af826e42cc9064fd2e52423ad8cf2086c219be047cf6d590c4378fab0f12e2aee8 SHA512 c69855b4deb0d2693eed32866bfb95591605516df7d77ed7895a7b4791b9cb9a41b5d3052f0cdfb7d166823e9ffe9547c9e48c360cb8095719d9e8da4b5b595d DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c EBUILD chromium-122.0.6226.2.ebuild 39062 BLAKE2B 16b8b306d5e4340dcadb29a631fb7495df0241646e7f1692159854c5c0271b27839432421b808a767f79ca97b8e9da2179aa8f6b1f5520efe94b9516fb9e4de5 SHA512 023b44df6a05890ca89ae8cdc57f38be5303e78545be44456c5227c0db8018b96596573240404c5750847acf1bb9c4fd53b69662f7c12b7f93ab2bb5138e5b50 -EBUILD chromium-123.0.6272.2.ebuild 38886 BLAKE2B 8a597f7fd7943047f7e4f5c9b559448ea54b47d9ad21ffc441e8b0246d734fd25189a3f63fa056a472d4e5b208890ffcd08928085a74a765e2812465f38aa6c1 SHA512 73a566f4b0ca147f5c8ae37768f6cbcdb462b682f975f22eb46bc2e50effeee9549b94550663a4e169b8fb9312c09adbf6992126308d11db218b52219f09033f +EBUILD chromium-123.0.6272.2.ebuild 39755 BLAKE2B b72557cca82acc4b17da6b9780160c62d197290a499edaeb6a5c1f2c5d93b3e1b7c8a819029637004fcc0c2f3653a2f8515ea9ea8be527f4b0638ccb6177e73d SHA512 b7c78a62276e81acdf32e7d9dff96ac65506485f454e9824f3ef913125f847f21710160c8ff89ea5411b505a797aff9f63995f043e6e47e455175064b0839c5a diff --git a/www-client/chromium/chromium-123.0.6272.2.ebuild b/www-client/chromium/chromium-123.0.6272.2.ebuild index 9699d2e..f0efc89 100644 --- a/www-client/chromium/chromium-123.0.6272.2.ebuild +++ b/www-client/chromium/chromium-123.0.6272.2.ebuild @@ -5,6 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{9..11} ) PYTHON_REQ_USE="xml(+)" LLVM_MAX_SLOT=17 +RUST_MIN_VER=1.72.0 CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr @@ -171,6 +172,7 @@ BDEPEND=" >=dev-util/web_page_replay_go-20220314 $(depend_clang_llvm_versions 17) ) + >=dev-lang/rust-${RUST_MIN_VER}[profiler] dev-lang/perl >=dev-util/gn-0.1807 >=dev-util/gperf-3.0.3 @@ -324,7 +326,6 @@ src_prepare() { "${FILESDIR}/chromium-118-material-color-utils.patch" "${FILESDIR}/chromium-118-freetype-blink.patch" "${FILESDIR}/chromium-121-blink_libxml2_downgrade.patch" - "${FILESDIR}/chromium-123-qrgen-disablerust.patch" "${FILESDIR}/chromium-121-icu74.patch" "${FILESDIR}/chromium-111-InkDropHost-crash.patch" @@ -333,6 +334,10 @@ src_prepare() { "${FILESDIR}/chromium-cross-compile.patch" ) + sed -i -e \ + "/if (is_clang && toolchain_has_rust) {/,+2d" \ + build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins" + default mkdir -p third_party/node/linux/node-linux-x64/bin || die @@ -520,6 +525,7 @@ src_prepare() { third_party/pyyaml third_party/qcms third_party/rnnoise + third_party/rust third_party/s2cellid third_party/securemessage third_party/selenium-atoms @@ -645,6 +651,17 @@ src_prepare() { ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die } +chromium_rust_version_check() { + [[ ${MERGE_TYPE} == binary ]] && return + local rustc_version=( $(eselect --brief rust show 2>/dev/null) ) + rustc_version=${rustc_version[0]#rust-bin-} + rustc_version=${rustc_version#rust-} + + [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" + + echo $rustc_version +} + chromium_configure() { # Calling this here supports resumption via FEATURES=keepwork python_setup @@ -713,6 +730,18 @@ chromium_configure() { myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" fi + local rustc_ver + rustc_ver=$(chromium_rust_version_check) + if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then + eerror "Rust >=${RUST_MIN_VER} is required" + eerror "Please run 'eselect rust' and select the correct rust version" + die "Selected rust version is too old" + else + einfo "Using rust ${rustc_ver} to build" + fi + myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" + myconf_gn+=" rustc_version=\"${rustc_ver}\"" + # Create dummy pkg-config file for libsystemd, only dependency of installer mkdir "${T}/libsystemd" || die cat <<- EOF > "${T}/libsystemd/libsystemd.pc" @@ -722,9 +751,6 @@ chromium_configure() { EOF local -x PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+"${PKG_CONFIG_PATH}:"}${T}/libsystemd" - # Disable rust for now; it's only used for testing and we don't need the additional bdep - myconf_gn+=" enable_rust=false" - # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. myconf_gn+=" is_debug=false" -- cgit v1.2.3