# Maintainer: Noah Vogt (noahvogt) # Maintainer: Bruno Pagani # Maintainer: Caleb Maclennan # Contributor: Pascal Ernster # Contributor: loqs # https://releases.electronjs.org/ # https://github.com/stha09/chromium-patches/releases _use_suffix=1 pkgver=25.6.0 _chromiumver=114.0.5735.134 # shellcheck disable=SC2034 pkgrel=1 _major_ver=${pkgver%%.*} if [[ ${_use_suffix} != 0 ]]; then pkgname="electron${_major_ver}-xdg" else pkgbase="electron${_major_ver}-xdg" pkgname=electron-xdg fi # shellcheck disable=SC2034 pkgdesc='Build cross platform desktop apps with web technologies - without creating a useless ~/.pki directory' # shellcheck disable=SC2034 arch=('x86_64') # shellcheck disable=SC2034 url='https://electronjs.org/' # shellcheck disable=SC2034 license=('MIT' 'custom') # shellcheck disable=SC2034 depends=('c-ares' 'gtk3' 'libevent' 'nss' 'libffi') # shellcheck disable=SC2034 makedepends=('clang' 'git' 'gn' 'gperf' 'harfbuzz-icu' 'http-parser' 'qt5-base' 'java-runtime-headless' 'libnotify' 'lld' 'llvm' 'ninja' 'npm' 'pciutils' 'pipewire' 'python' 'python-httplib2' 'python-requests' 'python-pyparsing' 'python-six' 'wget' 'yarn') # shellcheck disable=SC2034 optdepends=('kde-cli-tools: file deletion support (kioclient5)' 'pipewire: WebRTC desktop sharing under Wayland' 'qt5-base: enable Qt5 with --enable-features=AllowQt' 'trash-cli: file deletion support (trash-put)' 'xdg-utils: open URLs with desktop’s default (xdg-email, xdg-open)') if [[ ${_use_suffix} == 0 ]]; then # shellcheck disable=SC2034 conflicts=("electron${_major_ver}") # shellcheck disable=SC2034 provides=("electron${_major_ver}") replaces=("electron${_major_ver}") fi # shellcheck disable=SC2034 options=('!lto') # Electron adds its own flags for ThinLTO # shellcheck disable=SC2034 source=("git+https://github.com/electron/electron.git#tag=v$pkgver" 'git+https://chromium.googlesource.com/chromium/tools/depot_tools.git#branch=main' "chromium-mirror::git+https://github.com/chromium/chromium.git#tag=$_chromiumver" "electron-launcher.sh" "electron.desktop" 'default_app-icon.patch' 'jinja-python-3.10.patch' 'use-system-libraries-in-node.patch' 'std-vector-non-const.patch' 'add-some-typename-s-that-are-required-in-C-17.patch' 'REVERT-disable-autoupgrading-debug-info.patch' 'random-fixes-for-gcc13.patch' ) # shellcheck disable=SC2034 sha256sums=('SKIP' 'SKIP' 'SKIP' 'b0ac3422a6ab04859b40d4d7c0fd5f703c893c9ec145c9894c468fbc0a4d457c' '4484200d90b76830b69eea3a471c103999a3ce86bb2c29e6c14c945bf4102bae' 'dd2d248831dd4944d385ebf008426e66efe61d6fdf66f8932c963a12167947b4' '55dbe71dbc1f3ab60bf1fa79f7aea7ef1fe76436b1d7df48728a1f8227d2134e' 'ff588a8a4fd2f79eb8a4f11cf1aa151298ffb895be566c57cc355d47f161f53f' '893bc04c7fceba2f0a7195ed48551d55f066bbc530ec934c89c55768e6f3949c' '621ed210d75d0e846192c1571bb30db988721224a41572c27769c0288d361c11' '1b782b0f6d4f645e4e0daa8a4852d63f0c972aa0473319216ff04613a0592a69' 'ba4dd0a25a4fc3267ed19ccb39f28b28176ca3f97f53a4e9f5e9215280040ea0') # 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 [ffmpeg]=ffmpeg [flac]=flac [fontconfig]=fontconfig [freetype]=freetype2 [harfbuzz-ng]=harfbuzz [icu]=icu [jsoncpp]=jsoncpp # [libaom]=aom #[libavif]=libavif # https://github.com/AOMediaCodec/libavif/commit/4d2776a3 [libdrm]= [libjpeg]=libjpeg [libpng]=libpng #[libvpx]=libvpx [libwebp]=libwebp [libxml]=libxml2 [libxslt]=libxslt [opus]=opus #[re2]=re2 [snappy]=snappy [woff2]=woff2 [zlib]=minizip ) _unwanted_bundled_libs=( $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/') ) depends+=(${_system_libs[@]}) # add custom patches by extending the bash array, as this is both cleaner # and easier to maintain source=(${source[@]} xdg-basedir.patch) sha256sums=(${sha256sums[@]} 'a7d9c117e713e8fc68c777fcc046da5dcae7706055d6d1af7555687086ff4266') prepare() { sed -i "s|@ELECTRON@|${pkgname%-*}|" electron-launcher.sh sed -i "s|@ELECTRON@|${pkgname%-*}|" electron.desktop if [[ ${_use_suffix} != 0 ]]; then sed -i "s|@ELECTRON_NAME@|Electron ${_major_ver}|" electron.desktop else sed -i "s|@ELECTRON_NAME@|Electron|" electron.desktop fi sed --in-place "/'chromium_version':/{n;s/'[0-9.]\+',/'${_chromiumver}',/}" "${srcdir}/electron/DEPS" cat >.gclient <