diff --git a/games/Makefile b/games/Makefile --- a/games/Makefile +++ b/games/Makefile @@ -790,6 +790,7 @@ SUBDIR += prboom SUBDIR += prboom-plus SUBDIR += primateplunge + SUBDIR += prisimlauncher SUBDIR += puckman SUBDIR += punchy SUBDIR += pvpgn diff --git a/games/prismlauncher/Makefile b/games/prismlauncher/Makefile new file mode 100644 --- /dev/null +++ b/games/prismlauncher/Makefile @@ -0,0 +1,38 @@ +PORTNAME= prismlauncher +DISTVERSION= 8.4 +CATEGORIES= games java + +MAINTAINER= Alexander88207@protonmail.com +COMMENT= Minecraft launcher with ability to manage multiple instances +WWW= https://prismlauncher.org/ + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING.md + +RUN_DEPENDS= lwjgl>0:games/lwjgl \ + lwjgl3>0:games/lwjgl3 \ + xrandr:x11/xrandr +LIB_DEPENDS= libcmark.so:textproc/cmark \ + libquazip1-qt6.so:archivers/quazip@qt6 \ + libtomlplusplus.so:devel/tomlplusplus + +USES= cmake compiler:c++17-lang desktop-file-utils gl kde:6 openal qt:6 shared-mime-info + +USE_GL= opengl +USE_KDE= ecm:build +USE_JAVA= yes +JAVA_RUN= 21 +JAVA_VERSION= 8 17 21 +USE_QT= 5compat base svg + +USE_GITHUB= yes +GH_ACCOUNT= PrismLauncher +GH_PROJECT= PrismLauncher + +GH_TUPLE= gulrak:filesystem:2fc4b463:filesystem/libraries/filesystem \ + PrismLauncher:libnbtplusplus:23b95512:libnbtplusplus/libraries/libnbtplusplus + +CMAKE_ARGS= -DJAVA_HOME=${JAVA_HOME} -DJava_JAVAC_EXECUTABLE=${JAVAC} \ + -DLauncher_BUILD_PLATFORM=FreeBSD + +.include diff --git a/games/prismlauncher/distinfo b/games/prismlauncher/distinfo new file mode 100644 --- /dev/null +++ b/games/prismlauncher/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1725714249 +SHA256 (PrismLauncher-PrismLauncher-8.4_GH0.tar.gz) = e3268a787d326c7c71f63093a2b411d6735c07b3751b426db6d50a0386311c76 +SIZE (PrismLauncher-PrismLauncher-8.4_GH0.tar.gz) = 4397390 +SHA256 (gulrak-filesystem-2fc4b463_GH0.tar.gz) = 270eead1276da3af72e6f1c5b819d0b2a7b24ddc3e4e7a1a0b69ffba8d07228f +SIZE (gulrak-filesystem-2fc4b463_GH0.tar.gz) = 211853 +SHA256 (PrismLauncher-libnbtplusplus-23b95512_GH0.tar.gz) = 4393bc210d2025029fc364d761d339c88223a3cdd03b401ebee58d5e3cddb4dc +SIZE (PrismLauncher-libnbtplusplus-23b95512_GH0.tar.gz) = 48603 diff --git a/games/prismlauncher/files/patch-launcher_minecraft_LaunchProfile.cpp b/games/prismlauncher/files/patch-launcher_minecraft_LaunchProfile.cpp new file mode 100644 --- /dev/null +++ b/games/prismlauncher/files/patch-launcher_minecraft_LaunchProfile.cpp @@ -0,0 +1,18 @@ +# Patch taken from er2off: https://github.com/er2off/freebsd-ports +--- launcher/minecraft/LaunchProfile.cpp.orig 2023-11-27 12:45:04 UTC ++++ launcher/minecraft/LaunchProfile.cpp +@@ -344,6 +344,14 @@ void LaunchProfile::getLibraryFiles(const RuntimeConte + jars.clear(); + nativeJars.clear(); + for (auto lib : getLibraries()) { ++#ifdef Q_OS_FREEBSD ++ // HACKHACK: use system lwjgl3 until mojang will fix it ++ QString artifact = lib->artifactId(); ++ if (artifact.startsWith("lwjgl") && lib->version().startsWith("3.")) { ++ jars += "/usr/local/share/java/classes/lwjgl3/" + artifact + ".jar"; ++ continue; ++ } ++#endif + lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath); + } + // NOTE: order is important here, add main jar last to the lists diff --git a/games/prismlauncher/files/patch-launcher_minecraft_MinecraftInstance.cpp b/games/prismlauncher/files/patch-launcher_minecraft_MinecraftInstance.cpp new file mode 100644 --- /dev/null +++ b/games/prismlauncher/files/patch-launcher_minecraft_MinecraftInstance.cpp @@ -0,0 +1,20 @@ +# Patch taken from er2off: https://github.com/er2off/freebsd-ports +--- launcher/minecraft/MinecraftInstance.cpp.orig 2023-11-27 12:44:40 UTC ++++ launcher/minecraft/MinecraftInstance.cpp +@@ -305,7 +305,16 @@ QString MinecraftInstance::getNativePath() const + + QString MinecraftInstance::getNativePath() const + { ++#ifdef Q_OS_FREEBSD ++ Version instance_ver{ getPackProfile()->getComponentVersion("net.minecraft") }; ++ QDir natives_dir; ++ if (instance_ver < Version("1.13.0")) ++ natives_dir = QDir("/usr/local/lib/lwjgl/"); ++ else ++ natives_dir = QDir("/usr/local/lib/lwjgl3/"); ++#else + QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/")); ++#endif + return natives_dir.absolutePath(); + } + diff --git a/games/prismlauncher/files/patch-launcher_ui_pages_global_AccountListPage.cpp b/games/prismlauncher/files/patch-launcher_ui_pages_global_AccountListPage.cpp new file mode 100644 --- /dev/null +++ b/games/prismlauncher/files/patch-launcher_ui_pages_global_AccountListPage.cpp @@ -0,0 +1,19 @@ +# Patch taken from er2off: https://github.com/er2off/freebsd-ports +--- launcher/ui/pages/global/AccountListPage.cpp.orig 2024-03-03 19:37:21 UTC ++++ launcher/ui/pages/global/AccountListPage.cpp +@@ -147,6 +147,7 @@ void AccountListPage::on_actionAddOffline_triggered() + + void AccountListPage::on_actionAddOffline_triggered() + { ++#ifdef NO_OFFLINE + if (!m_accounts->anyAccountIsValid()) { + QMessageBox::warning(this, tr("Error"), + tr("You must add a Microsoft account that owns Minecraft before you can add an offline account." +@@ -154,6 +155,7 @@ void AccountListPage::on_actionAddOffline_triggered() + "If you have lost your account you can contact Microsoft for support.")); + return; + } ++#endif + + MinecraftAccountPtr account = + OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account.")); diff --git a/games/prismlauncher/pkg-descr b/games/prismlauncher/pkg-descr new file mode 100644 --- /dev/null +++ b/games/prismlauncher/pkg-descr @@ -0,0 +1,2 @@ +A custom launcher for Minecraft that allows you to easily manage +multiple installations of Minecraft at once. (Fork of MultiMC) diff --git a/games/prismlauncher/pkg-message b/games/prismlauncher/pkg-message new file mode 100644 --- /dev/null +++ b/games/prismlauncher/pkg-message @@ -0,0 +1,20 @@ +[ +{ +message: <