diff options
author | Lenny McLennington | 2025-04-18 10:40:39 +0100 |
---|---|---|
committer | Lenny McLennington | 2025-04-18 10:40:39 +0100 |
commit | 017e936aa686d578b4570aafe66f2ac9bcb18d8e (patch) | |
tree | 069bfba5e64de39bbb42ef51f4cc2b90cb29eb64 | |
parent | 098e052216c6df7e9d453fe0ff7e9738fb8129b2 (diff) | |
download | aur-017e936aa686d578b4570aafe66f2ac9bcb18d8e.tar.gz |
Fix building with Qt 6.9
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | fix-qt-debug.patch | 38 |
3 files changed, 50 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = polymc pkgdesc = Minecraft launcher with the ability to manage multiple instances pkgver = 7.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/PolyMC/PolyMC arch = x86_64 license = GPL3 @@ -24,6 +24,8 @@ pkgbase = polymc optdepends = visualvm: Profiling support optdepends = xorg-xrandr: for older minecraft versions source = https://github.com/PolyMC/PolyMC/releases/download/7.0/PolyMC-7.0.tar.gz + source = fix-qt-debug.patch sha256sums = e08e9a25f87db7da422351d044b330e4b1a568f3adabc04c388dc9e4f60c4701 + sha256sums = 002ad2ec901c2eae3a7fca6e4257ef3e545beaf93ffb0baffb2d72a86423a7f2 pkgname = polymc @@ -9,7 +9,7 @@ pkgname=polymc pkgver=7.0 -pkgrel=1 +pkgrel=2 pkgdesc="Minecraft launcher with the ability to manage multiple instances" arch=('x86_64') url="https://github.com/PolyMC/PolyMC" @@ -22,8 +22,14 @@ optdepends=('glfw: to use system GLFW libraries' 'visualvm: Profiling support' 'xorg-xrandr: for older minecraft versions' ) -source=("https://github.com/PolyMC/PolyMC/releases/download/$pkgver/PolyMC-$pkgver.tar.gz") -sha256sums=('e08e9a25f87db7da422351d044b330e4b1a568f3adabc04c388dc9e4f60c4701') +source=("https://github.com/PolyMC/PolyMC/releases/download/$pkgver/PolyMC-$pkgver.tar.gz" 'fix-qt-debug.patch') +sha256sums=('e08e9a25f87db7da422351d044b330e4b1a568f3adabc04c388dc9e4f60c4701' + '002ad2ec901c2eae3a7fca6e4257ef3e545beaf93ffb0baffb2d72a86423a7f2') + +prepare() { + cd "$srcdir/PolyMC-$pkgver" + patch -p1 < "$srcdir/fix-qt-debug.patch" +} build() { cmake -B build -S PolyMC-$pkgver \ diff --git a/fix-qt-debug.patch b/fix-qt-debug.patch new file mode 100644 index 000000000000..1089e91456dd --- /dev/null +++ b/fix-qt-debug.patch @@ -0,0 +1,38 @@ +From 0dc124d636d76692b1e2c01050743dd87dc78a05 Mon Sep 17 00:00:00 2001 +From: Kaydax <kaydax@kaydax.xyz> +Date: Sat, 15 Feb 2025 10:49:10 -0500 +Subject: [PATCH] Fix compiling for Qt 6.9.0 (Nice) + +--- + launcher/meta/JsonFormat.h | 6 ++++++ + launcher/minecraft/launch/ConfigureAuthlibInjector.cpp | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/launcher/meta/JsonFormat.h b/launcher/meta/JsonFormat.h +index 93217b7e06..56766eadb3 100644 +--- a/launcher/meta/JsonFormat.h ++++ b/launcher/meta/JsonFormat.h +@@ -80,4 +80,10 @@ void serializeRequires(QJsonObject & objOut, RequireSet* ptr, const char * keyNa + MetadataVersion currentFormatVersion(); + } + ++// HACK: Qt needs the items of container metatypes to be QDebug-able so just implement it to do nothing since we dont actually use it ++inline QDebug operator<<(QDebug debug, const Meta::Require &set) ++{ ++ return debug; ++} ++ + Q_DECLARE_METATYPE(std::set<Meta::Require>) +diff --git a/launcher/minecraft/launch/ConfigureAuthlibInjector.cpp b/launcher/minecraft/launch/ConfigureAuthlibInjector.cpp +index ceb3d72f34..ae86acfdee 100644 +--- a/launcher/minecraft/launch/ConfigureAuthlibInjector.cpp ++++ b/launcher/minecraft/launch/ConfigureAuthlibInjector.cpp +@@ -31,7 +31,7 @@ void ConfigureAuthlibInjector::executeTask() + Net::Download::makeCached(QUrl("https://authlib-injector.yushi.moe/artifact/latest.json"), entry, Net::Download::Option::NoOptions); + m_job->addNetAction(latestJsonDl); + connect(m_job.get(), &NetJob::succeeded, this, [this, entry, downloadFailed] { +- QFile authlibInjectorLatestJson = entry->getFullPath(); ++ QFile authlibInjectorLatestJson{entry->getFullPath()}; + authlibInjectorLatestJson.open(QIODevice::ReadOnly); + if (!authlibInjectorLatestJson.isOpen()) + return emitFailed(QString("Failed to open authlib-injector info json: %1").arg(authlibInjectorLatestJson.errorString())); |