# Contributor: Bruno Pagani # Contributor: Caleb Maclennan _use_suffix=1 pkgver=19.1.9 _commit=f887fa45dfaeeddfe20c9835ae7ca3a0823b661b _chromiumver=102.0.5005.167 _gcc_patchset=6 # shellcheck disable=SC2034 pkgrel=5 _major_ver=${pkgver%%.*} if [[ ${_use_suffix} != 0 ]]; then pkgname="electron${_major_ver}" else pkgname=electron fi # shellcheck disable=SC2034 pkgdesc='Build cross platform desktop apps with web technologies' # 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') # shellcheck disable=SC2034 makedepends=('clang' 'git' 'gn' 'gperf' 'harfbuzz-icu' 'http-parser' 'java-runtime-headless' 'jsoncpp' 'libnotify' 'lld' 'llvm' 'ninja' 'npm' 'pciutils' 'pipewire' 'python' 'python-httplib2' 'python-pyparsing' 'python-six' 'wget' 'yarn') # shellcheck disable=SC2034 optdepends=('kde-cli-tools: file deletion support (kioclient5)' 'libappindicator-gtk3: StatusNotifierItem support' 'pipewire: WebRTC desktop sharing under Wayland' '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}") fi # shellcheck disable=SC2034 options=('!lto') # Electron adds its own flags for ThinLTO # shellcheck disable=SC2034 source=('git+https://github.com/electron/electron.git' 'git+https://chromium.googlesource.com/chromium/tools/depot_tools.git#branch=main' "https://github.com/stha09/chromium-patches/releases/download/chromium-${_chromiumver%%.*}-patchset-${_gcc_patchset}/chromium-${_chromiumver%%.*}-patchset-${_gcc_patchset}.tar.xz" "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' 'skia-freetype-2.13.patch' 'roll-src-third_party-ffmpeg.patch' 'chromium-libxml-unbundle.patch' 'sql-make-VirtualCursor-standard-layout-type.patch' 'remove-no-opaque-pointers-flag.patch' ) # shellcheck disable=SC2034 sha256sums=('SKIP' 'SKIP' '23f2a772c4a6e31394d6ee7b8dbb5967d3b92bd859093444913377934bede594' '77817939c9833f8dda74a8c75620c15747170551ffa6f14f7c5b4071599e8831' '4484200d90b76830b69eea3a471c103999a3ce86bb2c29e6c14c945bf4102bae' 'dd2d248831dd4944d385ebf008426e66efe61d6fdf66f8932c963a12167947b4' '55dbe71dbc1f3ab60bf1fa79f7aea7ef1fe76436b1d7df48728a1f8227d2134e' 'c70652a8b24c237bcfd27469de32797a2cb46d9f0d63d897bb6418314a25644c' '76b969e1534e8c355b8b524a686cbf3b24136eaa6bd40b0c09fdd9866049f159' '3a2876e54755df12aacd0575d9d2ff345fabaca6a0dddc72208787dbb2f34fcb' '30df59a9e2d95dcb720357ec4a83d9be51e59cc5551365da4c0073e68ccdec44' 'fd3bf124aacc45f2d0a4f1dd86303fa7f2a3d4f4eeaf33854631d6cb39e12485' 'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a' 'e8ea8528ecb119de3380555c60ac8495ebdef502359fa2114c6c5c98f84698cd') # 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=( [ffmpeg]=ffmpeg [flac]=flac [fontconfig]=fontconfig [freetype]=freetype2 [harfbuzz-ng]=harfbuzz [icu]=icu [libdrm]= [libjpeg]=libjpeg [libpng]=libpng #[libvpx]=libvpx [libwebp]=libwebp [libxml]=libxml2 [libxslt]=libxslt [opus]=opus [re2]=re2 [snappy]=snappy [zlib]=minizip ) _unwanted_bundled_libs=( $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/') ) depends+=(${_system_libs[@]}) 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 cat >.gclient <