From a44a2835eb84c00b965307d7fc42eda1b7ab4d47 Mon Sep 17 00:00:00 2001 From: Philipp David Date: Mon, 10 Jan 2022 11:32:22 +0100 Subject: [PATCH] New package: PolyMC-1.1.0 --- srcpkgs/PolyMC/patches/00-fix-version.patch | 24 ++++++++++++++ srcpkgs/PolyMC/template | 36 +++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 srcpkgs/PolyMC/patches/00-fix-version.patch create mode 100644 srcpkgs/PolyMC/template diff --git a/srcpkgs/PolyMC/patches/00-fix-version.patch b/srcpkgs/PolyMC/patches/00-fix-version.patch new file mode 100644 index 000000000000..4781b92c567e --- /dev/null +++ b/srcpkgs/PolyMC/patches/00-fix-version.patch @@ -0,0 +1,24 @@ +--- a/buildconfig/BuildConfig.cpp.in ++++ b/buildconfig/BuildConfig.cpp.in +@@ -30,7 +30,11 @@ Config::Config() + + GIT_COMMIT = "@Launcher_GIT_COMMIT@"; + GIT_REFSPEC = "@Launcher_GIT_REFSPEC@"; +- if(GIT_REFSPEC.startsWith("refs/heads/")) ++ if (GIT_REFSPEC.startsWith("GITDIR-NOTFOUND")) ++ { ++ VERSION_CHANNEL = "stable"; ++ } ++ else if(GIT_REFSPEC.startsWith("refs/heads/")) + { + VERSION_CHANNEL = GIT_REFSPEC; + VERSION_CHANNEL.remove("refs/heads/"); +@@ -75,7 +79,7 @@ QString Config::printableVersionString() const + // if a build number is set, also add it to the end + if(VERSION_BUILD >= 0) + { +- vstr += "-" + QString::number(VERSION_BUILD); ++ vstr += "_" + QString::number(VERSION_BUILD); + } + return vstr; + } diff --git a/srcpkgs/PolyMC/template b/srcpkgs/PolyMC/template new file mode 100644 index 000000000000..3aa3e6cf270d --- /dev/null +++ b/srcpkgs/PolyMC/template @@ -0,0 +1,36 @@ +# Template file for 'PolyMC' +pkgname=PolyMC +version=1.1.0 +revision=1 +create_wrksrc=yes +_nbtversion="dc72a20b7efd304d12af2025223fad07b4b78464" +_quazipversion="09ec1d10c6d627f895109b21728dda000cbfa7d1" +build_style=cmake +configure_args="-DLauncher_BUILD_PLATFORM=Void -DLauncher_PORTABLE=0 + -DLauncher_VERSION_BUILD=${revision}" +hostmakedepends="openjdk11 qt5-host-tools qt5-qmake" +makedepends="qt5-devel" +depends="virtual?java-runtime" +short_desc="Custom launcher for Minecraft" +maintainer="Philipp David " +license="GPL-3.0-or-later" +homepage="https://polymc.org/" +distfiles="https://github.com/PolyMC/PolyMC/archive/${version}.tar.gz + https://github.com/MultiMC/libnbtplusplus/archive/${_nbtversion}.tar.gz + https://github.com/stachenov/quazip/archive/${_quazipversion}.tar.gz" +checksum="4114b11a47a5380c811df890310578ddb3457f0a96caf019f388e1f551d58e99 + 2ed9dc824007b4f7b12f807f56c98e1248b8a7aba7eca4838085092958dc1595 + 618700e4e5f1f884e22bc8ed2c2c102305711ebf5a39296bf4c6017a4e6d4e35" + +case "$XBPS_TARGET_MACHINE" in + armv*) broken="https://github.com/MultiMC/MultiMC5/issues/2895";; +esac + +post_extract() { + find PolyMC-${version}/ -mindepth 1 -maxdepth 1 -exec mv {} . \; + rmdir PolyMC-${version} + rmdir libraries/libnbtplusplus + rmdir libraries/quazip + mv libnbtplusplus-${_nbtversion} libraries/libnbtplusplus + mv quazip-${_quazipversion} libraries/quazip +}