diff options
Diffstat (limited to 'www-client/chromium')
-rw-r--r-- | www-client/chromium/Manifest | 10 | ||||
-rw-r--r-- | www-client/chromium/chromium-129.0.6668.100-r1.ebuild (renamed from www-client/chromium/chromium-129.0.6668.100.ebuild) | 145 | ||||
-rw-r--r-- | www-client/chromium/chromium-130.0.6723.116-r1.ebuild (renamed from www-client/chromium/chromium-130.0.6723.116.ebuild) | 176 | ||||
-rw-r--r-- | www-client/chromium/chromium-130.0.6723.91-r1.ebuild (renamed from www-client/chromium/chromium-130.0.6723.91.ebuild) | 147 | ||||
-rw-r--r-- | www-client/chromium/chromium-131.0.6753.0-r1.ebuild (renamed from www-client/chromium/chromium-131.0.6753.0.ebuild) | 137 | ||||
-rw-r--r-- | www-client/chromium/chromium-131.0.6778.24-r1.ebuild (renamed from www-client/chromium/chromium-131.0.6778.24.ebuild) | 139 |
6 files changed, 84 insertions, 670 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest index 82e8ab0e1574..fa71ede28b0d 100644 --- a/www-client/chromium/Manifest +++ b/www-client/chromium/Manifest @@ -30,9 +30,9 @@ DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b2 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c DIST chromium-testfonts-f26f29c9d3.tar.gz 32750602 BLAKE2B 498f8b2e0811c98dc3d4aaa75559e69c782afb4bd12328cfdb7244ddba5cae7ee47becd27b2549d7b36bed417601f70f4c192934b0f08496cef1547d0502d93c SHA512 96b090446862997c8134e2971f0e38793ecc1208d547e554c9b651ccfb4127c4de86754903fea57a7292a2823c45117bae0ec13ed87aed20c248fb779579fbde DIST chromium_128.0.6613.84-1raptor0~deb12u1.debian.tar.xz 8674292 BLAKE2B 74c8556f578231cd133ce3a11306ce38d32332a3db7b0f32a63df1806201933e69e9ff01e66d7ccef279f2134e0a69c89365d7a08a7a7e7d69816a188ae0b91c SHA512 b1b85bc99493676d466e648c00eb7e337efbcb197e9ed5ae6394133721db828583340df5ebfa45a3dccc72f400ad6ada637d400d8e2fae35c1322ca5e15dc10e -EBUILD chromium-129.0.6668.100.ebuild 50210 BLAKE2B eb9afe794482d87bb6e3a041bbd15d9e1de40eee74d840e30973591c309f54cfb0ae6d46fb83d0333faf2765726963ba15e8b18cb4ffcd98070d2661ded39d92 SHA512 b4c54fa949e02cde6a759afc260366da3005913bb0bd438a5cf9402bb672b7b3a1ecff80b24ae365bf911d6f06101f1aeb6bdf984e56c03409e6bf95bc7ed11d -EBUILD chromium-130.0.6723.116.ebuild 51838 BLAKE2B ea7b9a6cc308c9fa3fa85c113b82742be0cccc6cfd5d4b8e8ffb0ebf130960d83a3decb4c3b9c6abc1318b0e320f38319f128c95401e43cf228ddc0742bd53f2 SHA512 ef7a4a449fe928b81a2ea6049941a4f403ba89e33ac255994fdcf0b91c438212ddb880d9174a402bb5928fcf734846f79f643dc21963d3afd71f2261771357e8 -EBUILD chromium-130.0.6723.91.ebuild 50204 BLAKE2B 01b82db54bbef2fef2b4500017ce80a553c80f3afbce95346e11f0562b8a09259de4a252f9a62264ee2f1841eceaf6d94c69424b9930af948bdf7fc86fe5dabc SHA512 d83b06cdf6b0f1082de579f213cf78d34a46e322e354be800ac75c38b81de087e1ad4583422c473ada580a4f058543777cc43bf0d74fc7ac075945a2a0e3d97a -EBUILD chromium-131.0.6753.0.ebuild 52042 BLAKE2B c84c878b5e9990881d767158b8008c200b12e1e3c2e291b11aca7314a5a57fc108c4377d1f025cd5fd389ab1805bbd2a6b536a6b3327ffd8668793f8598d24fa SHA512 3c597be835c5f35112a778e9dd4c882bfa5acafa4ad70e9c8b89e56381eaff0d7ae166086b23477a480296f0902bd3f5aeb279dc314c0e50ed89d71d4c123e43 -EBUILD chromium-131.0.6778.24.ebuild 50927 BLAKE2B eb2c21c543a8080e0dedfde5491674b47acee690f64baf143b25798b84f14e26b03e7f3030ebfdfa4214ef88f3a70f7394bfae4781d0652ac06b58fa1c10f27b SHA512 cb866380cfd311c0db471f5b9c2256166298534176666f67175269111f73b38cba7c82a127d595abe424ff62e04a89ac86c764328ac26ee079c2848c7e6237fd +EBUILD chromium-129.0.6668.100-r1.ebuild 45716 BLAKE2B f6c3195da1d056f73adae2238c52cef85628ab5c03988cab89958452119ddf7ca9cf54c46165929e44a49f932b588c9569919257b9ed9d34bfc7c37e301deaee SHA512 ecb2f141df66b75dcdcc3bf77cc67536316ce5895b9cf89b53d3a73b1bbd73d35c3e10d78491f1eb873a123fe4bab685719c5cd5cfb99f5a16720c2f73b65d43 +EBUILD chromium-130.0.6723.116-r1.ebuild 45851 BLAKE2B c69301c9f653eb11d4ed5870df11d48770b780e0e53e9eba206cf1a06b736153042b46f79f0d60b00b91aebeb634a7838acfdf880201f236fc656c0b08d100ce SHA512 d787678897e72efd94feaa96b92645f3c54f9e47c1c017a308717393552fab2f50543d03eafe25d779f746f4aadf0de7f958f40712b8a6c1a64a02183bb1d2cd +EBUILD chromium-130.0.6723.91-r1.ebuild 45784 BLAKE2B 2be3c4d02d136b0c842f7d9bffa981eb625be0dea51614c56d2714a6a9d2c10003af86089297a17a4f7e1b08b05cd508d224f9a276b39e7c3fc0313feb66a112 SHA512 b041f23a3c5fbae066e093900774b028efcf0fbbd9369cb9605f38f01da0c03f32c5651e4bcead096d129528c3367a876db6f853e1e95da617ddf3ecf6669a31 +EBUILD chromium-131.0.6753.0-r1.ebuild 47432 BLAKE2B 2db6e555affe9b7bc98cffad00ed892bc87188ae6a49119dfb2616c41bcae0c05b90af663db4bd425a3d71e03dff41d9c3dc1ace4f64a977dcf2270e2af2cd41 SHA512 7fcdeaf98037a11754a0620c59069164925fda9e4085258bca93539a4e9a406d0ccc35549afd09e36a43f75b9f549a050764389ab92aea2d5b3d618d86197fab +EBUILD chromium-131.0.6778.24-r1.ebuild 46524 BLAKE2B 6cfabda5e65be9c09aacd8e1f027d88edb74547a35f4042e26f02a8efbeb6737cdeb71e79da9cf74c6c53ebffa8792b630c6c7e0be080d33916f94e3b7abe268 SHA512 f9bb6702096962fef9839949c8ce81929c0c256451ab33c703fc681f1c201e2dfc7c1eee9bb32f7240d3accdc135644a2bc03e6eee48969a97fd6e8b9cb833f4 MISC metadata.xml 2083 BLAKE2B e556591b48916e2b26d66b8b3a3f67d8f7c17d7cf2d03bfca4c91e0181604d853b16139583a8364646f5c2db55a2e3281a5b6ee623535452dbc8b0755fac89dc SHA512 b64e3140c1237d45aea47748a259b51685e7aa54c2ba259f6feb60df5a98ec434bd0ecde2e5dc2115d6c6409621ec3111e8b6b2a0fc8be2d9634dc465260dbe2 diff --git a/www-client/chromium/chromium-129.0.6668.100.ebuild b/www-client/chromium/chromium-129.0.6668.100-r1.ebuild index 0e199853bf36..6a3d532c5b99 100644 --- a/www-client/chromium/chromium-129.0.6668.100.ebuild +++ b/www-client/chromium/chromium-129.0.6668.100-r1.ebuild @@ -25,7 +25,6 @@ EAPI=8 # no reason not to. Todo: Re-enable USE=system-ffmpeg. GN_MIN_VER=0.2165 -RUST_MIN_VER=1.78.0 # chromium-tools/get-chromium-toolchain-strings.sh GOOGLE_CLANG_VER=llvmorg-20-init-1009-g7088a5ed-10 GOOGLE_RUST_VER=595316b4006932405a63862d8fe65f71a6356293-5 @@ -38,15 +37,15 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu 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 sv sw ta te th tr uk ur vi zh-CN zh-TW" -# While prerelease llvm is actually used in the google build, until we have a -# sane way to select 'rust built with this llvm slot' that isn't stable and testing -# subslots we will have to restrict LLVM_COMPAT to stable and testing keywords. -LLVM_COMPAT=( {17..18} ) +LLVM_COMPAT=( 18 ) PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" +RUST_MIN_VER=1.78.0 +RUST_NEEDS_LLVM=1 +RUST_OPTIONAL=1 -inherit check-reqs chromium-2 desktop flag-o-matic llvm-utils ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 ninja-utils pax-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" @@ -182,29 +181,6 @@ DEPEND="${COMMON_DEPEND} ) " -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" - echo "virtual/rust:0/llvm-${1}[profiler(-)]" - echo "pgo? ( sys-libs/compiler-rt-sanitizers:${1}[profile] )" -} - -# Parse LLVM_COMPAT and generate a usedep for each version -depend_clang_llvm_versions() { - if [[ ${#LLVM_COMPAT[@]} -eq 0 ]]; then - depend_clang_llvm_version ${#LLVM_COMPAT[0]} - else - echo "|| (" - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - echo "(" - depend_clang_llvm_version ${LLVM_COMPAT[i]} - echo ")" - done - echo ")" - fi -} - BDEPEND=" ${COMMON_SNAPSHOT_DEPEND} ${PYTHON_DEPS} @@ -217,7 +193,12 @@ BDEPEND=" qt6? ( dev-qt/qtbase:6 ) ) system-toolchain? ( - $(depend_clang_llvm_versions) + $(llvm_gen_dep " + sys-devel/clang:\${LLVM_SLOT} + sys-devel/llvm:\${LLVM_SLOT} + sys-devel/lld:\${LLVM_SLOT} + ") + ${RUST_DEPEND} pgo? ( >=dev-python/selenium-3.141.0 >=dev-util/web_page_replay_go-20220314 @@ -313,47 +294,6 @@ pkg_pretend() { fi } -# Chromium should build with any version of clang that we support -# but we may need to pick the "best" one for a build (highest installed, -# rust is built against it, etc.) -# Check each slot in LLVM_COMPAT to see if clang/llvm/lld are available -# and output the _highest_ slot that is actually available on a system. -chromium_pick_llvm_slot() { - # LLVM_COMPAT is always going to be oldest to newest (or one value) - # let's flip it and check from newest to oldest and return the first one we find. - local slot - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - slot=${LLVM_COMPAT[i]} - if has_version "sys-devel/clang:${slot}" && \ - has_version "sys-devel/llvm:${slot}" && \ - has_version "sys-devel/lld:${slot}" && \ - has_version "virtual/rust:0/llvm-${slot}" && \ - ( ! use pgo || has_version "sys-libs/compiler-rt-sanitizers:${slot}" ) ; then - - echo "${slot}" - return - fi - done - - die_msg=" -No suitable clang/llvm/lld slot found. -Slots checked: ${LLVM_COMPAT[*]}. -" - die "${die_msg}" -} - -# We need the rust version in src_configure and pkg_setup -chromium_extract_rust_version() { - [[ ${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 -} - pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then # The pre_build_checks are all about compilation resources, no need to run it for a binpkg @@ -361,10 +301,7 @@ pkg_setup() { if use system-toolchain; then # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment - # We'll set these to clang here then use llvm-utils functions to very explicitly set these - # to a sane value. # This is effectively the 'force-clang' path if GCC support is re-added. - # TODO: check if the user has already selected a specific impl via make.conf and respect that. if ! tc-is-lto && use official; then einfo "USE=official selected and LTO not detected." einfo "It is _highly_ recommended that LTO be enabled for performance reasons" @@ -378,8 +315,7 @@ pkg_setup() { die "Please switch to a different linker." fi - LLVM_SLOT=$(chromium_pick_llvm_slot) - export LLVM_SLOT # used in src_configure for rust-y business + # We're forcing clang here; user choice is respected via llvm_slot_x USE AR=llvm-ar CPP="${CHOST}-clang++ -E" NM=llvm-nm @@ -391,45 +327,8 @@ pkg_setup() { CPP="${CBUILD}-clang++ -E" fi - # The llvm-r1_pkg_setup we have at home. - # We prepend the path _first_ to explicitly use the selected slot. - llvm_prepend_path "${LLVM_SLOT}" - - llvm_fix_clang_version CC CPP CXX - llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB - llvm_fix_tool_path READELF STRINGS STRIP - - # Set LLVM_CONFIG to help Meson (bug #907965) but only do it - # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). - if [[ -z ${ESYSROOT} ]] ; then - llvm_fix_tool_path LLVM_CONFIG - fi - - einfo "Using LLVM/Clang slot ${LLVM_SLOT} to build" - - local rustc_ver=$(chromium_extract_rust_version) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required to build Chromium" - eerror "The currently selected version is ${rustc_ver}" - eerror "Please run \`eselect rust\` and select an appropriate Rust." - die "Selected Rust version is too old" - else - einfo "Using Rust ${rustc_ver} to build" - fi - - # Chromium requires the Rust profiler library while setting up its build environment. - # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) - # we'll just do a sanity check on the selected slot. - # The -bin always contains profiler support, so we only need to check for the non-bin version. - if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then - local rust_lib_path="${EPREFIX}$(rustc --print target-libdir)" - local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) - if [[ -z "${profiler_lib}" ]]; then - eerror "Rust ${rustc_ver} is missing the profiler library." - eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." - die "Please \`eselect\` a Rust slot that has the profiler." - fi - fi + llvm-r1_pkg_setup + rust_pkg_setup fi # Users should never hit this, it's purely a development convenience @@ -886,23 +785,15 @@ chromium_configure() { # rust_bindgen_root = directory with `bin/bindgen` beneath it. myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\"" - # from get_llvm_prefix - local prefix=${ESYSROOT} - [[ ${1} == -b ]] && prefix=${BROOT} - myconf_gn+=" bindgen_libclang_path=\"${prefix}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)\"" + myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\"" # We don't need to set 'clang_base_bath' for anything in our build # and it defaults to the google toolchain location. Instead provide a location # to where system clang lives sot that bindgen can find system headers (e.g. stddef.h) myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\"" # We need to provide this to GN in both the path to rust _and_ the version - local rustc_ver=$(chromium_extract_rust_version) - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" + myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\"" + myconf_gn+=" rustc_version=\"${RUST_SLOT}\"" fi # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. diff --git a/www-client/chromium/chromium-130.0.6723.116.ebuild b/www-client/chromium/chromium-130.0.6723.116-r1.ebuild index b8702db794c7..9b7032b7c9aa 100644 --- a/www-client/chromium/chromium-130.0.6723.116.ebuild +++ b/www-client/chromium/chromium-130.0.6723.116-r1.ebuild @@ -9,9 +9,7 @@ EAPI=8 # Use 132 as a base for new official tarballs. GN_MIN_VER=0.2165 -RUST_MIN_VER=1.78.0 # chromium-tools/get-chromium-toolchain-strings.py -TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 VIRTUALX_REQUIRED="pgo" @@ -19,20 +17,19 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu 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 sv sw ta te th tr uk ur vi zh-CN zh-TW" -# While prerelease llvm is actually used in the google build, until we have a -# sane way to select 'rust built with this llvm slot' that isn't stable and testing -# subslots we will have to restrict LLVM_COMPAT to stable and testing keywords. -# Requires 18.1.8 or 19.1.1 (or newer) for ppc64 LLVM_COMPAT=( 18 19 ) +RUST_NEEDS_LLVM="yes please" PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" +RUST_MIN_VER=1.78.0 -inherit check-reqs chromium-2 desktop flag-o-matic llvm-utils multiprocessing ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6" +TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 PATCH_V="${PV%%\.*}-2" SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}.tar.xz -> ${P}-gentoo.tar.xz https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2 @@ -53,6 +50,7 @@ if [[ ${SLOT} != "0/dev" ]]; then KEYWORDS="~amd64 ~arm64 ~ppc64" fi + IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE+=" qt5 qt6 +screencast selinux test +vaapi +wayland +widevine cpu_flags_ppc_vsx3" @@ -167,29 +165,6 @@ DEPEND="${COMMON_DEPEND} ) " -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" - echo "virtual/rust:0/llvm-${1}[profiler(-)]" - echo "pgo? ( sys-libs/compiler-rt-sanitizers:${1}[profile] )" -} - -# Parse LLVM_COMPAT and generate a usedep for each version -depend_clang_llvm_versions() { - if [[ ${#LLVM_COMPAT[@]} -eq 0 ]]; then - depend_clang_llvm_version ${#LLVM_COMPAT[0]} - else - echo "|| (" - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - echo "(" - depend_clang_llvm_version ${LLVM_COMPAT[i]} - echo ")" - done - echo ")" - fi -} - BDEPEND=" ${COMMON_SNAPSHOT_DEPEND} ${PYTHON_DEPS} @@ -201,7 +176,11 @@ BDEPEND=" qt5? ( dev-qt/qtcore:5 ) qt6? ( dev-qt/qtbase:6 ) ) - $(depend_clang_llvm_versions) + $(llvm_gen_dep " + sys-devel/clang:\${LLVM_SLOT} + sys-devel/llvm:\${LLVM_SLOT} + sys-devel/lld:\${LLVM_SLOT} + ") pgo? ( >=dev-python/selenium-3.141.0 >=dev-util/web_page_replay_go-20220314 @@ -296,57 +275,13 @@ pkg_pretend() { fi } -# Chromium should build with any version of clang that we support -# but we may need to pick the "best" one for a build (highest installed, -# rust is built against it, etc.) -# Check each slot in LLVM_COMPAT to see if clang/llvm/lld are available -# and output the _highest_ slot that is actually available on a system. -chromium_pick_llvm_slot() { - # LLVM_COMPAT is always going to be oldest to newest (or one value) - # let's flip it and check from newest to oldest and return the first one we find. - local slot - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - slot=${LLVM_COMPAT[i]} - if has_version "sys-devel/clang:${slot}" && \ - has_version "sys-devel/llvm:${slot}" && \ - has_version "sys-devel/lld:${slot}" && \ - has_version "virtual/rust:0/llvm-${slot}" && \ - ( ! use pgo || has_version "sys-libs/compiler-rt-sanitizers:${slot}" ) ; then - - echo "${slot}" - return - fi - done - - die_msg=" -No suitable clang/llvm/lld slot found. -Slots checked: ${LLVM_COMPAT[*]}. -" - die "${die_msg}" -} - -# We need the rust version in src_configure and pkg_setup -chromium_extract_rust_version() { - [[ ${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 -} - pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then # The pre_build_checks are all about compilation resources, no need to run it for a binpkg pre_build_checks # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment - # We'll set these to clang here then use llvm-utils functions to very explicitly set these - # to a sane value. # This is effectively the 'force-clang' path if GCC support is re-added. - # TODO: check if the user has already selected a specific impl via make.conf and respect that. use_lto="false" if tc-is-lto; then use_lto="true" @@ -374,8 +309,7 @@ pkg_setup() { die "Please switch to a different linker." fi - LLVM_SLOT=$(chromium_pick_llvm_slot) - export LLVM_SLOT # used in src_configure for rust-y business + # We're forcing Clang here. User choice is respected via llvm_slot_# USE flags. AR=llvm-ar CPP="${CHOST}-clang++ -E" NM=llvm-nm @@ -387,52 +321,16 @@ pkg_setup() { CPP="${CBUILD}-clang++ -E" fi - # The llvm-r1_pkg_setup we have at home. - # We prepend the path _first_ to explicitly use the selected slot. - llvm_prepend_path "${LLVM_SLOT}" - - llvm_fix_clang_version CC CPP CXX - llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB - llvm_fix_tool_path READELF STRINGS STRIP - - # Set LLVM_CONFIG to help Meson (bug #907965) but only do it - # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). - if [[ -z ${ESYSROOT} ]] ; then - llvm_fix_tool_path LLVM_CONFIG - fi + llvm-r1_pkg_setup + rust_pkg_setup einfo "Using LLVM/Clang slot ${LLVM_SLOT} to build" - - rustc_ver=$(chromium_extract_rust_version) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required to build Chromium" - eerror "The currently selected version is ${rustc_ver}" - eerror "Please run \`eselect rust\` and select an appropriate Rust." - die "Selected Rust version is too old" - else - einfo "Using Rust ${rustc_ver} to build" - fi - - export rustc_ver # used in src_configure, may as well avoid calling it again + einfo "Using Rust slot ${RUST_SLOT}, ${RUST_TYPE} to build" # I hate doing this but upstream Rust have yet to come up with a better solution for # us poor packagers. Required for Split LTO units, which are required for CFI. export RUSTC_BOOTSTRAP=1 - # Chromium requires the Rust profiler library while setting up its build environment. - # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) - # we'll just do a sanity check on the selected slot. - # The -bin always contains profiler support, so we only need to check for the non-bin version. - if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then - local rust_lib_path="${EPREFIX}$(rustc --print target-libdir)" - local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) - if [[ -z "${profiler_lib}" ]]; then - eerror "Rust ${rustc_ver} is missing the profiler library." - eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." - die "Please \`eselect\` a Rust slot that has the profiler." - fi - fi - # Users should never hit this, it's purely a development convenience if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium" @@ -455,8 +353,7 @@ src_unpack() { unpack ${P}-testdata-gentoo.tar.xz # This just contains a bunch of font files that need to be unpacked (or moved) to the correct location. local testfonts_dir="${WORKDIR}/${P}/third_party/test_fonts" - local testfonts_tar="${DISTDIR}/${PN}-testfonts-${TEST_FONT:0:10}.tar.gz" - tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts" + tar xf "${DISTDIR}/${P%%\.*}-testfonts.tar.gz" -C "${testfonts_dir}" || die "Failed to unpack testfonts" fi if use ppc64; then @@ -928,22 +825,15 @@ chromium_configure() { # rust_bindgen_root = directory with `bin/bindgen` beneath it. myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\"" - # from get_llvm_prefix - local prefix=${ESYSROOT} - [[ ${1} == -b ]] && prefix=${BROOT} - myconf_gn+=" bindgen_libclang_path=\"${prefix}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)\"" + myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\"" # We don't need to set 'clang_base_bath' for anything in our build # and it defaults to the google toolchain location. Instead provide a location # to where system clang lives sot that bindgen can find system headers (e.g. stddef.h) myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\"" # We need to provide this to GN in both the path to rust _and_ the version - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" + myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\"" + myconf_gn+=" rustc_version=\"${RUST_SLOT}\"" # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. myconf_gn+=" is_debug=false" @@ -1340,35 +1230,7 @@ src_test() { StringPieceTest.OutOfBoundsDeath ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker ValuesUtilTest.FilePath - # Gentoo-specific - AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/0 - AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/1 - AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/2 - AlternateTestParams/PartitionAllocDeathTest.RepeatedAllocReturnNullDirect/3 - AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/0 - AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/1 - AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/2 - AlternateTestParams/PartitionAllocDeathTest.RepeatedReallocReturnNullDirect/3 - CharacterEncodingTest.GetCanonicalEncodingNameByAliasName - CheckExitCodeAfterSignalHandlerDeathTest.CheckSIGFPE - CheckExitCodeAfterSignalHandlerDeathTest.CheckSIGILL - CheckExitCodeAfterSignalHandlerDeathTest.CheckSIGSEGV - CheckExitCodeAfterSignalHandlerDeathTest.CheckSIGSEGVNonCanonicalAddress - FilePathTest.FromUTF8Unsafe_And_AsUTF8Unsafe - ICUStringConversionsTest.ConvertToUtf8AndNormalize - NumberFormattingTest.FormatPercent - PathServiceTest.CheckedGetFailure - PlatformThreadTest.CanChangeThreadType - StackCanary.ChangingStackCanaryCrashesOnReturn - StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree - SysStrings.SysNativeMBAndWide - SysStrings.SysNativeMBToWide - SysStrings.SysWideToNativeMB - TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest - ToolsSanityTest.BadVirtualCallNull - ToolsSanityTest.BadVirtualCallWrongType ) - local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")" # test-launcher-bot-mode enables parallelism and plain output ./out/Release/base_unittests --test-launcher-bot-mode \ diff --git a/www-client/chromium/chromium-130.0.6723.91.ebuild b/www-client/chromium/chromium-130.0.6723.91-r1.ebuild index ed4c82004d6a..ca59fb8a697e 100644 --- a/www-client/chromium/chromium-130.0.6723.91.ebuild +++ b/www-client/chromium/chromium-130.0.6723.91-r1.ebuild @@ -9,9 +9,7 @@ EAPI=8 # Use 132 as a base for new official tarballs. GN_MIN_VER=0.2165 -RUST_MIN_VER=1.78.0 # chromium-tools/get-chromium-toolchain-strings.py -TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 VIRTUALX_REQUIRED="pgo" @@ -19,20 +17,19 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu 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 sv sw ta te th tr uk ur vi zh-CN zh-TW" -# While prerelease llvm is actually used in the google build, until we have a -# sane way to select 'rust built with this llvm slot' that isn't stable and testing -# subslots we will have to restrict LLVM_COMPAT to stable and testing keywords. -# Requires 18.1.8 or 19.1.1 (or newer) for ppc64 LLVM_COMPAT=( 18 19 ) +RUST_NEEDS_LLVM="yes please" PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" +RUST_MIN_VER=1.78.0 -inherit check-reqs chromium-2 desktop flag-o-matic llvm-utils multiprocessing ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6" +TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 PATCH_V="${PV%%\.*}-2" SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}.tar.xz https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2 @@ -53,6 +50,7 @@ if [[ ${SLOT} != "0/dev" ]]; then KEYWORDS="~amd64 ~arm64 ~ppc64" fi + IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE+=" qt5 qt6 +screencast selinux test +vaapi +wayland +widevine cpu_flags_ppc_vsx3" @@ -167,29 +165,6 @@ DEPEND="${COMMON_DEPEND} ) " -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" - echo "virtual/rust:0/llvm-${1}[profiler(-)]" - echo "pgo? ( sys-libs/compiler-rt-sanitizers:${1}[profile] )" -} - -# Parse LLVM_COMPAT and generate a usedep for each version -depend_clang_llvm_versions() { - if [[ ${#LLVM_COMPAT[@]} -eq 0 ]]; then - depend_clang_llvm_version ${#LLVM_COMPAT[0]} - else - echo "|| (" - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - echo "(" - depend_clang_llvm_version ${LLVM_COMPAT[i]} - echo ")" - done - echo ")" - fi -} - BDEPEND=" ${COMMON_SNAPSHOT_DEPEND} ${PYTHON_DEPS} @@ -201,7 +176,11 @@ BDEPEND=" qt5? ( dev-qt/qtcore:5 ) qt6? ( dev-qt/qtbase:6 ) ) - $(depend_clang_llvm_versions) + $(llvm_gen_dep " + sys-devel/clang:\${LLVM_SLOT} + sys-devel/llvm:\${LLVM_SLOT} + sys-devel/lld:\${LLVM_SLOT} + ") pgo? ( >=dev-python/selenium-3.141.0 >=dev-util/web_page_replay_go-20220314 @@ -296,57 +275,13 @@ pkg_pretend() { fi } -# Chromium should build with any version of clang that we support -# but we may need to pick the "best" one for a build (highest installed, -# rust is built against it, etc.) -# Check each slot in LLVM_COMPAT to see if clang/llvm/lld are available -# and output the _highest_ slot that is actually available on a system. -chromium_pick_llvm_slot() { - # LLVM_COMPAT is always going to be oldest to newest (or one value) - # let's flip it and check from newest to oldest and return the first one we find. - local slot - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - slot=${LLVM_COMPAT[i]} - if has_version "sys-devel/clang:${slot}" && \ - has_version "sys-devel/llvm:${slot}" && \ - has_version "sys-devel/lld:${slot}" && \ - has_version "virtual/rust:0/llvm-${slot}" && \ - ( ! use pgo || has_version "sys-libs/compiler-rt-sanitizers:${slot}" ) ; then - - echo "${slot}" - return - fi - done - - die_msg=" -No suitable clang/llvm/lld slot found. -Slots checked: ${LLVM_COMPAT[*]}. -" - die "${die_msg}" -} - -# We need the rust version in src_configure and pkg_setup -chromium_extract_rust_version() { - [[ ${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 -} - pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then # The pre_build_checks are all about compilation resources, no need to run it for a binpkg pre_build_checks # The linux:unbundle toolchain in GN grabs CC, CXX, CPP (etc) from the environment - # We'll set these to clang here then use llvm-utils functions to very explicitly set these - # to a sane value. # This is effectively the 'force-clang' path if GCC support is re-added. - # TODO: check if the user has already selected a specific impl via make.conf and respect that. use_lto="false" if tc-is-lto; then use_lto="true" @@ -374,8 +309,7 @@ pkg_setup() { die "Please switch to a different linker." fi - LLVM_SLOT=$(chromium_pick_llvm_slot) - export LLVM_SLOT # used in src_configure for rust-y business + # We're forcing Clang here. User choice is respected via llvm_slot_# USE flags. AR=llvm-ar CPP="${CHOST}-clang++ -E" NM=llvm-nm @@ -387,53 +321,16 @@ pkg_setup() { CPP="${CBUILD}-clang++ -E" fi - # The llvm-r1_pkg_setup we have at home. - # We prepend the path _first_ to explicitly use the selected slot. - llvm_prepend_path "${LLVM_SLOT}" - - llvm_fix_clang_version CC CPP CXX - llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB - llvm_fix_tool_path READELF STRINGS STRIP - - # Set LLVM_CONFIG to help Meson (bug #907965) but only do it - # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). - if [[ -z ${ESYSROOT} ]] ; then - llvm_fix_tool_path LLVM_CONFIG - fi + llvm-r1_pkg_setup + rust_pkg_setup einfo "Using LLVM/Clang slot ${LLVM_SLOT} to build" - - rustc_ver=$(chromium_extract_rust_version) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required to build Chromium" - eerror "The currently selected version is ${rustc_ver}" - eerror "Please run \`eselect rust\` and select an appropriate Rust." - die "Selected Rust version is too old" - else - einfo "Using Rust ${rustc_ver} to build" - fi - - export rustc_ver # used in src_configure, may as well avoid calling it again + einfo "Using Rust slot ${RUST_SLOT}, ${RUST_TYPE} to build" # I hate doing this but upstream Rust have yet to come up with a better solution for # us poor packagers. Required for Split LTO units, which are required for CFI. export RUSTC_BOOTSTRAP=1 - # Chromium requires the Rust profiler library while setting up its build environment. - # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) - # we'll just do a sanity check on the selected slot. - # The -bin always contains profiler support, so we only need to check for the non-bin version. - if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then - local rust_lib_path="${EPREFIX}$(rustc --print target-libdir)" - local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) - if [[ -z "${profiler_lib}" ]]; then - eerror "Rust ${rustc_ver} is missing the profiler library." - eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." - die "Please \`eselect\` a Rust slot that has the profiler." - fi - fi - - # Users should never hit this, it's purely a development convenience if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium" @@ -928,23 +825,15 @@ chromium_configure() { # rust_bindgen_root = directory with `bin/bindgen` beneath it. myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\"" - # from get_llvm_prefix - local prefix=${ESYSROOT} - [[ ${1} == -b ]] && prefix=${BROOT} - myconf_gn+=" bindgen_libclang_path=\"${prefix}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)\"" + myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\"" # We don't need to set 'clang_base_bath' for anything in our build # and it defaults to the google toolchain location. Instead provide a location # to where system clang lives sot that bindgen can find system headers (e.g. stddef.h) myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\"" # We need to provide this to GN in both the path to rust _and_ the version - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" - + myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\"" + myconf_gn+=" rustc_version=\"${RUST_SLOT}\"" # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. myconf_gn+=" is_debug=false" diff --git a/www-client/chromium/chromium-131.0.6753.0.ebuild b/www-client/chromium/chromium-131.0.6753.0-r1.ebuild index b9fbbe6b9e34..082a394cd0a8 100644 --- a/www-client/chromium/chromium-131.0.6753.0.ebuild +++ b/www-client/chromium/chromium-131.0.6753.0-r1.ebuild @@ -39,15 +39,12 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu 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 sv sw ta te th tr uk ur vi zh-CN zh-TW" -# While prerelease llvm is actually used in the google build, until we have a -# sane way to select 'rust built with this llvm slot' that isn't stable and testing -# subslots we will have to restrict LLVM_COMPAT to stable and testing keywords. LLVM_COMPAT=( 17 18 ) PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" -inherit check-reqs chromium-2 desktop flag-o-matic llvm-utils ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 ninja-utils pax-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" @@ -72,9 +69,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P} LICENSE="BSD" SLOT="0/dev" # Dev exists mostly to give devs some breathing room for beta/stable releases; it shouldn't be keyworded but adventurous users can select it. -if [[ ${SLOT} == "0/dev" ]]; then - KEYWORDS="" -else +if [[ ${SLOT} != "0/dev" ]]; then KEYWORDS="~amd64 ~arm64" fi @@ -189,29 +184,6 @@ DEPEND="${COMMON_DEPEND} ) " -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" - echo "virtual/rust:0/llvm-${1}[profiler(-)]" - echo "pgo? ( sys-libs/compiler-rt-sanitizers:${1}[profile] )" -} - -# Parse LLVM_COMPAT and generate a usedep for each version -depend_clang_llvm_versions() { - if [[ ${#LLVM_COMPAT[@]} -eq 0 ]]; then - depend_clang_llvm_version ${#LLVM_COMPAT[0]} - else - echo "|| (" - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - echo "(" - depend_clang_llvm_version ${LLVM_COMPAT[i]} - echo ")" - done - echo ")" - fi -} - BDEPEND=" ${COMMON_SNAPSHOT_DEPEND} ${PYTHON_DEPS} @@ -224,7 +196,7 @@ BDEPEND=" qt6? ( dev-qt/qtbase:6 ) ) system-toolchain? ( - $(depend_clang_llvm_versions) + $() pgo? ( >=dev-python/selenium-3.141.0 >=dev-util/web_page_replay_go-20220314 @@ -320,47 +292,6 @@ pkg_pretend() { fi } -# Chromium should build with any version of clang that we support -# but we may need to pick the "best" one for a build (highest installed, -# rust is built against it, etc.) -# Check each slot in LLVM_COMPAT to see if clang/llvm/lld are available -# and output the _highest_ slot that is actually available on a system. -chromium_pick_llvm_slot() { - # LLVM_COMPAT is always going to be oldest to newest (or one value) - # let's flip it and check from newest to oldest and return the first one we find. - local slot - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - slot=${LLVM_COMPAT[i]} - if has_version "sys-devel/clang:${slot}" && \ - has_version "sys-devel/llvm:${slot}" && \ - has_version "sys-devel/lld:${slot}" && \ - has_version "virtual/rust:0/llvm-${slot}" && \ - ( ! use pgo || has_version "sys-libs/compiler-rt-sanitizers:${slot}" ) ; then - - echo "${slot}" - return - fi - done - - die_msg=" -No suitable clang/llvm/lld slot found. -Slots checked: ${LLVM_COMPAT[*]}. -" - die "${die_msg}" -} - -# We need the rust version in src_configure and pkg_setup -chromium_extract_rust_version() { - [[ ${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 -} - pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then # The pre_build_checks are all about compilation resources, no need to run it for a binpkg @@ -396,8 +327,6 @@ pkg_setup() { die "Please switch to a different linker." fi - LLVM_SLOT=$(chromium_pick_llvm_slot) - export LLVM_SLOT # used in src_configure for rust-y business AR=llvm-ar CPP="${CHOST}-clang++ -E" NM=llvm-nm @@ -409,49 +338,12 @@ pkg_setup() { CPP="${CBUILD}-clang++ -E" fi - # The llvm-r1_pkg_setup we have at home. - # We prepend the path _first_ to explicitly use the selected slot. - llvm_prepend_path "${LLVM_SLOT}" - - llvm_fix_clang_version CC CPP CXX - llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB - llvm_fix_tool_path READELF STRINGS STRIP - - # Set LLVM_CONFIG to help Meson (bug #907965) but only do it - # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). - if [[ -z ${ESYSROOT} ]] ; then - llvm_fix_tool_path LLVM_CONFIG - fi - - einfo "Using LLVM/Clang slot ${LLVM_SLOT} to build" - - local rustc_ver=$(chromium_extract_rust_version) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required to build Chromium" - eerror "The currently selected version is ${rustc_ver}" - eerror "Please run \`eselect rust\` and select an appropriate Rust." - die "Selected Rust version is too old" - else - einfo "Using Rust ${rustc_ver} to build" - fi + llvm-r1_pkg_setup + rust_pkg_setup # I hate doing this but upstream Rust have yet to come up with a better solution for # us poor packagers. Required for Split LTO units, which are required for CFI. export RUSTC_BOOTSTRAP=1 - - # Chromium requires the Rust profiler library while setting up its build environment. - # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) - # we'll just do a sanity check on the selected slot. - # The -bin always contains profiler support, so we only need to check for the non-bin version. - if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then - local rust_lib_path="${EPREFIX}$(rustc --print target-libdir)" - local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) - if [[ -z "${profiler_lib}" ]]; then - eerror "Rust ${rustc_ver} is missing the profiler library." - eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." - die "Please \`eselect\` a Rust slot that has the profiler." - fi - fi fi # Users should never hit this, it's purely a development convenience @@ -946,23 +838,14 @@ chromium_configure() { # rust_bindgen_root = directory with `bin/bindgen` beneath it. myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\"" - # from get_llvm_prefix - local prefix=${ESYSROOT} - [[ ${1} == -b ]] && prefix=${BROOT} - myconf_gn+=" bindgen_libclang_path=\"${prefix}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)\"" + + myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\"" # We don't need to set 'clang_base_bath' for anything in our build # and it defaults to the google toolchain location. Instead provide a location # to where system clang lives sot that bindgen can find system headers (e.g. stddef.h) myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\"" - - # We need to provide this to GN in both the path to rust _and_ the version - local rustc_ver=$(chromium_extract_rust_version) - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" + myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\"" + myconf_gn+=" rustc_version=\"${RUST_SLOT}\"" fi # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. diff --git a/www-client/chromium/chromium-131.0.6778.24.ebuild b/www-client/chromium/chromium-131.0.6778.24-r1.ebuild index 3a1fa9fc3807..981c37fea572 100644 --- a/www-client/chromium/chromium-131.0.6778.24.ebuild +++ b/www-client/chromium/chromium-131.0.6778.24-r1.ebuild @@ -9,7 +9,6 @@ EAPI=8 # Use 132 as a base for new official tarballs. GN_MIN_VER=0.2165 -RUST_MIN_VER=1.78.0 # chromium-tools/get-chromium-toolchain-strings.py TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 @@ -19,15 +18,13 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu 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 sv sw ta te th tr uk ur vi zh-CN zh-TW" -# While prerelease llvm is actually used in the google build, until we have a -# sane way to select 'rust built with this llvm slot' that isn't stable and testing -# subslots we will have to restrict LLVM_COMPAT to stable and testing keywords. LLVM_COMPAT=( {17..19} ) PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" +RUST_MIN_VER=1.78.0 -inherit check-reqs chromium-2 desktop flag-o-matic llvm-utils multiprocessing ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils +inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" @@ -167,29 +164,6 @@ DEPEND="${COMMON_DEPEND} ) " -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" - echo "virtual/rust:0/llvm-${1}[profiler(-)]" - echo "pgo? ( sys-libs/compiler-rt-sanitizers:${1}[profile] )" -} - -# Parse LLVM_COMPAT and generate a usedep for each version -depend_clang_llvm_versions() { - if [[ ${#LLVM_COMPAT[@]} -eq 0 ]]; then - depend_clang_llvm_version ${#LLVM_COMPAT[0]} - else - echo "|| (" - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - echo "(" - depend_clang_llvm_version ${LLVM_COMPAT[i]} - echo ")" - done - echo ")" - fi -} - BDEPEND=" ${COMMON_SNAPSHOT_DEPEND} ${PYTHON_DEPS} @@ -201,7 +175,11 @@ BDEPEND=" qt5? ( dev-qt/qtcore:5 ) qt6? ( dev-qt/qtbase:6 ) ) - $(depend_clang_llvm_versions) + $(llvm_gen_dep " + sys-devel/clang:\${LLVM_SLOT} + sys-devel/llvm:\${LLVM_SLOT} + sys-devel/lld:\${LLVM_SLOT} + ") pgo? ( >=dev-python/selenium-3.141.0 >=dev-util/web_page_replay_go-20220314 @@ -296,47 +274,6 @@ pkg_pretend() { fi } -# Chromium should build with any version of clang that we support -# but we may need to pick the "best" one for a build (highest installed, -# rust is built against it, etc.) -# Check each slot in LLVM_COMPAT to see if clang/llvm/lld are available -# and output the _highest_ slot that is actually available on a system. -chromium_pick_llvm_slot() { - # LLVM_COMPAT is always going to be oldest to newest (or one value) - # let's flip it and check from newest to oldest and return the first one we find. - local slot - for (( i=${#LLVM_COMPAT[@]}-1 ; i>=0 ; i-- )); do - slot=${LLVM_COMPAT[i]} - if has_version "sys-devel/clang:${slot}" && \ - has_version "sys-devel/llvm:${slot}" && \ - has_version "sys-devel/lld:${slot}" && \ - has_version "virtual/rust:0/llvm-${slot}" && \ - ( ! use pgo || has_version "sys-libs/compiler-rt-sanitizers:${slot}" ) ; then - - echo "${slot}" - return - fi - done - - die_msg=" -No suitable clang/llvm/lld slot found. -Slots checked: ${LLVM_COMPAT[*]}. -" - die "${die_msg}" -} - -# We need the rust version in src_configure and pkg_setup -chromium_extract_rust_version() { - [[ ${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 -} - pkg_setup() { if [[ ${MERGE_TYPE} != binary ]]; then # The pre_build_checks are all about compilation resources, no need to run it for a binpkg @@ -374,8 +311,7 @@ pkg_setup() { die "Please switch to a different linker." fi - LLVM_SLOT=$(chromium_pick_llvm_slot) - export LLVM_SLOT # used in src_configure for rust-y business + # Forcing clang; user choice respected by llvm_slot_x USE AR=llvm-ar CPP="${CHOST}-clang++ -E" NM=llvm-nm @@ -387,52 +323,13 @@ pkg_setup() { CPP="${CBUILD}-clang++ -E" fi - # The llvm-r1_pkg_setup we have at home. - # We prepend the path _first_ to explicitly use the selected slot. - llvm_prepend_path "${LLVM_SLOT}" - - llvm_fix_clang_version CC CPP CXX - llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB - llvm_fix_tool_path READELF STRINGS STRIP - - # Set LLVM_CONFIG to help Meson (bug #907965) but only do it - # for empty ESYSROOT (as a proxy for "are we cross-compiling?"). - if [[ -z ${ESYSROOT} ]] ; then - llvm_fix_tool_path LLVM_CONFIG - fi - - einfo "Using LLVM/Clang slot ${LLVM_SLOT} to build" - - rustc_ver=$(chromium_extract_rust_version) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required to build Chromium" - eerror "The currently selected version is ${rustc_ver}" - eerror "Please run \`eselect rust\` and select an appropriate Rust." - die "Selected Rust version is too old" - else - einfo "Using Rust ${rustc_ver} to build" - fi - - export rustc_ver # used in src_configure, may as well avoid calling it again + llvm-r1_pkg_setup + rust_pkg_setup # I hate doing this but upstream Rust have yet to come up with a better solution for # us poor packagers. Required for Split LTO units, which are required for CFI. export RUSTC_BOOTSTRAP=1 - # Chromium requires the Rust profiler library while setting up its build environment. - # Since a standard Rust comes with the profiler, instead of patching it out (build/rust/std/BUILD.gn#L103) - # we'll just do a sanity check on the selected slot. - # The -bin always contains profiler support, so we only need to check for the non-bin version. - if [[ "$(eselect --brief rust show 2>/dev/null)" != *"bin"* ]]; then - local rust_lib_path="${EPREFIX}$(rustc --print target-libdir)" - local profiler_lib=$(find "${rust_lib_path}" -name "libprofiler_builtins-*.rlib" -print -quit) - if [[ -z "${profiler_lib}" ]]; then - eerror "Rust ${rustc_ver} is missing the profiler library." - eerror "ebuild dependency resolution should have ensured that a Rust with the profiler was installed." - die "Please \`eselect\` a Rust slot that has the profiler." - fi - fi - # Users should never hit this, it's purely a development convenience if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium" @@ -926,22 +823,14 @@ chromium_configure() { # rust_bindgen_root = directory with `bin/bindgen` beneath it. myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\"" - # from get_llvm_prefix - local prefix=${ESYSROOT} - [[ ${1} == -b ]] && prefix=${BROOT} - myconf_gn+=" bindgen_libclang_path=\"${prefix}/usr/lib/llvm/${LLVM_SLOT}/$(get_libdir)\"" + myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\"" # We don't need to set 'clang_base_bath' for anything in our build # and it defaults to the google toolchain location. Instead provide a location # to where system clang lives sot that bindgen can find system headers (e.g. stddef.h) myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\"" - # We need to provide this to GN in both the path to rust _and_ the version - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" + myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\"" + myconf_gn+=" rustc_version=\"${RUST_SLOT}\"" # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. myconf_gn+=" is_debug=false" |