cef-vaapi
MEDIUM
maintainer bnema
0 votes
scanned 2026-11-01 07:59:34.641363
Why flagged
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
Triggered rules
Medium
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:76
source=("chromium-$_chromium_ver-lite.tar.xz::https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromium_ver-lite.tar.xz"
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Christian Heusel <gromit@archlinux.org>
2
# Maintainer: Jonathan Grotelüschen <tippfehlr@archlinux.org>
3
# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
4
5
# Note: This PKGBUILD and the chromium PKGBUILD are loosely kept in sync to ease maintenance.
6
# As such care should be taken to minimize the differences between these PKGBUILDs.
7
pkgname=cef-vaapi
8
# pkgver is updated automatically.
9
# To update this package, update the _cef_commit and _chromium_ver variables.
10
# For the CEF versioning scheme, see
11
# https://chromiumembedded.github.io/cef/branches_and_building#version-number-format
12
pkgver=154.0.34
13
# See https://github.com/chromiumembedded/cef/tree/<release branch>
14
# Also see https://chromiumembedded.github.io/cef/branches_and_building
15
_cef_commit=14c5a089e8452874cb1a556dc3fde26ed2d87723
16
# the chromium version must match CHROMIUM_BUILD_COMPATIBILITY.txt in the CEF repo
17
_chromium_ver=154.0.8037.154
18
_system_clang=1
19
pkgrel=2
20
pkgdesc="Chromium Embedded Framework (CEF), simple framework for embedding Chromium-based browsers in other applications (VAAPI-enabled variant)"
21
provides=("cef=$pkgver") # provides="cef=$pkgver"
22
conflicts=('cef') # conflicts='cef'
23
arch=('x86_64')
24
url="https://chromiumembedded.github.io/cef"
25
license=('BSD-3-Clause')
26
depends=(
27
'alsa-lib'
28
'at-spi2-core'
29
'dbus'
30
'libdrm'
31
'libffi'
32
'libpulse'
33
'libxcomposite'
34
'libxdamage'
35
'libxkbcommon'
36
'libxrandr'
37
'mesa'
38
'nss'
39
'pango'
40
'systemd-libs'
41
'libva'
42
)
43
optdepends=(
44
'libva-mesa-driver: VAAPI driver for AMD GPUs'
45
'intel-media-driver: VAAPI driver for modern Intel GPUs'
46
'libva-utils: VAAPI diagnostics such as vainfo'
47
)
48
49
makedepends=(
50
'clang'
51
'compiler-rt'
52
'esbuild'
53
'git'
54
'gn'
55
'go'
56
'gperf'
57
'java-runtime-headless'
58
'lld'
59
'ninja'
60
'nodejs'
61
'npm'
62
'opus'
63
'pipewire'
64
'python'
65
'python-httplib2'
66
'python-pyparsing'
67
'python-six'
68
'rsync'
69
'rust'
70
'rust-bindgen'
71
'typescript'
72
'vulkan-headers'
73
'libxtst'
74
)
75
options=('!lto') # Chromium adds its own flags for ThinLTO
76
source=("chromium-$_chromium_ver-lite.tar.xz::https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$_chromium_ver-lite.tar.xz"
77
"cef::git+https://github.com/chromiumembedded/cef.git#commit=${_cef_commit}"
78
chromium-138-nodejs-version-check.patch
79
chromium-145-fix-SYS_SECCOMP.patch
80
chromium-147-revert-clang-no-lifetime-dse-flag.patch
81
chromium-147-rust-1.95-bytemuck.patch
82
chromium-149-drop-unknown-clang-flag.patch
83
chromium-149-use-of-undeclared-identifier-ERROR.patch
84
chromium-150-revert-avx-flag-change.patch
85
chromium-152-unbundle-minizip-undo-unicode.patch
86
chromium-152-unbundle-opus-devtools.patch
87
chromium-153-hermetic-python.patch
88
chromium-153-iamf-tools-unbundled-opus.patch
89
chromium-154-use-system-esbuild.patch
90
chromium-154-fix-gn-no-public_inputs.patch
91
chromium-154-typescript.patch
92
chromium-154-crubit.patch
93
chromium-154-remove-private_verification_tokens.patch
94
chromium-154-build-with-wasm-rollup.patch
95
compiler-rt-adjust-paths.patch
96
increase-fortify-level.patch
97
glibc-2.42-baud-rate-fix.patch
98
cef-no-sysroot.patch
99
cef-no-libxml-visibility-patch.patch
100
chromium-disable-font-tests.patch
101
FindCEF.cmake
102
)
103
sha256sums=('07b64494ed68d975aa61d36ff27fd2217ad01fced4a6de8ae22f51ebb6083201'
104
'2cad9ae59579d0e01d95d9504be304a92dd1760645270151b98ec39054375922'
105
'11a96ffa21448ec4c63dd5c8d6795a1998d8e5cd5a689d91aea4d2bdd13fb06e'
106
'4fc040a0656a0a524dd8ad090cd129fc5b6cb21adcc66be82080165789e8c13e'
107
'c382830318c5b37826ecf44f3ba9def6be8affdad1bce819ecb83f3222ff4b3a'
108
'b9e6339221efe03540ffb360c161d93604a1fc93a5a1c53e5e9849066f987d05'
109
'1b5190fa030850cf30a97dc90e35b31f3097243c88743fbfaedbd64ea80f1327'
110
'951514535be65f0e2f84e82305d96292be1da353c1427ba1048ea24be70003c4'
111
'5f6ccb7b945c8a13c690493723bad816b36f2f25792d47e677b56f8200907e60'
112
'890e5d98088ef1c7c075a551442f03385d1db266cad8a65576704a22720683f9'
113
'3276453f2ce655b6286476f48d4df837be952d9447afa46583f79ec71f2288c3'
114
'ebf74154266d0b6d6cc957c413f845052c5fcfce7745befb8821595cdf3f7d49'
115
'2ab9fbe653829ce692f83ee780aad07e8c83a6686e51ab9459ad736cfa2850ee'
116
'017e32d7c92a2c3d672e0535d52a27be1b805aa4dfe7d29cb1c1552460ccad64'
117
'7f39267af6bd60cc19244ca43684e18a0bb441b197fa1627ca4c4d97fbc759ca'
118
'd061cf4aeba21b1d2edabc28afd38106246b99aa5ec699e1b9ee5ca8b76d8a23'
119
'a82147f07982d49b0744c53c5fc038d4de1ef7d9a828b6280abbb49462b623eb'
120
'0cc5f7c7ccf0927c0bbfdb9e797dc5b1f4c9f021e8a01d943121d3ee4e6416bf'
121
'cfef4a4eeed2272b3101131af6c1bb63c7932a715c36634a1e027f770634e013'
122
'ec8e49b7114e2fa2d359155c9ef722ff1ba5fe2c518fa48e30863d71d3b82863'
123
'd634d2ce1fc63da7ac41f432b1e84c59b7cceabf19d510848a7cff40c8025342'
124
'1c1898f263eaacbc069a8e1a3e732852350350d1dad4cb1a6bba430e3b796cd0'
125
'cdc046c3da5a57dae8fba0de49cadbe65d4f8fbfffb172f7a768222232595faa'
126
'6695d7bcac489f74b8290a05dac540c2b5c5fed997ee119ae05419d36509445d'
127
'44dcc0da55a8c6c6af875addcfb9c552c722b56a31479eb7d99f16d0a27f4ebb'
128
'e576250c4d0f3dd307bd22c6d4f9f7aba54fdf4d5899520c0bd1c3527aec65ed')
129
130
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
131
# Keys are the names in the above script; values are the dependencies in Arch
132
declare -gA _system_libs=(
133
[brotli]=brotli
134
[dav1d]=dav1d
135
#[ffmpeg]=ffmpeg # YouTube playback stopped working in Chromium 120
136
[flac]=flac
137
[fontconfig]=fontconfig
138
[freetype]=freetype2
139
[harfbuzz]=harfbuzz
140
[highway]=highway
141
#[icu]=icu
142
#[jsoncpp]=jsoncpp # needs libstdc++
143
#[libaom]=aom
144
#[libavif]=libavif # needs -DAVIF_ENABLE_EXPERIMENTAL_GAIN_MAP=ON
145
[libdrm]=libdrm
146
[libjpeg]=libjpeg-turbo
147
# [libpng]=libpng
148
#[libvpx]=libvpx
149
[libwebp]=libwebp
150
[libxml]=libxml2
151
[libxslt]=libxslt
152
[openh264]=openh264
153
[opus]=opus
154
#[re2]=re2 # needs libstdc++
155
#[snappy]=snappy # needs libstdc++
156
#[woff2]=woff2 # needs libstdc++
157
[zlib]=minizip
158
[zstd]=zstd
159
)
160
_unwanted_bundled_libs=(
161
$(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
162
)
163
depends+=(${_system_libs[@]})
164
165
_validate_cef_vaapi_invariants() {
166
local _pkgbuild="${BASH_SOURCE[0]}"
167
local _required_flags=(
168
'ffmpeg_branding="Chrome"'
169
'proprietary_codecs=true'
170
'rtc_use_pipewire=true'
171
'link_pulseaudio=true'
172
'use_vaapi=true'
173
)
174
local _flag _actual _flag_ok
175
for _flag in "${_required_flags[@]}"; do
176
_flag_ok=0
177
for _actual in "${_flags[@]}"; do
178
if [[ "$_actual" == "$_flag" ]]; then
179
_flag_ok=1
180
break
181
fi
182
done
183
if (( ! _flag_ok )); then
184
echo "ERROR: required GN flag missing or changed: ${_flag}" >&2
185
exit 1
186
fi
187
done
188
189
if grep -Eq '^[[:space:]]*\[ffmpeg\]=' "$_pkgbuild"; then
190
echo "ERROR: _system_libs[ffmpeg] must stay commented or absent" >&2
191
exit 1
192
fi
193
194
local _source_ok=0 _s
195
for _s in "${source[@]}"; do
196
if [[ "$_s" == cef::git+https://github.com/chromiumembedded/cef.git* ]]; then
197
_source_ok=1
198
break
199
fi
200
done
201
if (( ! _source_ok )); then
202
echo "ERROR: source must use cef::git+https://github.com/chromiumembedded/cef.git" >&2
203
exit 1
204
fi
205
206
local _provides_ok=0 _p
207
for _p in "${provides[@]}"; do
208
if [[ "$_p" == cef=* ]]; then
209
_provides_ok=1
210
break
211
fi
212
done
213
if (( ! _provides_ok )); then
214
echo "ERROR: provides must include cef=\$pkgver" >&2
215
exit 1
216
fi
217
218
local _conflicts_ok=0 _c
219
for _c in "${conflicts[@]}"; do
220
if [[ "$_c" == cef ]]; then
221
_conflicts_ok=1
222
break
223
fi
224
done
225
if (( ! _conflicts_ok )); then
226
echo "ERROR: conflicts must include cef" >&2
227
exit 1
228
fi
229
230
if declare -p replaces >/dev/null 2>&1 && (( ${#replaces[@]} > 0 )); then
231
echo "ERROR: replaces must not be set" >&2
232
exit 1
233
fi
234
235
local _libva_ok=0 _d
236
for _d in "${depends[@]}"; do
237
if [[ "$_d" == libva ]]; then
238
_libva_ok=1
239
break
240
fi
241
done
242
if (( ! _libva_ok )); then
243
echo "ERROR: depends must include libva" >&2
244
exit 1
245
fi
246
}
247
248
prepare() {
249
cd chromium-$_chromium_ver
250
251
# Move CEF into the chromium source tree
252
mv "$srcdir/cef" cef
253
254
# Allow building against system libraries in official builds
255
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
256
tools/generate_shim_headers/generate_shim_headers.py
257
258
# https://crbug.com/893950
259
sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
260
-e '1i #include <cstdlib>' \
261
third_party/blink/renderer/core/xml/*.cc \
262
third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
263
third_party/libxml/chromium/*.cc
264
265
# Fixes from Gentoo
266
patch -Np1 -i ../chromium-138-nodejs-version-check.patch
267
268
# Allow libclang_rt.builtins from compiler-rt >= 16 to be used
269
patch -Np1 -i ../compiler-rt-adjust-paths.patch
270
271
# Increase _FORTIFY_SOURCE level to match Arch's default flags
272
patch -Np1 -i ../increase-fortify-level.patch
273
274
# clang 22 lacks -fsanitize-ignore-for-ubsan-feature, which is needed to use
275
# -fsanitize=array-bounds without triggering UBSan feature detection. Without
276
# feature detection suppression, V8 compiles in __sanitizer_set_death_callback
277
# calls that require the UBSan runtime, which is not linked in a trap-mode
278
# build. Drop the entire sanitize_c_array_bounds cflags block.
279
# Can be dropped when arch has LLVM 23.
280
patch -Np1 -i ../chromium-149-drop-unknown-clang-flag.patch
281
282
# Causes a build failure with our clang version
283
patch -Np1 -i ../chromium-147-revert-clang-no-lifetime-dse-flag.patch
284
285
# https://crbug.com/456218403
286
patch -Np1 -i ../chromium-145-fix-SYS_SECCOMP.patch
287
288
patch -Np1 -i ../chromium-147-rust-1.95-bytemuck.patch
289
290
patch -Np1 -i ../chromium-disable-font-tests.patch
291
292
# https://crbug.com/456677057
293
patch -Np1 -i ../glibc-2.42-baud-rate-fix.patch
294
295
patch -Np1 -i ../chromium-149-use-of-undeclared-identifier-ERROR.patch
296
297
# Fix issue about missing AVX functions
298
# Credit: https://github.com/ungoogled-software/ungoogled-chromium/pull/3837
299
patch -Np1 -i ../chromium-150-revert-avx-flag-change.patch
300
301
patch -Np1 -i ../chromium-152-unbundle-minizip-undo-unicode.patch
302
303
patch -Np1 -i ../chromium-152-unbundle-opus-devtools.patch
304
305
# Use system python3 instead of the hermetic cpython3 interpreter
306
# https://github.com/ungoogled-software/ungoogled-chromium/pull/3946
307
patch -Np1 -i ../chromium-153-hermetic-python.patch
308
309
# third_party/iamf_tools includes vendored Opus via relative "include/opus.h"
310
# paths that only resolve against a real bundled Opus checkout; fix them up
311
# for the unbundled system Opus build
312
patch -Np1 -i ../chromium-153-iamf-tools-unbundled-opus.patch
313
314
patch -Np1 -i ../chromium-154-use-system-esbuild.patch
315
316
patch -Np1 -i ../chromium-154-fix-gn-no-public_inputs.patch
317
318
# Work around TypeScript becoming a build dependency: disable tsgo for the
319
# WebUI and point devtools at the system tsc binary
320
# https://github.com/ungoogled-software/ungoogled-chromium/pull/3966
321
patch -Np1 -i ../chromium-154-typescript.patch
322
323
patch -Np1 -i ../chromium-154-crubit.patch
324
325
patch -Np1 -i ../chromium-154-remove-private_verification_tokens.patch
326
327
patch -Np1 -i ../chromium-154-build-with-wasm-rollup.patch
328
329
# CEF: Remove sysroot requirement for non-x64 builds
330
patch -Np1 -i ../cef-no-sysroot.patch
331
332
# CEF: Remove libxml_visibility patch (fails with system libxml2)
333
patch -Np1 -i ../cef-no-libxml-visibility-patch.patch
334
335
# CEF: Override clang_exe to use system clang
336
echo 'clang_exe = "clang"' >>cef/tools/clang_util.py
337
338
# Link to system tools required by the build
339
mkdir -p \
340
third_party/node/linux/node-linux-x64/bin \
341
third_party/node/linux/node-linux-arm64/bin \
342
third_party/jdk/current/bin \
343
third_party/rust-toolchain/bin \
344
third_party/dawn/tools/golang/linux-amd64/bin \
345
third_party/dawn/tools/golang/linux-arm64/bin
346
347
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
348
ln -s /usr/bin/node third_party/node/linux/node-linux-arm64/bin/
349
ln -s /usr/bin/java third_party/jdk/current/bin/
350
ln -s /usr/bin/rustc third_party/rust-toolchain/bin/
351
ln -s /usr/bin/go third_party/dawn/tools/golang/linux-amd64/bin/
352
ln -s /usr/bin/go third_party/dawn/tools/golang/linux-arm64/bin/
353
354
# remove x86_64 binary and use our own
355
rm -f third_party/gperf/cipd/bin/gperf
356
ln -s /usr/bin/gperf third_party/gperf/cipd/bin/
357
358
rm -rf third_party/devtools-frontend/src/node_modules/esbuild/
359
mkdir -p third_party/devtools-frontend/src/node_modules
360
ln -s /usr/lib/node_modules/esbuild/ third_party/devtools-frontend/src/node_modules/esbuild
361
362
if ((!_system_clang)); then
363
# Use prebuilt rust as system rust cannot be used due to the error:
364
# error: the option `Z` is only accepted on the nightly compiler
365
./tools/rust/update_rust.py
366
367
# To link to rust libraries we need to compile with prebuilt clang
368
./tools/clang/scripts/update.py
369
fi
370
371
# Remove bundled libraries for which we will use the system copies; this
372
# *should* do what the remove_bundled_libraries.py script does, with the
373
# added benefit of not having to list all the remaining libraries
374
local _lib
375
for _lib in ${_unwanted_bundled_libs[@]}; do
376
find "third_party/$_lib" -type f \
377
\! -path "third_party/$_lib/chromium/*" \
378
\! -path "third_party/$_lib/google/*" \
379
\! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
380
\! -regex '.*\.\(gn\|gni\|isolate\)' \
381
-delete
382
done
383
384
./build/linux/unbundle/replace_gn_files.py \
385
--system-libraries "${!_system_libs[@]}"
386
387
# check if the right chromium version is available.
388
local _expected_chromium_ver=$(grep -oP "refs/tags/\K[0-9.]+" cef/CHROMIUM_BUILD_COMPATIBILITY.txt)
389
if [[ "$_expected_chromium_ver" != "$_chromium_ver" ]]; then
390
echo "Error: CEF expects chromium $_expected_chromium_ver, but $_chromium_ver was set in PKGBUILD" >&2
391
# exit 1
392
fi
393
}
394
395
pkgver() {
396
cd chromium-$_chromium_ver
397
398
# python tool to get the full CEF version. For the full output, look at
399
# /usr/include/cef/include/cef_version.h in the built package.
400
python cef/tools/make_version_header.py cef_version_header
401
grep -oP 'CEF_VERSION "\K[^"]+' cef_version_header | sed -E 's/\+.*//'
402
}
403
404
build() {
405
cd chromium-$_chromium_ver
406
407
if ((_system_clang)); then
408
export CC=clang
409
export CXX=clang++
410
export AR=ar
411
export NM=nm
412
else
413
local _clang_path="$PWD/third_party/llvm-build/Release+Asserts/bin"
414
export CC=$_clang_path/clang
415
export CXX=$_clang_path/clang++
416
export AR=$_clang_path/llvm-ar
417
export NM=$_clang_path/llvm-nm
418
fi
419
420
# Add depot_tools to PATH (needed by CEF's gclient_hook.py)
421
export PATH="$PATH:$PWD/third_party/depot_tools"
422
423
# Use system ninja, remove the wrapper which only supports x86_64
424
rm -f third_party/depot_tools/ninja
425
426
# GN defines passed to CEF's gclient_hook.py via GN_DEFINES env var
427
local _flags=(
428
'custom_toolchain="//build/toolchain/linux/unbundle:default"'
429
'host_toolchain="//build/toolchain/linux/unbundle:default"'
430
'is_official_build=true' # implies is_cfi=true on x86_64
431
'symbol_level=0' # sufficient for backtraces on x86(_64)
432
'treat_warnings_as_errors=false'
433
'fatal_linker_warnings=false'
434
'disable_fieldtrial_testing_config=true'
435
'blink_enable_generated_code_formatting=false'
436
'ffmpeg_branding="Chrome"'
437
'proprietary_codecs=true'
438
'rtc_use_pipewire=true'
439
'link_pulseaudio=true'
440
'use_custom_libcxx=true' # https://github.com/llvm/llvm-project/issues/61705
441
'use_sysroot=false'
442
'use_system_libffi=true'
443
'use_qt5=false'
444
'use_qt6=false'
445
'use_gtk=false'
446
'use_cups=false'
447
'use_gio=false'
448
'use_kerberos=false'
449
'use_libpci=false'
450
'use_udev=true'
451
'cef_use_gtk=false'
452
'enable_remoting=false'
453
'use_vaapi=true'
454
'use_clang_modules=false'
455
'devtools_bundle=false'
456
)
457
458
if [[ -n ${_system_libs[icu]+set} ]]; then
459
_flags+=('icu_use_data_file=false')
460
fi
461
462
if ((_system_clang)); then
463
local _clang_version=$(
464
clang --version | grep -m1 version | sed 's/.* \([0-9]\+\).*/\1/'
465
)
466
467
_flags+=(
468
'clang_base_path="/usr"'
469
'clang_use_chrome_plugins=false'
470
"clang_version=\"$_clang_version\""
471
'chrome_pgo_phase=0' # needs newer clang to read the bundled PGO profile
472
)
473
474
# Allow the use of nightly features with stable Rust compiler
475
# https://github.com/ungoogled-software/ungoogled-chromium/pull/2696#issuecomment-1918173198
476
export RUSTC_BOOTSTRAP=1
477
478
_flags+=(
479
'rust_sysroot_absolute="/usr"'
480
'rust_bindgen_root="/usr"'
481
"rustc_version=\"$(rustc --version | awk '{ print $2 ;}')\""
482
)
483
fi
484
485
# Optional C/C++ compiler cache. Fail rather than silently bypass an opt-in.
486
# Chromium invokes rustc directly via its own wrapper, not Cargo/RUSTC_WRAPPER.
487
if [[ ${CEF_VAAPI_SCCACHE:-0} == 1 ]]; then
488
command -v sccache >/dev/null || {
489
echo 'ERROR: CEF_VAAPI_SCCACHE=1 requires sccache in PATH' >&2
490
return 1
491
}
492
_flags+=(
493
'cc_wrapper="sccache"'
494
'use_remoteexec=false' # reclient and cc_wrapper are mutually exclusive
495
'strip_absolute_paths_from_debug_symbols=true'
496
)
497
fi
498
499
# Optional cap on concurrent Python/Node build actions (GN defaults to the
500
# host CPU count, which ignores container CPU and memory limits).
501
if [[ -n ${CEF_VAAPI_ACTION_POOL_DEPTH:-} ]]; then
502
_flags+=("action_pool_depth=${CEF_VAAPI_ACTION_POOL_DEPTH}")
503
fi
504
505
_validate_cef_vaapi_invariants
506
507
export GN_DEFINES="${_flags[*]}"
508
# Only build Release config
509
if [[ $CARCH == "aarch64" ]]; then
510
export GN_DEFINES+=' target_cpu="arm64"'
511
export GN_OUT_CONFIGS="Release_GN_arm64"
512
else
513
export GN_OUT_CONFIGS="Release_GN_x64"
514
fi
515
516
# Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
517
CFLAGS+=' -Wno-builtin-macro-redefined'
518
CXXFLAGS+=' -Wno-builtin-macro-redefined'
519
CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__='
520
521
# Do not warn about unknown warning options
522
CFLAGS+=' -Wno-unknown-warning-option'
523
CXXFLAGS+=' -Wno-unknown-warning-option'
524
525
# Let Chromium set its own symbol level
526
CFLAGS=${CFLAGS/-g /}
527
CXXFLAGS=${CXXFLAGS/-g /}
528
529
# https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123
530
CFLAGS=${CFLAGS/-fexceptions/}
531
CFLAGS=${CFLAGS/-fcf-protection/}
532
CXXFLAGS=${CXXFLAGS/-fexceptions/}
533
CXXFLAGS=${CXXFLAGS/-fcf-protection/}
534
535
# This appears to cause random segfaults when combined with ThinLTO
536
# https://bugs.archlinux.org/task/73518
537
CFLAGS=${CFLAGS/-fstack-clash-protection/}
538
CXXFLAGS=${CXXFLAGS/-fstack-clash-protection/}
539
540
# https://crbug.com/957519#c122
541
CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS/}
542
543
# aarch64: strip -march= as chromium sub-targets need their own arch flags
544
if [[ $CARCH == "aarch64" ]]; then
545
CFLAGS="${CFLAGS/-march=*([^ ]) }"
546
CXXFLAGS="${CXXFLAGS/-march=*([^ ]) }"
547
fi
548
549
python3 cef/tools/gclient_hook.py
550
sed -i '/__sanitizer_set_death_callback/d' v8/src/sandbox/testing.cc
551
552
if [[ $CARCH == "aarch64" ]]; then
553
ninja -C out/Release_GN_arm64 libcef chrome_sandbox
554
else
555
ninja -C out/Release_GN_x64 libcef chrome_sandbox
556
fi
557
558
# Build the CEF binary distribution
559
if [[ $CARCH == "aarch64" ]]; then
560
local _distrib_arch_flag="--arm64-build"
561
else
562
local _distrib_arch_flag="--x64-build"
563
fi
564
565
python3 cef/tools/make_distrib.py \
566
--distrib-subdir=distrib \
567
--output-dir=.. \
568
--ninja-build \
569
$_distrib_arch_flag \
570
--minimal \
571
--no-docs \
572
--no-archive
573
}
574
575
package() {
576
cd distrib_minimal
577
578
install -d "$pkgdir/usr/lib/cef/"
579
cp -r Release/* "$pkgdir/usr/lib/cef/"
580
install -Dvm4755 Release/chrome-sandbox "$pkgdir/usr/lib/cef/chrome-sandbox"
581
cp -r Resources/* "$pkgdir/usr/lib/cef/"
582
583
# Headers
584
install -d "$pkgdir/usr/include/cef"
585
cp -a "include" "$pkgdir/usr/include/cef/"
586
587
# libcef_dll wrapper source
588
install -d "$pkgdir/usr/src/cef"
589
cp -a "libcef_dll" "$pkgdir/usr/src/cef/"
590
591
# Remove include file targets, since includes are in a different path
592
sed -i -e '/\.\.\/include/d' "$pkgdir/usr/src/cef/libcef_dll/CMakeLists.txt"
593
594
# The FindCEF.cmake from CEF expects one unified directory.
595
# We provide a custom FindCEF.cmake that looks in the right places.
596
# Copied from https://src.fedoraproject.org/rpms/cef/blob/rawhide/f/FindCEF.cmake (thanks Fedora!)
597
install -Dm644 "$srcdir/FindCEF.cmake" -t "$pkgdir/usr/share/cmake/Modules/"
598
599
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE-CEF"
600
install -Dm644 ../chromium-$_chromium_ver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-CHROMIUM"
601
}
602
603
# vim:set ts=2 sw=2 et:
604
Changes since previous scan
--- PKGBUILD @ 2026-11-01 05:59+++ PKGBUILD @ 2026-11-01 07:59@@ -16,7 +16,7 @@ # the chromium version must match CHROMIUM_BUILD_COMPATIBILITY.txt in the CEF repo _chromium_ver=154.0.8037.154 _system_clang=1-pkgrel=4+pkgrel=2 pkgdesc="Chromium Embedded Framework (CEF), simple framework for embedding Chromium-based browsers in other applications (VAAPI-enabled variant)" provides=("cef=$pkgver") # provides="cef=$pkgver" conflicts=('cef') # conflicts='cef'@@ -39,7 +39,6 @@ 'pango' 'systemd-libs' 'libva'- 'vulkan-icd-loader' ) optdepends=( 'libva-mesa-driver: VAAPI driver for AMD GPUs'@@ -581,12 +580,6 @@ install -Dvm4755 Release/chrome-sandbox "$pkgdir/usr/lib/cef/chrome-sandbox" cp -r Resources/* "$pkgdir/usr/lib/cef/" - # Point CEF at the system Vulkan loader. ANGLE only searches libcef.so's- # directory for libvulkan, so the file must exist there. A second bundled- # loader breaks Dawn's WebGPU device when the host already loaded the- # system one (e.g. GTK4), leaving only the SwiftShader software adapter.- ln -sf /usr/lib/libvulkan.so.1 "$pkgdir/usr/lib/cef/libvulkan.so.1"- # Headers install -d "$pkgdir/usr/include/cef" cp -a "include" "$pkgdir/usr/include/cef/"Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-01 07:59:34 | Medium | 1 |
| 2026-11-01 05:59:34 | Medium | 1 |
| 2026-11-01 00:21:48 | Low | 2 |
| 2026-10-31 19:58:49 | Medium | 1 |
| 2026-10-31 15:58:34 | Medium | 1 |
| 2026-10-31 00:07:41 | Low | 2 |
| 2026-10-30 00:29:30 | Low | 2 |
| 2026-10-29 11:52:15 | Medium | 1 |
| 2026-10-29 07:52:02 | Medium | 1 |
| 2026-10-29 00:13:55 | Low | 2 |
| 2026-10-28 21:50:44 | Medium | 1 |
| 2026-10-28 00:06:54 | Low | 2 |
| 2026-10-27 00:23:28 | Low | 2 |
| 2026-10-26 00:12:40 | Low | 2 |
| 2026-10-25 00:20:48 | Low | 2 |
| 2026-10-24 07:39:45 | Medium | 1 |
| 2026-10-24 00:14:55 | Low | 2 |
| 2026-10-23 00:02:19 | Low | 2 |
| 2026-10-22 00:13:10 | Low | 2 |
| 2026-10-21 00:12:50 | Low | 2 |