From 2a2911ff274761b546ac1d79ca36a4fe06c8b9e3 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 13 Sep 2020 14:07:49 +0200 Subject: [PATCH] element-desktop: fix build on ppc64le --- srcpkgs/element-desktop/template | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/srcpkgs/element-desktop/template b/srcpkgs/element-desktop/template index 5924dd79e2..2b8477e0d2 100644 --- a/srcpkgs/element-desktop/template +++ b/srcpkgs/element-desktop/template @@ -5,7 +5,8 @@ revision=1 wrksrc="element-web-${version}" conf_files="/etc/${pkgname}/config.json" hostmakedepends="git yarn nodejs rust cargo python curl - sqlcipher-devel libappindicator-devel libnotify-devel pkg-config" + sqlcipher-devel libappindicator-devel libnotify-devel pkg-config + app-builder" makedepends="libsecret-devel" depends="c-ares ffmpeg gtk+3 http-parser libevent libxslt minizip nss re2 snappy sqlcipher electron9" @@ -21,6 +22,8 @@ checksum="64246f54e41b2a47675f5d7e684559e806f427c50908c10f6484ef5437556726 cd19b235690ea0e91fc17c219c3db96b1c61a757e2df185550be221df1c2ab35" nocross="depends on electron9" +export USE_SYSTEM_APP_BUILDER=true + pre_build() { # Build dependencies for riot-web yarn install @@ -37,7 +40,14 @@ do_build() { yarn build cd ../element-desktop-${version} yarn run build:native - yarn run build + # normally just "yarn run build" would be okay, but at least on ppc64 + # we need to force x86_64 arch as electron-builder does not support + # ppc64 and fails on arch detection; ARM is supported so just use build + case "$XBPS_TARGET_MACHINE" in + x86_64*|ppc64*) yarn run build64 ;; + i686*) yarn run build32 ;; + *) yarn run build ;; + esac } do_install() {