From e383def50503a73f9736553f025888edbca8f586 Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sat, 29 Oct 2022 18:47:44 +0200 Subject: [PATCH 1/4] 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 32d8dd571cb5d5999212414e3d9c8245ad65c227 Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sat, 29 Oct 2022 23:08:07 +0200 Subject: [PATCH 2/4] heroic-games-launcher: 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 3cd7a8554d342e3c34a93cf28c1f017098e1d79b Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sun, 30 Oct 2022 01:23:56 +0200 Subject: [PATCH 3/4] heroic-games-launcher: Fix musl builds failing. --- srcpkgs/heroic-games-launcher/template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template index adf58f561712..1ce15d1792f4 100644 --- a/srcpkgs/heroic-games-launcher/template +++ b/srcpkgs/heroic-games-launcher/template @@ -31,9 +31,16 @@ 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} + USE_SYSTEM_7ZA=${_use_system_p7zip} npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} } do_check() { From e0b96b67410d881a961bc5a6a5652e4adf74c76d Mon Sep 17 00:00:00 2001 From: Wiktor Ciurej Date: Sun, 30 Oct 2022 11:32:33 +0100 Subject: [PATCH 4/4] heroic-games-launcher: Exclude musl arch because of bundled glibc libs. --- srcpkgs/heroic-games-launcher/template | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/srcpkgs/heroic-games-launcher/template b/srcpkgs/heroic-games-launcher/template index 1ce15d1792f4..be29249eca5f 100644 --- a/srcpkgs/heroic-games-launcher/template +++ b/srcpkgs/heroic-games-launcher/template @@ -2,7 +2,7 @@ pkgname=heroic-games-launcher version=2.4.3 revision=1 -archs="x86_64* armv7l* aarch64*" +archs="x86_64 armv7l aarch64 ~*-musl" wrksrc="HeroicGamesLauncher-${version}" hostmakedepends="nodejs python3 yarn" depends="alsa-lib gtk+3 nss python3" @@ -31,16 +31,9 @@ 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 - USE_SYSTEM_7ZA=${_use_system_p7zip} npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} + npm_config_arch=${_arch} npm_config_platform=linux yarn dist:linux tar.xz --${_arch} } do_check() {