diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index 0864e69..fc9e1bb 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -48,9 +48,8 @@ sha256sums=('8fb62ee3aeb466d8a75fb3fd467b96836a4f2f9c594d1b701f9dcf8df12587f8' '08ae0c93b5ec7eb7d90c65d5d2adbaca538482fba902ed1f8414024db0d21854' '5e6e05fe09642e4a18d6c44764fb18498460b53b285420b5acc6a3622e9dc6d2') -_electron_version=$(< /usr/lib/$_electron/version) - prepare() { + _electron_version=$(< /usr/lib/$_electron/version) cd "$_archive" patch -Np1 -i ../fix-$pkgname-sh.patch patch -Np1 -i <(sed -e "s/@ELECTRON@/$_electron/" ../use-system-electron.patch) @@ -59,15 +58,19 @@ prepare() { patch -Np1 -i ../fix-restart.patch patch -Np1 -i ../node-env-production.patch patch -Np1 -i ../no-unsafe-eval-warning.patch +} - rm {,script/}package-lock.json - set -x +build() { + _electron_version=$(< /usr/lib/$_electron/version) + cd "$_archive" + CXXFLAGS="${CXXFLAGS/ -fexceptions/}" env \ ATOM_RESOURCE_PATH="$PWD" \ npm_config_build_from_source=true \ npm_config_target=$_electron_version \ - apm install --cache "$srcdir/npm-cache" + GYP_DEFINES="openssl_fips=" \ + apm install # Use system ctags pushd node_modules/symbols-view @@ -85,25 +88,17 @@ prepare() { # build/Release/git.node: undefined symbol: git_net_url_is_default_port pushd node_modules/git-utils patch -Np1 -i "$srcdir/git-utils.patch" - popd - - pushd script - npm install --cache "$srcdir/npm-cache" -} - -build() { - cd "$_archive" - set -x - pushd node_modules/git-utils env \ npm_config_disturl=https://electronjs.org/headers \ npm_config_runtime=$_electron \ npm_config_target=$_electron_version \ + GYP_DEFINES="openssl_fips=" \ node-gyp rebuild popd pushd script + npm install # Hack to avoid using Node > 12 (https://github.com/babel/babel/issues/11216) # Set ELECTRON_VERSION (see use-system-electron.patch) env \