From f9362d319f0ba1bda891e58b425564afb8bfec73 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/files/README.voidlinux | 6 +++ srcpkgs/PolyMC/patches/00-fix-version.patch | 24 ++++++++++++ srcpkgs/PolyMC/template | 41 +++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 srcpkgs/PolyMC/files/README.voidlinux create mode 100644 srcpkgs/PolyMC/patches/00-fix-version.patch create mode 100644 srcpkgs/PolyMC/template diff --git a/srcpkgs/PolyMC/files/README.voidlinux b/srcpkgs/PolyMC/files/README.voidlinux new file mode 100644 index 000000000000..16ee7f91717b --- /dev/null +++ b/srcpkgs/PolyMC/files/README.voidlinux @@ -0,0 +1,6 @@ +Void-specific instructions: +============================ + +You may not have the correct version of java installed for running specific +versions of Minecraft. For Minecraft version 1.17 and up install openjdk17-jre +and for older ones openjdk8-jre. diff --git a/srcpkgs/PolyMC/patches/00-fix-version.patch b/srcpkgs/PolyMC/patches/00-fix-version.patch new file mode 100644 index 000000000000..7513f6bffec9 --- /dev/null +++ b/srcpkgs/PolyMC/patches/00-fix-version.patch @@ -0,0 +1,24 @@ +--- a/PolyMC-1.1.0/buildconfig/BuildConfig.cpp.in ++++ b/PolyMC-1.1.0/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 == QStringLiteral("GITDIR-NOTFOUND")) ++ { ++ VERSION_CHANNEL = QStringLiteral("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..bce839cdc2ed --- /dev/null +++ b/srcpkgs/PolyMC/template @@ -0,0 +1,41 @@ +# Template file for 'PolyMC' +pkgname=PolyMC +version=1.1.0 +revision=1 +create_wrksrc=yes +build_wrksrc="PolyMC-${version}" +_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() { + rmdir PolyMC-${version}/libraries/libnbtplusplus + rmdir PolyMC-${version}/libraries/quazip + mv libnbtplusplus-${_nbtversion} \ + PolyMC-${version}/libraries/libnbtplusplus + mv quazip-${_quazipversion} \ + PolyMC-${version}/libraries/quazip +} + +post_install() { + vdoc ${FILESDIR}/README.voidlinux +}