| 27 |
27 |
# chromium-tools/get-chromium-toolchain-strings.py (or just use Chromicler)
|
| 28 |
28 |
# Node for M145+ should be 24.12.0 but that's not packaged in Gentoo yet. See #969145
|
| 29 |
29 |
TEST_FONT="9c07d19d9c5ee1ff94f717e6fb17e0c8c354e6f9"
|
| 30 |
|
BUNDLED_CLANG_VER="llvmorg-23-init-10931-g20b6ec66-11"
|
| 31 |
|
BUNDLED_RUST_VER="4c4205163abcbd08948b3efab796c543ba1ea687-5"
|
|
30 |
BUNDLED_CLANG_VER="llvmorg-23-init-19482-g53d18800-1"
|
|
31 |
BUNDLED_RUST_VER="b998449636a48e2c4a362809085b600a0174e1f2-2"
|
| 32 |
32 |
RUST_SHORT_HASH=${BUNDLED_RUST_VER:0:10}-${BUNDLED_RUST_VER##*-}
|
| 33 |
33 |
NODE_VER="24.16.0-r1"
|
|
34 |
GO_MIN_VER="1.25.0"
|
| 34 |
35 |
ESBUILD_VER="0.25.1"
|
| 35 |
36 |
ROLLUP_VER="4.57.1" # currently manual.
|
| 36 |
37 |
VIRTUALX_REQUIRED="pgo"
|
| ... | ... | |
| 52 |
53 |
|
| 53 |
54 |
DESCRIPTION="Open-source version of Google Chrome web browser"
|
| 54 |
55 |
HOMEPAGE="https://www.chromium.org/"
|
| 55 |
|
PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
|
| 56 |
|
PATCH_V="${PV%%\.*}-1"
|
| 57 |
|
COPIUM_COMMIT="b00f26bb5e0781020da5f830981472a142c6baf1"
|
|
56 |
PPC64_HASH="7aae8a84e327fc2078ce1625c9c70bfda77d626f"
|
|
57 |
PATCH_V="151-3"
|
|
58 |
COPIUM_COMMIT="3c7e56fb4523b43b47595bb3a22f77178fc76293"
|
| 58 |
59 |
SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV}/chromium-${PV}-linux.tar.xz
|
| 59 |
60 |
https://deps.gentoo.zip/www-client/chromium/rollup-wasm-node-${ROLLUP_VER}.tgz
|
| 60 |
61 |
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
|
| ... | ... | |
| 83 |
84 |
LICENSE+=" rar? ( unRAR )"
|
| 84 |
85 |
|
| 85 |
86 |
SLOT="stable"
|
| 86 |
|
# Unstable in gentoo exists mostly to give devs some breathing room for beta/stable releases.
|
| 87 |
|
# It shouldn't be keyworded but adventurous users are encouraged to select it;
|
| 88 |
|
# there's official dev channel Google Chrome after all.
|
| 89 |
|
KEYWORDS="~amd64 ~arm64"
|
|
87 |
KEYWORDS="~amd64 arm64 ~ppc64"
|
| 90 |
88 |
|
| 91 |
89 |
IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-zstd"
|
| 92 |
90 |
IUSE="+X ${IUSE_SYSTEM_LIBS} bindist bundled-toolchain cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos +official pax-kernel pgo"
|
| ... | ... | |
| 189 |
187 |
selinux? ( sec-policy/selinux-chromium )
|
| 190 |
188 |
bindist? (
|
| 191 |
189 |
!ffmpeg-chromium? ( >=media-video/ffmpeg-6.1-r1:0/58.60.60[chromium] )
|
| 192 |
|
ffmpeg-chromium? ( >=media-video/ffmpeg-chromium-150.0.7871.124:${PV%%\.*} )
|
|
190 |
ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
|
| 193 |
191 |
)
|
| 194 |
192 |
"
|
| 195 |
193 |
# For M149+ pipewire is a mandatory build-time dependency, but it's optional at runtime for most configurations.
|
| ... | ... | |
| 229 |
227 |
)
|
| 230 |
228 |
>=dev-util/bindgen-0.72.1
|
| 231 |
229 |
>=dev-build/gn-${GN_MIN_VER}
|
|
230 |
>=dev-lang/go-${GO_MIN_VER}
|
| 232 |
231 |
app-alternatives/ninja
|
| 233 |
232 |
dev-lang/perl
|
| 234 |
233 |
>=dev-util/gperf-3.2
|
| ... | ... | |
| 339 |
338 |
if use !bundled-toolchain; then
|
| 340 |
339 |
llvm-r1_pkg_setup
|
| 341 |
340 |
rust_pkg_setup
|
|
341 |
|
| 342 |
342 |
if tc-ld-is-mold; then
|
| 343 |
343 |
ewarn "Mold is currently not supported, it will not be used"
|
| 344 |
344 |
fi
|
|
345 |
|
| 345 |
346 |
# Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
|
| 346 |
347 |
AR=llvm-ar
|
| 347 |
348 |
CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
|
| ... | ... | |
| 508 |
509 |
"${WORKDIR}/chromium-patches-${PATCH_V}/common/"
|
| 509 |
510 |
)
|
| 510 |
511 |
|
| 511 |
|
# https://issues.chromium.org/issues/442698344
|
| 512 |
|
# Unreleased fontconfig changed magic numbers and google have rolled to this version
|
| 513 |
|
if has_version "<=media-libs/fontconfig-2.17.1"; then
|
| 514 |
|
PATCHES+=( "${FILESDIR}/chromium-142-work-with-old-fontconfig.patch" )
|
| 515 |
|
fi
|
|
512 |
# So many fontconfig magic numbers to cover
|
|
513 |
# TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
|
|
514 |
# <=2.17.1 -> 9
|
|
515 |
# >2.17.1 && <2.18.2 -> 11
|
|
516 |
# >=2.18.2 -> 12
|
|
517 |
local fontconfig_cache_magic=9
|
|
518 |
if has_version ">=media-libs/fontconfig-2.18.2"; then
|
|
519 |
fontconfig_cache_magic=12
|
|
520 |
elif has_version ">media-libs/fontconfig-2.17.1"; then
|
|
521 |
fontconfig_cache_magic=11
|
|
522 |
fi
|
|
523 |
|
|
524 |
sed -E -i \
|
|
525 |
-e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
|
|
526 |
third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
|
|
527 |
|
|
528 |
sed -E -i \
|
|
529 |
-e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
|
|
530 |
-e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
|
|
531 |
third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
|
|
532 |
die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
|
| 516 |
533 |
|
| 517 |
534 |
if use bundled-toolchain; then
|
| 518 |
535 |
# We need to symlink the toolchain into the expected location
|
| ... | ... | |
| 674 |
691 |
# adjust python interpreter version
|
| 675 |
692 |
sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
|
| 676 |
693 |
|
| 677 |
|
# Use the system copy of hwdata's usb.ids; upstream is woefully out of date (2015!)
|
| 678 |
|
sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
|
694 |
# Use the system copy of hwdata's usb.ids
|
|
695 |
sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
| 679 |
696 |
-i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
|
| 680 |
697 |
|
| 681 |
698 |
# remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
|
| ... | ... | |
| 779 |
796 |
third_party/fast_float
|
| 780 |
797 |
third_party/fdlibm
|
| 781 |
798 |
third_party/federated_compute/chromium/fcp/confidentialcompute
|
|
799 |
third_party/federated_compute/chromium/fcp/protos
|
|
800 |
third_party/federated_compute/chromium/fcp/secagg
|
|
801 |
third_party/federated_compute/chromium/fcp/client
|
| 782 |
802 |
third_party/federated_compute/src/fcp/base
|
| 783 |
803 |
third_party/federated_compute/src/fcp/confidentialcompute
|
| 784 |
|
third_party/federated_compute/src/fcp/protos/confidentialcompute
|
| 785 |
|
third_party/federated_compute/src/fcp/protos/federatedcompute
|
|
804 |
third_party/federated_compute/src/fcp/protos
|
|
805 |
third_party/federated_compute/src/fcp/client
|
|
806 |
third_party/federated_compute/src/fcp/secagg
|
|
807 |
third_party/federated_compute/third_party/googleapis/src/google
|
|
808 |
third_party/federated_compute/third_party/tensorflow-federated
|
|
809 |
third_party/federated_compute/third_party/protodatastore-cpp
|
| 786 |
810 |
third_party/ffmpeg
|
| 787 |
811 |
third_party/fft2d
|
| 788 |
812 |
third_party/flatbuffers
|
| ... | ... | |
| 1166 |
1190 |
"rust_sysroot_absolute=\"$(get_rust_prefix)\""
|
| 1167 |
1191 |
"rustc_version=\"${RUST_SLOT}\""
|
| 1168 |
1192 |
)
|
|
1193 |
|
| 1169 |
1194 |
# Currently disabled, runtime issues with mold
|
| 1170 |
1195 |
#if tc-ld-is-mold; then
|
| 1171 |
|
#if myconf_gn+=(
|
| 1172 |
|
#if "use_mold=true"
|
| 1173 |
|
#if "use_lld=false"
|
| 1174 |
|
#if "linker_path=\"${EPREFIX}/usr/bin/mold\""
|
| 1175 |
|
#if )
|
| 1176 |
|
#if else
|
|
1196 |
# myconf_gn+=(
|
|
1197 |
# "use_mold=true"
|
|
1198 |
# "use_lld=false"
|
|
1199 |
# "linker_path=\"${EPREFIX}/usr/bin/mold\""
|
|
1200 |
# )
|
|
1201 |
#else
|
| 1177 |
1202 |
myconf_gn+=( "use_lld=true" )
|
| 1178 |
1203 |
#fi
|
| 1179 |
1204 |
|
| ... | ... | |
| 1283 |
1308 |
"use_thin_lto=${use_lto}"
|
| 1284 |
1309 |
# Only enabled for clang, but gcc has endian macros too
|
| 1285 |
1310 |
"v8_use_libm_trig_functions=true"
|
|
1311 |
# use system go
|
|
1312 |
"tint_use_system_go=true"
|
| 1286 |
1313 |
)
|
| 1287 |
1314 |
|
| 1288 |
1315 |
if use bindist ; then
|
| ... | ... | |
| 1405 |
1432 |
export CHROME_VERSION_EXTRA="${SLOT}"
|
| 1406 |
1433 |
|
| 1407 |
1434 |
einfo "Configuring Chromium ..."
|
|
1435 |
# add a `-v` here if gn `hangs` to see which file it's getting stuck on.
|
| 1408 |
1436 |
set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
|
| 1409 |
1437 |
echo "$@"
|
| 1410 |
1438 |
"$@" || die "Failed to configure Chromium"
|
| ... | ... | |
| 1560 |
1588 |
TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
|
| 1561 |
1589 |
ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
|
| 1562 |
1590 |
DriveInfoTest.GetFileDriveInfo
|
|
1591 |
|
| 1563 |
1592 |
)
|
| 1564 |
1593 |
local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
|
| 1565 |
1594 |
# test-launcher-bot-mode enables parallelism and plain output
|
| ... | ... | |
| 1632 |
1661 |
/usr/$(get_libdir)/chromium-browser/libffmpeg.so
|
| 1633 |
1662 |
fi
|
| 1634 |
1663 |
|
|
1664 |
local test_libs=(
|
|
1665 |
"libimmediate_crash_test_helper.so"
|
|
1666 |
"libmalloc_wrapper.so"
|
|
1667 |
"libtest_shared_library.so"
|
|
1668 |
"libtest_trace_processor.so"
|
|
1669 |
)
|
|
1670 |
if use test; then
|
|
1671 |
local test_lib
|
|
1672 |
for test_lib in "${test_libs[@]}"; do
|
|
1673 |
rm -f "out/Release/${test_lib}" || die "Failed to remove ${test_lib}"
|
|
1674 |
done
|
|
1675 |
fi
|
|
1676 |
|
| 1635 |
1677 |
(
|
| 1636 |
1678 |
shopt -s nullglob
|
| 1637 |
1679 |
local files=(out/Release/*.so out/Release/*.so.[0-9])
|