From e383def50503a73f9736553f025888edbca8f586 Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sat, 29 Oct 2022 18:47:44 +0200 Subject: [PATCH 1/3] New package: heroic-games-launcher-2.4.3 --- .../files/heroic.desktop | 10 +++++ srcpkgs/heroic-games-launcher/template | 45 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 srcpkgs/heroic-games-launcher/files/heroic.desktop create mode 100644 srcpkgs/heroic-games-launcher/template diff --git a/srcpkgs/heroic-games-launcher/files/heroic.desktop b/srcpkgs/heroic-games-launcher/files/heroic.desktop new file mode 100644 index 000000000000..15c393b9e41e --- /dev/null +++ b/srcpkgs/heroic-games-launcher/files/heroic.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Heroic Games Launcher +Exec=/usr/bin/heroic %U +Terminal=false +Type=Application +Icon=heroic +StartupWMClass=Heroic +Comment=Open Source GOG and Epic Games launcher +MimeType=x-scheme-handler/heroic; +Categories=Game; diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template new file mode 100644 index 000000000000..aeddb6f659b8 --- /dev/null +++ b/srcpkgs/heroic-games-launcher/template @@ -0,0 +1,45 @@ +# Template file for 'heroic-games-launcher' +pkgname=heroic-games-launcher +version=2.4.3 +revision=1 +archs="x86_64* armv7l* aarch64*" +wrksrc="HeroicGamesLauncher-${version}" +hostmakedepends="nodejs python3 yarn" +depends="alsa-lib gtk+3 nss python3" +checkdepends="tar xz" +short_desc="Open Source Launcher for GOG and Epic Games" +maintainer="Wiktor Ciurej " +license="GPL-3.0-or-later" +homepage="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher" +distfiles="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/archive/v${version}.tar.gz" +checksum=b6590fd99776c2f6d890266ee177d1d90f8a127eaa47b9aec41fc00c4194bc9a +nopie_files="/opt/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl + /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary" + +case ${XBPS_TARGET_MACHINE} in + x86_64*) _arch=x64 ;; + aarch64*) _arch=arm64 ;; + armv7l*) _arch=armv7l ;; + *) broken="There is no electron package provided for selected architecture." ;; +esac + +do_build() { + npm_config_arch=${_arch} npm_config_platform=linux yarn + npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} +} + +do_check() { + npm_config_arch=${_arch} yarn test + npm_config_arch=${_arch} yarn test:ci +} + +do_install() { + vmkdir opt/heroic/ + vcopy dist/linux-unpacked/* opt/heroic/ + vmkdir usr/bin/ + ln -sf /opt/heroic/heroic ${DESTDIR}/usr/bin/heroic + vmkdir usr/share/pixmaps/ + vinstall public/icon.png 0755 usr/share/pixmaps/ heroic.png + vmkdir usr/share/applications/ + vinstall ${FILESDIR}/heroic.desktop 0755 usr/share/applications/ +} From 03aef87bc8be5ee1690cb87a0a2917db9fbaa3df Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sat, 29 Oct 2022 23:08:07 +0200 Subject: [PATCH 2/3] Fix arm install errors. --- srcpkgs/heroic-games-launcher/template | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template index aeddb6f659b8..adf58f561712 100644 --- a/srcpkgs/heroic-games-launcher/template +++ b/srcpkgs/heroic-games-launcher/template @@ -23,6 +23,14 @@ case ${XBPS_TARGET_MACHINE} in *) broken="There is no electron package provided for selected architecture." ;; esac +if ! [ ${_arch} == "x64" ]; then + nostrip_files="/opt/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl + /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary" + + skiprdeps="/opt/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl + /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary" +fi + do_build() { npm_config_arch=${_arch} npm_config_platform=linux yarn npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} @@ -35,11 +43,15 @@ do_check() { do_install() { vmkdir opt/heroic/ - vcopy dist/linux-unpacked/* opt/heroic/ + if [ ${_arch} == "x64" ]; then + vcopy dist/linux-unpacked/* opt/heroic/ + else + vcopy dist/linux-${_arch}-unpacked/* opt/heroic/ + fi vmkdir usr/bin/ ln -sf /opt/heroic/heroic ${DESTDIR}/usr/bin/heroic vmkdir usr/share/pixmaps/ vinstall public/icon.png 0755 usr/share/pixmaps/ heroic.png vmkdir usr/share/applications/ - vinstall ${FILESDIR}/heroic.desktop 0755 usr/share/applications/ + vinstall ${FILESDIR}/heroic.desktop 0644 usr/share/applications/ } From d4841df4bd298de108d2f0241812898e59b85eae Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sun, 30 Oct 2022 01:23:56 +0200 Subject: [PATCH 3/3] Fix musl builds failing. --- srcpkgs/heroic-games-launcher/template | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template index adf58f561712..f6a78e875095 100644 --- a/srcpkgs/heroic-games-launcher/template +++ b/srcpkgs/heroic-games-launcher/template @@ -31,9 +31,17 @@ if ! [ ${_arch} == "x64" ]; then /opt/heroic/resources/app.asar.unpacked/build/bin/linux/legendary" fi +if [ ${XBPS_TARGET_LIBC} == "musl" ]; then + hostmakedepends+=" p7zip" + _use_system_p7zip=true +else + _use_system_p7zip=false +fi + do_build() { npm_config_arch=${_arch} npm_config_platform=linux yarn - npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} + echo ${_use_system_p7zip} + USE_SYSTEM_7ZA=${_use_system_p7zip} npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} } do_check() {