Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhmars:arch
chromium122
PKGBUILD
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PKGBUILD of Package chromium122
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Pierre Schmitz <pierre@archlinux.de> # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> _clang=1 _clang_pgo=1 _clang_polly= _use_custom_libcxx=1 pkgname=chromium pkgver=122.0.6182.0 pkgrel=1 _launcher_ver=8 _gcc_patchset=120 _manual_clone=0 pkgdesc="A web browser built for speed, simplicity, and security" arch=('x86_64') url="https://www.chromium.org/Home" license=('BSD') depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt' 'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva' 'fontconfig' 'woff2' 'aom' 'libvpx' 'brotli' 'libjpeg' 'icu' 'dav1d' 'flac' 'snappy' 'libxml2' 'zstd' 'ffmpeg' 'libwebp' 'minizip' 'opus' 'harfbuzz' 're2' 'libavif' 'jsoncpp' 'libxslt' 'libpng' 'freetype2' 'libffi' 'desktop-file-utils' 'hicolor-icon-theme') makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire' 'unzip' 'llvm' 'polly' 'rust' 'qt5-base' 'java-runtime-headless' 'git') optdepends=('pipewire: WebRTC desktop sharing under Wayland' 'kdialog: support for native dialogs in Plasma' 'qt5-base: enable Qt5 with --enable-features=AllowQt' 'gtk4: for --gtk-version=4 (GTK4 IME might work better on Wayland)' 'org.freedesktop.secrets: password storage backend on GNOME / Xfce' 'kwallet: support for storing passwords in KWallet on Plasma') options=('!lto') # Chromium adds its own flags for ThinLTO source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/$_gcc_patchset/chromium-patches-$_gcc_patchset.tar.bz2 use-oauth2-client-switches-as-default.patch) sha256sums=('SKIP' '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' 'SKIP' 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') if (( _manual_clone )); then source[0]=fetch-chromium-release makedepends+=('python-httplib2' 'python-pyparsing' 'python-six') fi # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py # Keys are the names in the above script; values are the dependencies in Arch declare -gA _system_libs=( #[brotli]=brotli # [dav1d]=dav1d # no rebuild # [ffmpeg]=ffmpeg # no rebuild [flac]=flac [fontconfig]=fontconfig [freetype]=freetype2 [harfbuzz-ng]=harfbuzz # [icu]=icu # no rebuild # [jsoncpp]=jsoncpp # _use_custom_libcxx, v1.9.5-2 fail to build with chromium v120 #[libaom]=aom # [libavif]=libavif # no rebuild [libdrm]= [libjpeg]=libjpeg [libpng]=libpng #[libvpx]=libvpx [libwebp]=libwebp # [libxml]=libxml2 # _use_custom_libcxx, v2.11.5-1 fail to build with chromium v121 [libxslt]=libxslt # [opus]=opus # no rebuild # [re2]=re2 # no rebuild # [snappy]=snappy # _use_custom_libcxx, v1.1.10-1 fail to build with chromium v121 # [woff2]=woff2 # _use_custom_libcxx, v1.0.2-4 fail to build with chromium v120 # [zlib]=minizip # _use_custom_libcxx, v1:1.3-2 fail to build with chromium v120 [zstd]=zstd ) _unwanted_bundled_libs=( $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/') ) # depends+=(${_system_libs[@]}) # bsdtar: Failed to set default locale # fixed by obs-config # export LC_ALL=C # Google API keys (see https://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. # # Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left # out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/ _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM prepare() { if (( _manual_clone )); then ./fetch-chromium-release $pkgver fi # local _pkgver=103.0.5060.53 # tar xf $startdir/chromium-$_pkgver.tar.xz chromium-$_pkgver/third_party # rm -rf chromium-$pkgver/third_party && mv chromium-$_pkgver/third_party chromium-$pkgver/third_party # cd chromium-$pkgver && patch -Np1 -i $startdir/0002-upstream-fixes.patch && cd $srcdir cd chromium-$pkgver # Allow building against system libraries in official builds sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ tools/generate_shim_headers/generate_shim_headers.py # https://crbug.com/893950 sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \ third_party/blink/renderer/core/xml/*.cc \ third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \ third_party/libxml/chromium/*.cc \ third_party/maldoca/src/maldoca/ole/oss_utils.h # Use the --oauth2-client-id= and --oauth2-client-secret= switches for # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at # runtime -- this allows signing into Chromium without baked-in values patch -Np1 -i ../use-oauth2-client-switches-as-default.patch # Upstream fixes # Fixes for building with libstdc++ instead of libc++ if [[ -z "$_use_custom_libcxx" ]]; then echo "Patching with libstdc++ patches..." 1>&2 patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-114-ruy-include.patch patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-117-material-color-include.patch # patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-117-system-zstd.patch patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-119-at-spi-variable-consumption.patch patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-119-clang16.patch patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-120-chromedriver-string.patch # patch -Np1 -i ../chromium-patches-$_gcc_patchset/chromium-120-compiler.patch # echo "Patching with custom libstdc++ patches..." 1>&2 # patch -Np1 -i $startdir/fixes-nullptr_t.patch fi # https://src.fedoraproject.org/rpms/chromium # https://build.opensuse.org/package/show/network:chromium/chromium # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium # https://github.com/stha09/chromium-patches # https://gitlab.com/Matt.Jolly/chromium-patches # https://github.com/flathub/org.chromium.Chromium/ # https://github.com/ungoogled-software/ungoogled-chromium-archlinux # https://github.com/saiarcot895/chromium-ubuntu-build local _patches=() if [[ -n "$_use_custom_libcxx" ]]; then _patches+=( # https://github.com/chromium/chromium/commit/fc09363b2278893790d131c72a4ed96ec9837624 # ERROR at //build/config/linux/atspi2/BUILD.gn:22:13: Assignment had no effect. # https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-119-dont-redefine-ATSPI-version-macros.patch # chromium-119-dont-redefine-ATSPI-version-macros.patch ) fi _patches+=( # https://gitlab.com/Matt.Jolly/chromium-patches/-/tree/117 chromium-117-system-zstd.patch # https://aur.archlinux.org/packages/chromium-dev#comment-890902 # https://freetype.org/freetype2/docs/hinting/text-rendering-general.html # https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_render_glyph chromium-119-improve-font-rendering.patch # https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-81.0.4044.92-unbundle-zlib.patch # chromium-81-system-zlib.patch # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-109-system-zlib.patch # https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-119-system-minizip-header-fix.patch # chromium-109-system-zlib.patch # https://bugs.gentoo.org/874594 # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-108-EnumTable-crash.patch # https://build.opensuse.org/package/view_file/network:chromium/chromium/chromium-disable-GlobalMediaControlsCastStartStop.patch?expand=1 # https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-119-disable-GlobalMediaControlsCastStartStop.patch # chromium-119-disable-GlobalMediaControlsCastStartStop.patch # ungoogled chromium 0009-disable-google-ipv6-probes.patch add-ungoogled-flag-headers.patch disable-formatting-in-omnibox.patch add-ipv6-probing-option.patch enable-page-saving-on-more-pages.patch disable-download-quarantine.patch # https://github.com/Eloston/ungoogled-chromium/pull/1789 # add-flag-to-stack-tabs.patch add-flag-to-configure-extension-downloading.patch add-flag-for-search-engine-collection.patch add-flag-to-disable-beforeunload.patch add-flag-to-force-punycode-hostnames.patch add-flag-to-show-avatar-button.patch add-suggestions-url-field.patch # fix-building-without-enabling-reporting.patch disable-dial-repeating-discovery.patch # 0001-fix-building-without-safebrowsing.patch # fix-building-without-safebrowsing.patch # remove-unused-preferences-fields.patch disable-crash-reporter.patch # 0001-disable-crashpad.patch # bromite # Disable-FLoC-by-default.patch # 0001-disable-AdsBlockedInfoBar.patch # 0001-Bromite-AdBlockUpdaterService.patch # https://github.com/flathub/org.chromium.Chromium/ x11-Set-_NET_WM_BYPASS_COMPOSITOR-for-fullscreen.patch # Enable-accelerated-mjpeg-decode-on-Linux.patch Use-CHROME_WRAPPER-as-the-executable-on-restart.patch # gl-Ensure-EGL-errors-are-preserved.patch # gl-Try-older-GLES-versions-on-EGL_BAD_ATTRIBUTE.patch # https://github.com/chromium/chromium/commit/bcf739b95713071687ff25010683248de0092f6a # build/config/rust.gni # tools/rust/update_rust.py # allow build without rust 0001-231128-Remove-enable_rust_qr-build-flag.patch # Restore VaapiVideoDecodeAccelerator support # QUILT_SERIES=../_quilt_series QUILT_PATCHES=~/work/pkg/obs/arch/chromium122 quilt push # v122 # https://github.com/chromium/chromium/commit/d6708d643cdc06527c287a75e2069e2f6080f0a2 0001-231212-gpu-ozone-fix-possible-access-of-null-texture-holder.patch # https://github.com/chromium/chromium/commit/c69aaf0eff37ef9b318d1f36630ec6ca3ce603fe 0001-231129-gpu-ozone-reuse-texture-holders-from-compatible-contexts.patch # v120 # https://github.com/chromium/chromium/commit/e6521e8dcf041e16c6d42346e8256f53f40dc5a9 # see also 0001-230901-Reland-vaapi-Remove-usage-of-GL-and-libva-x11.patch # use_egl: ERROR at //media/gpu/vaapi/BUILD.gn:161:7: Undefined identifier 0001-231013-Reland-Reland-vaapi-Remove-usage-of-GL-and-libva-x11.patch # https://github.com/chromium/chromium/commit/87fca7f1759e800bd72b5ab6511eea17d6400a76 # for 0001-230622-add-CHECK-to-make-sure-the-VaapiVDA-path-is-never-taken.patch 0001-231024-video-hide-UseChromeOSDirectVideoDecoder-flag-on-VA-API-devices.patch # https://github.com/chromium/chromium/commit/e5a6831e7daf63fa78371d23d112bcaffeb6d00e # NOTE: revert in 121.0.6155.2, see https://github.com/chromium/chromium/commit/8c02de8addb7af74b61845d5c6b76f10de1fab59 # for 0001-231025-Add-RGBA_F16-support-for-ChromeOS-and-Lacros.patch # 0001-231104-Disable-Lacros-HDR-feature-support-due-to-crashes.patch # https://github.com/chromium/chromium/commit/0a982328584e38c456aa18ecb42783a36c11b5b1 # for 0001-230712-Eliminate-buffer_format_utils.patch 0001-231025-Add-RGBA_F16-support-for-ChromeOS-and-Lacros.patch # # NOTE: enable by default in v122.0.6170.3, see https://github.com/chromium/chromium/commit/1568d67ea0bbc5aa8395ab072978efdcb505a518 # NOTE: revert in v121.0.6119.0, see https://github.com/chromium/chromium/commit/cbb1328067901809861e1e426fc09b82f444d8cb # https://github.com/chromium/chromium/commit/60d6be9bd2ba52478e457b62339d6c7d28b1c0f0 # 0001-231027-gpu-enable-EnablePerContextGLTextureCache-by-default.patch # https://github.com/chromium/chromium/commit/96a16804a5d18d65346fd9569a683c5597517dc7 0001-231026-gpu-add-EnablePerContextGLTextureCache-for-OzoneImageBacking.patch # https://github.com/chromium/chromium/commit/c8cbab4f196ed9258781a3a30c6f53934908bc34 0001-231023-gpu-introduce-OzoneImageGLTexturesHolder.patch # https://github.com/chromium/chromium/commit/faf82bd58ee8b6ea1d70327cbc05fe525d5256f6 0001-231006-Refactor-TexturePassthrough-LevelInfo.patch # # v119 # https://github.com/chromium/chromium/commit/42d57d016f5fb6d2a1a354743b9be911c1be87e8 0001-230922-Free-the-X11-pixmap-in-the-NativePixmapEGLX11Binding-destructor.patch # # v118 # NOTE: revert in v119, see https://github.com/chromium/chromium/commit/36a1a1e86b95a640012998ad180755f570c6a0c6 # https://github.com/chromium/chromium/commit/11482538029498ebbf41bdb8054856a7b21a08bb # 0001-230901-Reland-vaapi-Remove-usage-of-GL-and-libva-x11.patch # https://github.com/chromium/chromium/commit/800aa1ccb31e849de92de1ed65cbf3329f780e6e 0001-230810-media-Update-commentary-for-legacy-VDA.patch # # v117 # https://github.com/chromium/chromium/commit/96befc4b17e0f4c11c7f199f0d4759699a60bb60 0001-230712-Eliminate-buffer_format_utils.patch # https://github.com/chromium/chromium/commit/7a3a90933bf0973853453735eab6e5d8c84a112f 0001-230712-Ozone-Rename-unittest.patch # https://github.com/chromium/chromium/commit/8f61fe3622a36b905835916c78ee9bcba5854afd 0001-230711-GPU-Remove-Texture-has_images.patch # https://github.com/chromium/chromium/commit/ab0b18e3fcd64c5376e08cb6a2838553d90dadc9 0001-230711-Ozone-Strip-down-GLImageNativePixmap-unittest-to-whats-actually-run.patch # https://github.com/chromium/chromium/commit/58a3c40eba9c7b1636457643d9e8ecb4c9958bdb # [GPU][Mac] Remove no-longer-needed workaround 0001-230711-build-fixes.patch # https://github.com/chromium/chromium/commit/31e7b5644a50d20f9c07228e48b0133648d5ed56 0001-230710-GPU-Remove-GLImageNativePixmap.patch # https://github.com/chromium/chromium/commit/f6fdb3158816ba224f792c1fc0c0775188ce9b1b 0001-230707-Change-test-to-create-NativePixmapGLBinding-directly.patch # https://github.com/chromium/chromium/commit/81cea526c9ea8bb49e5deb6b3da39fa77f2f0683 0001-230706-Ozone-Fold-gl_image_test_template-into-unittest-that-uses-it.patch # https://github.com/chromium/chromium/commit/651dc1143201ef28ec0a7732f93e374808620b3c 0001-230623-Fold-NativePixmapEGLX11BindingHelper-into-binding-class.patch # https://github.com/chromium/chromium/commit/5c0666589e3a0099e1559d9f172d79e1289cca98 0001-230622-add-CHECK-to-make-sure-the-VaapiVDA-path-is-never-taken.patch # https://github.com/chromium/chromium/commit/5306d4a50586b3159dd938cc9cfefe5912d8d452 # media: Add VideoDecoderType::kV4L2 to linux # https://github.com/chromium/chromium/commit/064f82bf9239232b1619ca68a7487425f7cc328c 0001-230622-media-remove-legacy-VDA-code-from-gpu_mojo_media_client_linux.patch # # v116 # https://github.com/chromium/chromium/commit/45a8ef1c39114b2f3d048635a7dbe3b25c24c9e9 0001-230619-Eliminate-GLImage.patch # https://github.com/chromium/chromium/commit/defb3ccfb6685130745cfc65854b4e14092b2ea9 0001-230608-Remove-notion-of-size-from-NativePixmapEGLX11Binding-and-friends.patch # https://github.com/chromium/chromium/commit/6fb414a7d51f46940cf9c45df04f6ee398f8da1b 0001-230607-media-remove-VaapiVideoDecodeAccelerator.patch # https://github.com/chromium/chromium/commit/7164e40f858c9c00fc05c5ab35606d976afcfad7 # Treat color space changes as config changes # vaapi_video_decode_accelerator.cc:511:37: error: no member named 'kColorSpaceChange' in 'media::AcceleratedVideoDecoder' # # https://github.com/chromium/chromium/commit/93a61df1e41b3e76b6050acca627731d81490d61 # Update enum member style of VideoDecodeAccelerator::Config::OutputMode # vaapi_video_decode_accelerator.cc:744:46: error: no member named 'ALLOCATE' in 'media::VideoDecodeAccelerator::Config::OutputMode' # vaapi_video_decode_accelerator.cc:822:43: error: no member named 'IMPORT' in 'media::VideoDecodeAccelerator::Config::OutputMode' # # https://github.com/chromium/chromium/commit/674c70394b4dd1c98f7ac20c04a6e7cb797443db # Vp9Parser: Remove kAwaitingRefresh # vaapi_video_decode_accelerator.cc:523:37: error: no member named 'kNeedContextUpdate' in 'media::AcceleratedVideoDecoder' # for 0001-230607-media-remove-VaapiVideoDecodeAccelerator.patch 0001-230607-build-fixes.patch # # https://github.com/chromium/chromium/commit/be08b98b112a714108c7cbbff94fde5959f4dd1c # for 0001-230607-media-remove-VaapiVideoDecodeAccelerator.patch 0001-231201-build-fixes.patch # https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/commit/ab2cb4bf77d20016a2079dd6196e5b75ae9bf343 # fix memleak with VaapiVideoDecodeLinuxGL # https://crbug.com/1467689 0001-230922-custom-Free-the-X11-pixmap-in-the-NativePixmapEGLX11Binding-destructor.patch # https://github.com/saiarcot895/chromium-ubuntu-build # enable_vaapi_on_linux.patch # https://aur.archlinux.org/packages/chromium-vaapi/ # https://bbs.archlinux.org/viewtopic.php?pid=1877774#p1877774 # https://bbs.archlinux.org/viewtopic.php?pid=1912232#p1912232 # Wayland/EGL regression (crbug #1071528 #1071550) # 0001-wayland-egl.patch # Enable VAAPI on Wayland # https://aur.archlinux.org/packages/chromium-wayland-vaapi/ # https://github.com/OSSystems/meta-browser # https://github.com/chromium/chromium/commit/e9a9a4ab4d90dba44e030d121d93d50ece163d98 # https://github.com/chromium/chromium/commit/6fb414a7d51f46940cf9c45df04f6ee398f8da1b # 0001-ozone-wayland-add-VA-API-support.patch # # 0001-enable-linux-unstable-deb-target.patch 0001-adjust-buffer-format-order.patch 0001-vaapi-flag-ozone-wayland.patch # https://bugs.chromium.org/p/chromium/issues/detail?id=1039161 # https://chromium-review.googlesource.com/c/chromium/src/+/3750452 0001-ozone-wayland-implement-text_input_manager_v3.patch 0001-ozone-wayland-implement-text_input_manager-fixes.patch # https://gist.github.com/thubble/235806c4c64b159653de879173d24d9f # https://bbs.archlinux.org/viewtopic.php?pid=2080653#p2080653 # https://bbs.archlinux.org/viewtopic.php?pid=2086202#p2086202 # https://bbs.archlinux.org/viewtopic.php?pid=2117595#p2117595 # # https://github.com/chromium/chromium/commit/ddef1cd73ff64c1c99a6f63580d5ecae43209213 # https://github.com/chromium/chromium/commit/2ad597617ecaf233efa5c5cf8d9c3ec8c8fe9757 # 0001-support-disjoint-vaapi-export-import.patch # https://chromium-review.googlesource.com/c/chromium/src/+/3646633 # 0001-Support-VA-API-on-Linux-Ozone-Wayland.patch # # https://github.com/OSSystems/meta-browser/issues/711 # https://aur.archlinux.org/packages/wayland-chromium # https://github.com/chromium/chromium/tree/main/third_party/wayland # https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland # https://gitlab.freedesktop.org/wayland/wayland # git clone --depth=16 -b chromium_1_21_0 https://chromium.googlesource.com/external/anongit.freedesktop.org/git/wayland/wayland # build/linux/unbundle/replace_gn_files.py # 0001-unbundle-wayland-lib.patch # # https://discourse.ubuntu.com/t/chromium-hardware-accelerated-build-for-intel-based-platforms-available-for-beta-testing/35625 # https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/ # https://bugs.chromium.org/p/chromium/issues/detail?id=1399841 # Unable to play HEVC video via hardware codec # # https://bugs.chromium.org/p/chromium/issues/detail?id=1445074 # GPU HW Decode No Longer Works on AMD 6800XT # # https://bugs.chromium.org/p/chromium/issues/detail?id=1475278 # VAAPI video acceleration broken in chrome 116 # Implement text_input_manager_v3 # https://chromium-review.googlesource.com/c/chromium/src/+/3015331/ # https://chromium-review.googlesource.com/c/chromium/src/+/3750452 # https://github.com/brave/brave-browser/issues/20659 # https://searchfox.org/mozilla-central/source/browser/components/search/extensions/bing/manifest.json # https://searchfox.org/mozilla-central/source/browser/components/search/extensions/baidu/manifest.json # https://searchfox.org/mozilla-central/source/browser/components/search/extensions/google/_locales/en/messages.json 0001-update-search_engines.patch # https://github.com/RobRich999/Chromium_Clang/issues/17 0001-compiler-optimizations.patch # 0001-add-flag-to-close-window-with-last-tab.patch 0001-add-flag-to-convert-popups-to-tabs.patch 0001-add-flag-to-scroll-tabs.patch 0001-add-flag-for-bookmark-bar-ntp.patch 0001-add-flag-for-max-connections-per-host.patch # https://github.com/chromium/chromium/commit/e2124a1d261f70ffe0048553b0f4642e0444d6a1 # https://www.ghacks.net/2019/10/24/chrome-78-launches-with-security-updates-and-tab-overlay-feature/ # chromium >= 91 0001-disable-tab-over-card.patch # https://github.com/chromium/chromium/commit/d1b69376ae7636a1d17a784ab5e09550899aebec # https://github.com/ungoogled-software/contrib/blob/master/tweaks/visual/remove-tab-search-button.patch # https://github.com/ungoogled-software/ungoogled-chromium/pull/2366#issuecomment-1567022249 # chromium >= 91 0001-disable-tab-search.patch # https://github.com/chromium/chromium/commit/a5b25c4afdcd8b4045730223edee05aa85277e57 # https://github.com/ungoogled-software/ungoogled-chromium/commit/9b0bfc9085c114735a1bc5c49c98840f59b3b002 # https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/extra/ungoogled-chromium/add-flag-to-hide-extensions-menu.patch # chrome/browser/ui/toolbar/toolbar_actions_bar.cc # chrome/browser/extensions/extension_context_menu_model.cc # 0001-disable-extensions-toolbar-menu.patch # https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/extra/ungoogled-chromium/add-flag-to-hide-side-panel-button.patch 0001-disable-side-panel-button.patch # https://github.com/Eloston/ungoogled-chromium/pull/1817#issuecomment-1025211103 # https://github.com/Eloston/ungoogled-chromium/issues/1835 # https://github.com/ungoogled-software/ungoogled-chromium/blob/master/patches/extra/ungoogled-chromium/add-flag-to-disable-sharing-hub.patch # https://github.com/chromium/chromium/blob/103.0.5060.53/chrome/browser/share/core/resources/share_targets.asciipb # chromium >= 98 # IDS_SHARING_HUB_SHARE_LABEL # IDS_SHARING_HUB_SHARE_LABEL_ACCESSIBILITY # chrome/app/generated_resources.grd # 0001-disable-sharing-hub-in-omnibox.patch # 0001-disable-share-menu.patch # https://github.com/chromium/chromium/commit/8bdb3b260d33741fc75658e511751cacc1b9f4c7 # https://github.com/chromium/chromium/commit/6c21d9c6f71a33fa2ca216e53c251b4b1a18f92e # https://github.com/chromium/chromium/commit/637e7d6930eaa616b01944dce1a4fe9d2f609b6e # https://github.com/chromium/chromium/commit/663480d685aa6ba66321b9431908c405d3f47bf3 # --disable-features=ReadLater # chromium >= 94 # 0001-disable-read-later.patch 0001-add-flag-for-close-confirmation.patch # https://www.v2ex.com/t/812520 # --disable-features=CopyLinkToText # https://github.com/chromium/chromium/commit/651b4767e8d343ca2259dd9ece38c697d46384a5 # https://github.com/chromium/chromium/commit/fe7528eb5782d26a56428aa3e4ca76b44c5aa03a 0001-disable-copy-link-to-text.patch # 0001-disable-avatar-button.patch # https://github.com/flathub/org.chromium.Chromium/ 0001-enable-accelerated-mjpeg-decode.patch # 0001-disable-av1-decoder.patch 0001-disable-cbcm-error.patch 0001-disable-download_bubble.patch 0001-highlight-gpu-feature.patch 0001-remove-flag-from-kBadFlags.patch ) # bash _update.sh remote # cd remote && zip -r ../remote-patches.zip . if [[ -f "$startdir/remote-patches.zip" ]]; then unzip -d "$startdir" "$startdir/remote-patches.zip" fi echo "Patching with custom patches..." 1>&2 local src for src in "${_patches[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue if patch --dry-run -s -Np1 -i "${startdir}/$src";then echo " Applying patch $src..." 1>&2 patch -s -Np1 -i "${startdir}/$src" else echo " Skipping patch $src..." 1>&2 fi done # Link to system tools required by the build mkdir -p third_party/node/linux/node-linux-x64/bin ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ ln -s /usr/bin/java third_party/jdk/current/bin/ # Remove bundled libraries for which we will use the system copies; this # *should* do what the remove_bundled_libraries.py script does, with the # added benefit of not having to list all the remaining libraries local _lib for _lib in ${_unwanted_bundled_libs[@]}; do find "third_party/$_lib" -type f \ \! -path "third_party/$_lib/chromium/*" \ \! -path "third_party/$_lib/google/*" \ \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \ \! -regex '.*\.\(gn\|gni\|isolate\)' \ -delete done ./build/linux/unbundle/replace_gn_files.py \ --system-libraries "${!_system_libs[@]}" } build() { make -C chromium-launcher-$_launcher_ver cd chromium-$pkgver local _flags=( 'custom_toolchain="//build/toolchain/linux/unbundle:default"' 'host_toolchain="//build/toolchain/linux/unbundle:default"' 'clang_use_chrome_plugins=false' 'is_official_build=true' # implies is_cfi=true on x86_64 'symbol_level=0' # sufficient for backtraces on x86(_64) 'treat_warnings_as_errors=false' 'disable_fieldtrial_testing_config=true' 'blink_enable_generated_code_formatting=false' 'ffmpeg_branding="Chrome"' 'proprietary_codecs=true' 'rtc_use_pipewire=true' 'link_pulseaudio=true' 'use_sysroot=false' 'use_system_libffi=true' 'enable_widevine=true' 'enable_nacl=false' 'enable_rust=false' "google_api_key=\"$_google_api_key\"" ) if [[ -n ${_system_libs[icu]+set} ]]; then _flags+=('icu_use_data_file=false') fi if [[ -z "$_use_custom_libcxx" ]]; then _flags+=('use_custom_libcxx=false') fi if [[ -n "$_clang" ]]; then # for clang # build/toolchain/linux/unbundle/README.md # build/toolchain/linux/unbundle/BUILD.gn # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-dev local _llvm_dir='/usr' if [[ -f "$startdir/clang-linux.tar.xz" ]]; then # tools/clang/scripts/update.py # clang-llvmorg-15-init-10168-gc2a7904a-1.tgz local _llvm_unpack_dir='third_party/llvm-build/Release+Asserts' mkdir -p $_llvm_unpack_dir && tar -xf "$startdir/clang-linux.tar.xz" -C $_llvm_unpack_dir _llvm_dir="$PWD/$_llvm_unpack_dir" # error: Error in reading profile ../../chrome/build/pgo_profiles/chrome-linux.profdata # unsupported instrumentation profile format version [[ -d "$_llvm_dir/llvm-16.0.6-x86_64" ]] && \ _llvm_dir="$PWD/$_llvm_unpack_dir/llvm-16.0.6-x86_64" && _clang_pgo= [[ -d "$_llvm_dir/llvm-17.0.6-x86_64" ]] && \ _llvm_dir="$PWD/$_llvm_unpack_dir/llvm-17.0.6-x86_64" [[ -d "$_llvm_dir/llvm-18.0.0-rc1-x86_64" ]] && \ _llvm_dir="$PWD/$_llvm_unpack_dir/llvm-18.0.0-rc1-x86_64" fi export CC="$_llvm_dir/bin/clang" CXX="$_llvm_dir/bin/clang++" export AR="$_llvm_dir/bin/llvm-ar" NM="$_llvm_dir/bin/llvm-nm" export MAKEFLAGS="-j$(nproc)" export CFLAGS="-march=haswell -mtune=haswell -O3 -pipe -fno-plt" # export CFLAGS="-march=westmere -mtune=haswell -O3 -mavx -pipe -fno-plt" # export CFLAGS="-march=x86-64 -mtune=haswell -O3 -mssse3 -msse4.1 -mavx -pipe -fno-plt" export CFLAGS+=" -falign-functions=32" export CFLAGS+=" -fno-stack-protector" export CFLAGS+=" -fno-semantic-interposition" export CFLAGS+=" -fno-math-errno -fno-trapping-math" # https://github.com/RobRich999/Chromium_Clang/issues/17 export CFLAGS+=" -ffp-contract=fast" # https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/commit/fa08adba87b6222bdf9ba31aaa41579e634ec444 export CFLAGS+=" -mllvm -disable-auto-upgrade-debug-info" if [[ -n "$_clang_polly" ]]; then # prebuilt clang not support polly 20220711 # https://polly.llvm.org/docs/UsingPollyWithClang.html#make-polly-available-from-clang # https://github.com/macchrome/winchrome/releases/tag/v83.0.4103.106-r756066-Win64 # Polly should be checked out into tools/polly before compilation # export CFLAGS+=" -mllvm -polly" # export CFLAGS+=" -mllvm -polly-enable-delicm=false" # export CFLAGS+=" -mllvm -polly-enable-optree=false" # export CFLAGS+=" -mllvm -polly-dependences-computeout=0" # export CFLAGS+=" -mllvm -polly-invariant-load-hoisting" # export CFLAGS+=" -mllvm -polly-opt-outer-coincidence=yes" # export CFLAGS+=" -mllvm -polly-opt-simplify-deps=no" # export CFLAGS+=" -mllvm -polly-position=early" # export CFLAGS+=" -mllvm -polly-run-dce" # export CFLAGS+=" -mllvm -polly-vectorizer=stripmine" # # https://bugs.archlinux.org/task/66226 export CFLAGS+=" -Xclang -load -Xclang LLVMPolly.so" export CFLAGS+=" -mllvm -polly" export CFLAGS+=" -mllvm -polly-run-dce" export CFLAGS+=" -mllvm -polly-run-inliner" export CFLAGS+=" -mllvm -polly-reschedule=1" export CFLAGS+=" -mllvm -polly-loopfusion-greedy=1" export CFLAGS+=" -mllvm -polly-postopts=1" export CFLAGS+=" -mllvm -polly-ast-use-context" export CFLAGS+=" -mllvm -polly-detect-keep-going" export CFLAGS+=" -mllvm -polly-vectorizer=stripmine" export CFLAGS+=" -mllvm -polly-invariant-load-hoisting" fi # ignore warnings # export CFLAGS+=" -Wno-deprecated-declarations -Wno-macro-redefined -Wno-unused-function" # export CFLAGS+=" -Wno-sign-compare -Wno-unreachable-code -Wno-invalid-offsetof" # # https://src.fedoraproject.org/rpms/chromium # export CFLAGS+=" -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-unused-command-line-argument" # export CFLAGS+=" -Wno-unused-but-set-variable -Wno-unused-result -Wno-unused-function -Wno-unused-variable" # export CFLAGS+=" -Wno-unused-const-variable -Wno-unneeded-internal-declaration -Wno-unknown-attributes" # # https://build.opensuse.org/package/show/network:chromium/chromium export CFLAGS+=" -Wno-return-type" export CFLAGS+=" -Wno-pedantic -Wno-unused-result -Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations" export CFLAGS+=" -Wno-return-type -Wno-parentheses -Wno-misleading-indentation" export CFLAGS+=" -Wno-attributes" export CFLAGS+=" -Wno-ignored-attributes" export CFLAGS+=" -Wno-address -Wno-dangling-else -D_GNU_SOURCE" # # export CFLAGS+=" -Wno-unused-command-line-argument -Wno-unknown-warning-option" export CXXFLAGS="${CFLAGS}" export LDFLAGS="-Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now" export LDFLAGS+=",-z,pack-relative-relocs" # export LDFLAGS="${LDFLAGS} -Wl,--thinlto-jobs=$(nproc)" # export LDFLAGS+=" -Wl,-plugin-opt,-import-instr-limit=32 -Wl,--thinlto-jobs=$(nproc)" # export LDFLAGS+=" -Wl,--thinlto-jobs=$(nproc)" # build/config/compiler/compiler.gni _flags+=( "clang_base_path=\"$_llvm_dir\"" 'is_clang=true' 'is_cfi=false' 'use_cfi_icall=false' 'use_lld=true' 'use_thin_lto=true' 'thin_lto_enable_optimizations=true' ) if [[ -z "$_clang_pgo" ]]; then _flags+=('chrome_pgo_phase=0') else # docs/pgo.md # build/config/compiler/pgo/pgo.gni # build/config/compiler/pgo/BUILD.gn # tools/update_pgo_profiles.py # DEPS: # Fetch PGO profiles for linux # --gs-url-base=chromium-optimization-profiles/pgo_profiles # https://aur.archlinux.org/packages/ungoogled-chromium#comment-833670 # https://chromium.googlesource.com/chromium/tools/depot_tools.git/ # https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/refs/heads/main/recipes/recipe_modules/gsutil/api.py # chrome/build/linux.pgo.txt # _profile_file='chrome-linux-5060-1655228597-bbe06f169cac6956903f78358c30d94a01938b2e.profdata' # curl "https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles/${_profile_file}" --output "chrome/build/pgo_profiles/${_profile_file}" # chrome/build/linux.pgo.txt # use pgo_data_path instead # local _profile_file='chrome-linux-5060-1655228597-bbe06f169cac6956903f78358c30d94a01938b2e.profdata' # mkdir -p chrome/build/pgo_profiles && mv "$startdir/$_profile_file" chrome/build/pgo_profiles _flags+=( 'chrome_pgo_phase=2' # "pgo_data_path=\"$startdir/chrome-linux.profdata\"" ) fi else # for gcc export CC=gcc CXX=g++ AR=ar NM=nm export MAKEFLAGS="-j$(nproc)" export CFLAGS="-march=haswell -mtune=haswell -O2 -pipe -fno-plt" export CFLAGS+=" --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072" export CFLAGS+=" -falign-functions=32" # export CFLAGS+=" -fno-semantic-interposition" # export CFLAGS+=" -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -ftree-vectorize" export CXXFLAGS="${CFLAGS}" export LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" _flags+=( 'is_clang=false' 'is_cfi=false' 'use_cfi_icall=false' # 'use_gold=true' # 'gcc_lto=true' # 'use_gold=false' # 'use_lld=false' ) fi _flags+=( # https://source.chromium.org/ # https://chromium.googlesource.com/ # docs/linux/build_instructions.md 'is_debug=false' 'symbol_level=0' 'v8_symbol_level=0' 'blink_symbol_level=0' 'dcheck_always_on=false' 'is_official_build=true' # https://github.com/chromium/chromium/commit/07f51c672390638de7eb7310b627d2d22e483a65 # base/allocator/partition_allocator/build_config.md # base/allocator/README.md # base/allocator/allocator.gni # !! fail to build with chromium 103: obj/base/base/memory_linux.o # 'use_allocator="none"' # 'use_allocator_shim=false' # https://git.launchpad.net/~chromium-team/chromium-browser/+git/snap-from-source/commit/?h=dev&id=46c645167e36cdb59380fc61460795bcbbbfb68c # necessary for video hardware-acceleration # 'use_system_minigbm=false' # 'use_intel_minigbm=true' # 'use_amdgpu_minigbm=true' # skia/features.gni 'skia_use_dawn=true' # ui/gl/features.gni 'build_dawn_tests=false' # third_party/perfetto/BUILD.gn 'enable_perfetto_unittests=false' # v119, from gentoo # Don't need nocompile checks and GN crashes with our config # build/nocompile.gni 'enable_nocompile_tests=false' 'enable_nocompile_tests_new=false' # build/config/compiler/compiler.gni 'treat_warnings_as_errors=false' # https://github.com/chromium/chromium/commit/0cd2cf4db061eb2d205ba36469c5979575971e76 # 'use_ml_inliner=true' # build/config/compiler/BUILD.gn 'fatal_linker_warnings=false' # build/config/chromecast_build.gni # 'enable_cast_receiver=true' # https://developer.chrome.com/docs/native-client/ # deprecated in 2020 'enable_nacl=false' # docs/component_build.md # speeds up link times, but at the expense of program load-time performance # build/config/BUILDCONFIG.gn # 'is_component_build=false' # docs/closure_compilation.md # third_party/closure_compiler/compile_js.gni # possibly reduce Chrome’s binary size # 'enable_js_type_check=true' # chrome/common/features.gni # 'enable_hangout_services_extension=false' # components/os_crypt/features.gni # removed in v116 # 'use_gnome_keyring=false' # components/variations/service/BUILD.gn 'disable_fieldtrial_testing_config=true' # components/reading_list/features/reading_list.gni 'enable_reading_list=false' # components/safe_browsing/buildflags.gni # !! fail to build with chromium 103: obj/chrome/browser/browser/chrome_content_browser_client.o # 'safe_browsing_mode=0' # device/vr/buildflags/buildflags.gni 'enable_vr=false' # media/media_options.gni # https://github.com/Alex313031/Thorium/blob/main/PATCHES.md # 'ffmpeg_branding="Chrome"' # 'proprietary_codecs=true' # 'enable_platform_ac3_eac3_audio=true' # 'enable_platform_mpeg_h_audio=true' 'enable_mse_mpeg2ts_stream_parser=true' 'enable_platform_dolby_vision=true' # v114: https://github.com/chromium/chromium/commit/4e1594ae08032bb7fbb4892c2fb5695274bb8484 # 'enable_hls_sample_aes=true' # https://bugs.chromium.org/p/chromium/issues/detail?id=1266991 # https://chromium.googlesource.com/chromium/src/+/0b46a2c725cfea5a5196793c9eb6926ccd2758b1 # 'enable_hls_demuxer=true' # https://tools.woolyss.com/html5-audio-video-tester/ # https://www.bilibili.com/read/cv16257864 # https://blog.youtube/inside-youtube/new-era-video-infrastructure/ # https://aomedia.org/ # https://github.com/StaZhu/enable-chromium-hevc-hardware-decoding # https://streaminglearningcenter.com/codecs/which-codec-does-youtube-use-part-deux.html # https://www.streamingmedia.com/Articles/Editorial/Featured-Articles/The-State-of-Video-Codecs-2022-151189.aspx # vp9 # 'media_use_libvpx=false' # av1 & avif # 'enable_libaom=false' # 'enable_dav1d_decoder=false' # 'enable_libgav1_decoder=false' # 'enable_av1_decoder=false' # hevc # v110: enable_platform_hevc required for enable_platform_dolby_vision # 'enable_platform_dolby_vision=false' # 'enable_hevc_parser_and_hw_decoder=false' # 'enable_platform_hevc=false' # # 'enable_platform_hevc=true' # 'enable_hevc_parser_and_hw_decoder=true' # https://github.com/chromium/chromium/commit/aa2cdd93cda240c492e040af52d24760de47e061 # https://github.com/chromium/chromium/blob/108.0.5359.71/media/media_options.gni # chromium < 104 # 'enable_platform_hevc_decoding=true' # net/features.gni # 'enable_reporting=false' # remoting/remoting_enable.gni # 'enable_remoting=false' ) # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn) if [[ -n "$_clang" ]]; then CFLAGS+=' -Wno-builtin-macro-redefined' CXXFLAGS+=' -Wno-builtin-macro-redefined' CPPFLAGS+=' -D__DATE__= -D__TIME__= -D__TIMESTAMP__=' # Do not warn about unknown warning options CFLAGS+=' -Wno-unknown-warning-option' CXXFLAGS+=' -Wno-unknown-warning-option' # Let Chromium set its own symbol level CFLAGS=${CFLAGS/-g } CXXFLAGS=${CXXFLAGS/-g } # https://github.com/ungoogled-software/ungoogled-chromium-archlinux/issues/123 CFLAGS=${CFLAGS/-fexceptions} CFLAGS=${CFLAGS/-fcf-protection} CXXFLAGS=${CXXFLAGS/-fexceptions} CXXFLAGS=${CXXFLAGS/-fcf-protection} # This appears to cause random segfaults when combined with ThinLTO # https://bugs.archlinux.org/task/73518 CFLAGS=${CFLAGS/-fstack-clash-protection} CXXFLAGS=${CXXFLAGS/-fstack-clash-protection} # https://crbug.com/957519#c122 CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS} fi gn gen out/Release --args="${_flags[*]}" ninja -C out/Release chrome chrome_sandbox chromedriver.unstripped } package() { cd chromium-launcher-$_launcher_ver make PREFIX=/usr DESTDIR="$pkgdir" install install -Dm644 LICENSE \ "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher" install -Dm755 "$startdir/_wrapper.py" "$pkgdir/usr/bin/chromium" cd ../chromium-$pkgver install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium" install -D out/Release/chromedriver.unstripped "$pkgdir/usr/bin/chromedriver" install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox" install -Dm644 chrome/installer/linux/common/desktop.template \ "$pkgdir/usr/share/applications/chromium.desktop" install -Dm644 chrome/app/resources/manpage.1.in \ "$pkgdir/usr/share/man/man1/chromium.1" sed -i \ -e 's/@@MENUNAME@@/Chromium/g' \ -e 's/@@PACKAGE@@/chromium/g' \ -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \ "$pkgdir/usr/share/applications/chromium.desktop" \ "$pkgdir/usr/share/man/man1/chromium.1" install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \ "$pkgdir/usr/share/metainfo/chromium.appdata.xml" sed -ni \ -e 's/chromium-browser\.desktop/chromium.desktop/' \ -e '/<update_contact>/d' \ -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \ -e '/^<?xml/,$p' \ "$pkgdir/usr/share/metainfo/chromium.appdata.xml" local toplevel_files=( chrome_100_percent.pak chrome_200_percent.pak chrome_crashpad_handler libqt5_shim.so resources.pak v8_context_snapshot.bin # ANGLE libEGL.so libGLESv2.so # SwiftShader ICD libvk_swiftshader.so libvulkan.so.1 vk_swiftshader_icd.json ) if [[ -z ${_system_libs[icu]+set} ]]; then toplevel_files+=(icudtl.dat) fi cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/" install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak for size in 24 48 64 128 256; do install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" done for size in 16 32; do install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \ "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png" done install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE" } # vim:set ts=2 sw=2 et nowrap:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor