| 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 |
87 |
KEYWORDS="~amd64 ~arm64"
|
| 90 |
88 |
|
| 91 |
89 |
IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-zstd"
|
| ... | ... | |
| 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.
|
| ... | ... | |
| 221 |
219 |
$(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT}')
|
| 222 |
220 |
>=sys-devel/mold-2.41.0
|
| 223 |
221 |
)
|
|
222 |
!official? ( >=sys-devel/mold-2.41.0 )
|
| 224 |
223 |
${RUST_DEPEND}
|
| 225 |
224 |
)
|
| 226 |
225 |
pgo? (
|
| ... | ... | |
| 229 |
228 |
)
|
| 230 |
229 |
>=dev-util/bindgen-0.72.1
|
| 231 |
230 |
>=dev-build/gn-${GN_MIN_VER}
|
|
231 |
>=dev-lang/go-${GO_MIN_VER}
|
| 232 |
232 |
app-alternatives/ninja
|
| 233 |
233 |
dev-lang/perl
|
| 234 |
234 |
>=dev-util/gperf-3.2
|
| ... | ... | |
| 339 |
339 |
if use !bundled-toolchain; then
|
| 340 |
340 |
llvm-r1_pkg_setup
|
| 341 |
341 |
rust_pkg_setup
|
|
342 |
|
| 342 |
343 |
if tc-ld-is-mold; then
|
| 343 |
344 |
ewarn "Mold is currently not supported, it will not be used"
|
| 344 |
345 |
fi
|
|
346 |
|
| 345 |
347 |
# Forcing clang; respect llvm_slot_x to enable selection of impl via LLVM_COMPAT
|
| 346 |
348 |
AR=llvm-ar
|
| 347 |
349 |
CPP="${CHOST}-clang++-${LLVM_SLOT} -E"
|
| ... | ... | |
| 508 |
510 |
"${WORKDIR}/chromium-patches-${PATCH_V}/common/"
|
| 509 |
511 |
)
|
| 510 |
512 |
|
| 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
|
|
513 |
# So many fontconfig magic numbers to cover
|
|
514 |
# TODO: once upstream roll to 2.18.2+ set that as our minimum and remove this logic.
|
|
515 |
# <=2.17.1 -> 9
|
|
516 |
# >2.17.1 && <2.18.2 -> 11
|
|
517 |
# >=2.18.2 -> 12
|
|
518 |
local fontconfig_cache_magic=9
|
|
519 |
if has_version ">=media-libs/fontconfig-2.18.2"; then
|
|
520 |
fontconfig_cache_magic=12
|
|
521 |
elif has_version ">media-libs/fontconfig-2.17.1"; then
|
|
522 |
fontconfig_cache_magic=11
|
|
523 |
fi
|
|
524 |
|
|
525 |
sed -E -i \
|
|
526 |
-e "s#(fb5c91b2895aa445d23aebf7f9e2189c-le64\.cache-)(9|10|11|12)#\1${fontconfig_cache_magic}#g" \
|
|
527 |
third_party/test_fonts/fontconfig/BUILD.gn || die "Failed to set fontconfig cache magic in BUILD.gn"
|
|
528 |
|
|
529 |
sed -E -i \
|
|
530 |
-e "s#(kCacheKey \+ \"/-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
|
|
531 |
-e "s#(kCacheKey \+ \"-le64\.cache-)(9|10|11|12)(\")#\1${fontconfig_cache_magic}\3#g" \
|
|
532 |
third_party/test_fonts/fontconfig/generate_fontconfig_caches.cc || \
|
|
533 |
die "Failed to set fontconfig cache magic in generate_fontconfig_caches.cc"
|
| 516 |
534 |
|
| 517 |
535 |
if use bundled-toolchain; then
|
| 518 |
536 |
# We need to symlink the toolchain into the expected location
|
| ... | ... | |
| 674 |
692 |
# adjust python interpreter version
|
| 675 |
693 |
sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
|
| 676 |
694 |
|
| 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' \
|
|
695 |
# Use the system copy of hwdata's usb.ids
|
|
696 |
sed 's|//third_party/usb_ids/src/usb.ids|/usr/share/hwdata/usb.ids|g' \
|
| 679 |
697 |
-i services/device/public/cpp/usb/BUILD.gn || die "Failed to set system usb.ids path"
|
| 680 |
698 |
|
| 681 |
699 |
# remove_bundled_libraries.py walks the source tree and looks for paths containing the substring 'third_party'
|
| ... | ... | |
| 779 |
797 |
third_party/fast_float
|
| 780 |
798 |
third_party/fdlibm
|
| 781 |
799 |
third_party/federated_compute/chromium/fcp/confidentialcompute
|
|
800 |
third_party/federated_compute/chromium/fcp/protos
|
|
801 |
third_party/federated_compute/chromium/fcp/secagg
|
|
802 |
third_party/federated_compute/chromium/fcp/client
|
| 782 |
803 |
third_party/federated_compute/src/fcp/base
|
| 783 |
804 |
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
|
|
805 |
third_party/federated_compute/src/fcp/protos
|
|
806 |
third_party/federated_compute/src/fcp/client
|
|
807 |
third_party/federated_compute/src/fcp/secagg
|
|
808 |
third_party/federated_compute/third_party/googleapis/src/google
|
|
809 |
third_party/federated_compute/third_party/tensorflow-federated
|
|
810 |
third_party/federated_compute/third_party/protodatastore-cpp
|
| 786 |
811 |
third_party/ffmpeg
|
| 787 |
812 |
third_party/fft2d
|
| 788 |
813 |
third_party/flatbuffers
|
| ... | ... | |
| 1053 |
1078 |
sed -i -e 's|${clang_base_path}/bin/llvm-strip|/bin/true|g' \
|
| 1054 |
1079 |
-e 's|${clang_base_path}/bin/llvm-objcopy|/bin/true|g' \
|
| 1055 |
1080 |
build/linux/strip_binary.gni || die
|
|
1081 |
|
|
1082 |
if ! use official; then
|
|
1083 |
ln -s /usr/bin/mold buildtools/third_party/mold/cipd/mold || die
|
|
1084 |
fi
|
| 1056 |
1085 |
}
|
| 1057 |
1086 |
|
| 1058 |
1087 |
chromium_configure() {
|
| ... | ... | |
| 1166 |
1195 |
"rust_sysroot_absolute=\"$(get_rust_prefix)\""
|
| 1167 |
1196 |
"rustc_version=\"${RUST_SLOT}\""
|
| 1168 |
1197 |
)
|
|
1198 |
|
| 1169 |
1199 |
# Currently disabled, runtime issues with mold
|
| 1170 |
1200 |
#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
|
|
1201 |
# myconf_gn+=(
|
|
1202 |
# "use_mold=true"
|
|
1203 |
# "use_lld=false"
|
|
1204 |
# "linker_path=\"${EPREFIX}/usr/bin/mold\""
|
|
1205 |
# )
|
|
1206 |
#else
|
| 1177 |
1207 |
myconf_gn+=( "use_lld=true" )
|
| 1178 |
1208 |
#fi
|
| 1179 |
1209 |
|
| ... | ... | |
| 1283 |
1313 |
"use_thin_lto=${use_lto}"
|
| 1284 |
1314 |
# Only enabled for clang, but gcc has endian macros too
|
| 1285 |
1315 |
"v8_use_libm_trig_functions=true"
|
|
1316 |
# use system go
|
|
1317 |
"tint_use_system_go=true"
|
| 1286 |
1318 |
)
|
| 1287 |
1319 |
|
| 1288 |
1320 |
if use bindist ; then
|
| ... | ... | |
| 1405 |
1437 |
export CHROME_VERSION_EXTRA="${SLOT}"
|
| 1406 |
1438 |
|
| 1407 |
1439 |
einfo "Configuring Chromium ..."
|
|
1440 |
# add a `-v` here if gn `hangs` to see which file it's getting stuck on.
|
| 1408 |
1441 |
set -- gn gen --args="${myconf_gn[*]}${EXTRA_GN:+ ${EXTRA_GN}}" out/Release
|
| 1409 |
1442 |
echo "$@"
|
| 1410 |
1443 |
"$@" || die "Failed to configure Chromium"
|
| ... | ... | |
| 1542 |
1575 |
'CriticalProcessAndThreadSpotChecks/HangWatcherAnyCriticalThreadTests.*'
|
| 1543 |
1576 |
'LazyThreadPoolTaskRunnerEnvironmentTest.*' # M142
|
| 1544 |
1577 |
'ToolsSanityTest.BadVirtualCall*'
|
|
1578 |
# Since 151.0.7922.137
|
|
1579 |
'CheckDeathTest.*'
|
|
1580 |
'EnumSetDeathTest.*'
|
|
1581 |
'OptionalRefDeathTest.*'
|
|
1582 |
'RawRefDeathTest.*'
|
|
1583 |
'AlternateTestParams/PartitionAllocDeathTest.CheckTriggered*'
|
|
1584 |
'CallbackHelpersTest.*'
|
|
1585 |
'SafeRefTest.*'
|
|
1586 |
'SpanTest.*'
|
|
1587 |
'WeakValueTableTest.*'
|
|
1588 |
'PlatformSharedMemoryRegionTest.*'
|
|
1589 |
'RefCountedOverflowTest.*'
|
|
1590 |
'SingleThreadTaskRunnerCurrentDefaultHandleTest.*'
|
|
1591 |
'TestFutureDeathTest.*'
|
|
1592 |
'WeakPtrDeathTest.*'
|
|
1593 |
'SafeRefDeathTest.*'
|
|
1594 |
'LinkedListDeathTest.*'
|
|
1595 |
'BindDeathTest.*'
|
|
1596 |
'ReallocProtectedIteratorDeathTest.*'
|
|
1597 |
'PASpanTest.*'
|
|
1598 |
'BackupRefPtrTest.*'
|
|
1599 |
'All/Base64Test.Overflow*'
|
|
1600 |
'ValuesTest.*'
|
|
1601 |
'TaskEnvironmentTest.*'
|
|
1602 |
'CheckedObserverListTest.*'
|
|
1603 |
'MemoryConsumerRegistryTest.*'
|
|
1604 |
ProtectedMemoryDeathTest.FailsIfDefinedOutsideOfProtectMemoryRegion
|
|
1605 |
StructuredSharedMemoryDeathTest.DuplicateRegion
|
|
1606 |
CheckedContiguousIteratorDeathTest.OutOfBounds
|
|
1607 |
HeapArrayDeathTest.TakeFirstWithOverSize
|
|
1608 |
CallbackDeathTest.RunNullCallbackChecks
|
|
1609 |
ObserverListThreadSafeDeathTest.CrossThreadRemovalRestricted
|
|
1610 |
SequencedTaskRunnerCurrentDefaultHandleDeathTest.OverrideWithNull
|
|
1611 |
TestFutureWithoutTaskEnvironmentDeathTest.WaitShouldDcheckWithoutTaskEnvironment
|
|
1612 |
ScopedThreadPriorityDeathTest.NoRealTime
|
|
1613 |
ReallocProtectedIteratorDeathTest.StringReallocCrashes
|
|
1614 |
BarrierCallbackTest.ErrorToCallCallbackWithZeroCallbacks
|
|
1615 |
BarrierClosureTest.ChecksIfCalledForZeroClosures
|
|
1616 |
SupportsUserDataTest.ReentrantSetUserDataDuringRemoval
|
|
1617 |
TimeBase.AddSubInfinities
|
|
1618 |
LibcppHardeningTest.Assertions
|
|
1619 |
IDMapTest.RemovedValueHandling
|
|
1620 |
MultiMemoryConsumerTest.DuplicateInterventionsCheck
|
|
1621 |
PersistentMemoryAllocatorTest.DelayedAllocationTest
|
|
1622 |
SequenceCheckerTest.MoveOffSequenceBanned
|
|
1623 |
ThreadCheckerTest.MoveOffThreadBanned
|
|
1624 |
TokenType.TokenFromNullUnguessableToken
|
|
1625 |
ZipTest.CheckForIterationPastTheEnd
|
|
1626 |
MemoryConsumerTraitsTest.ActiveConsumerWithPassiveTraitsFails
|
|
1627 |
SingleThreadTaskRunnerMainThreadDefaultHandleTest.Basic
|
|
1628 |
|
| 1545 |
1629 |
# requires en-us locale
|
| 1546 |
1630 |
SysStrings.SysNativeMBAndWide
|
| 1547 |
1631 |
SysStrings.SysNativeMBToWide
|
| ... | ... | |
| 1560 |
1644 |
TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
|
| 1561 |
1645 |
ThreadPoolEnvironmentConfig.CanUseBackgroundPriorityForWorker
|
| 1562 |
1646 |
DriveInfoTest.GetFileDriveInfo
|
|
1647 |
|
| 1563 |
1648 |
)
|
| 1564 |
1649 |
local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
|
| 1565 |
1650 |
# test-launcher-bot-mode enables parallelism and plain output
|
| ... | ... | |
| 1632 |
1717 |
/usr/$(get_libdir)/chromium-browser/libffmpeg.so
|
| 1633 |
1718 |
fi
|
| 1634 |
1719 |
|
|
1720 |
local test_libs=(
|
|
1721 |
"libimmediate_crash_test_helper.so"
|
|
1722 |
"libmalloc_wrapper.so"
|
|
1723 |
"libtest_shared_library.so"
|
|
1724 |
"libtest_trace_processor.so"
|
|
1725 |
)
|
|
1726 |
if use test; then
|
|
1727 |
local test_lib
|
|
1728 |
for test_lib in "${test_libs[@]}"; do
|
|
1729 |
rm -f "out/Release/${test_lib}" || die "Failed to remove ${test_lib}"
|
|
1730 |
done
|
|
1731 |
fi
|
|
1732 |
|
| 1635 |
1733 |
(
|
| 1636 |
1734 |
shopt -s nullglob
|
| 1637 |
1735 |
local files=(out/Release/*.so out/Release/*.so.[0-9])
|