From nobody Mon Sep 09 18:01:51 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X2ZR35jyJz5TZDj; Mon, 09 Sep 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X2ZR34yvRz4FFm; Mon, 9 Sep 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725904911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjkKzXjtLzZ/HaeOEaLTUErU7i4RQKm/0FjAarRnT10=; b=EHI9eL2bRxzoiJMvVx+98BPs+BZQSooe8pkyXmL5wDNRBb9SvO8QEN62PIlkjOoKEydoqQ xpWkiYoaIYEle3VdhAUUORE+MH8OeGpb9yB61g7xbeQFtRytzcId/vHc/+72RRECOoiTva IyyFswRxTGOriED+6mEQh8pRQFRz63IPqlnMOimWNiEFlRivMKTBn3KFnpu8/wP1aozMQr 5HfCKg71OfJRfFG3UUzE3tvKJQZmPU88qhtfK+gj5j17zroVa8Z2MM9uD/azzUNseFOvw0 l0RE00e03BTK05CnznlAp+yOby/UmDIVgLTfKcuXzA3KFmOQSAijelYIRcTPUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725904911; a=rsa-sha256; cv=none; b=OKkLfUJtTe8HfI+DPnp5uhUeTn0HKfNlbMfaNXeT6Fa7HGdiIuqK/bfbZPxGUf7h5egk+e PMSCIq20TTVP07+VHR0y9Ptng+QrIDXzgVcWMpnHql/g5zSiSUpzXyCkzXrOnjsXwXq0tO 1t3A/BwnxqjjjctAIh+MInXovLld+i1fkdaGRYasEicNDGeGjT5OaeUPZNG8L2AKZYK1Sg j2cJ49dmkAr6PxCL2Ec8oRwp+z2dhNAPmOU/ldYODUx6h+/avoCLpt2QzwOjI7zFuDf4PN AOehEY9iOgH1iAsDZVUNr9CS1x+0WbM641F7R2ZcSEHhjA5BN0Kh2IWUnXPS3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725904911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjkKzXjtLzZ/HaeOEaLTUErU7i4RQKm/0FjAarRnT10=; b=yTktMIm+nlLzq7ROJsFfc2S1S5vd33UzGT0MOAmjMUApNdV2V8LTrCrRhikf18nShj5yNT mM5HpdMrqZNkxbOVJh0QNDCsH3+y+X0ejnWX3UirGaLgCQXJEAioU8IWlA5nsMroiUnnGh 3/UABnBpWffQf0uzinC53w/iHanQBFQFF+v1J28L2zX/nf6gyGDeTfT6b71JF7OGJk7iCS U8ZVAyhpiFjPmzuJfOuFL4jEWaZLFB5xoIQ4OWdeuK6zxP1oJ7dkWG0+UJg1ELV05jVhLA nrUiIWa/rM/KX+0Gavff8IAwRgRD7gbcNOZaTIu7LjJRO3Vtms5Yi4jXjkAz9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X2ZR34ZjKzDbC; Mon, 9 Sep 2024 18:01:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 489I1pbq042395; Mon, 9 Sep 2024 18:01:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 489I1pvd042392; Mon, 9 Sep 2024 18:01:51 GMT (envelope-from git) Date: Mon, 9 Sep 2024 18:01:51 GMT Message-Id: <202409091801.489I1pvd042392@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: cfd09d6e9d1b - main - games/prismlauncher: New port: Minecraft launcher with ability to manage multiple instances List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfd09d6e9d1bca2c3f41e14500e8a1c5ad39518e Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=cfd09d6e9d1bca2c3f41e14500e8a1c5ad39518e commit cfd09d6e9d1bca2c3f41e14500e8a1c5ad39518e Author: Alexander Vereeken AuthorDate: 2024-09-09 18:00:06 +0000 Commit: Vladimir Druzenko CommitDate: 2024-09-09 18:00:06 +0000 games/prismlauncher: New port: Minecraft launcher with ability to manage multiple instances A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. (Fork of MultiMC) https://prismlauncher.org Differential Revision: https://reviews.freebsd.org/D44661 --- games/Makefile | 1 + games/prismlauncher/Makefile | 35 ++++++++++++++++++++++ games/prismlauncher/distinfo | 7 +++++ .../patch-launcher_minecraft_LaunchProfile.cpp | 18 +++++++++++ .../patch-launcher_minecraft_MinecraftInstance.cpp | 20 +++++++++++++ ...ch-launcher_ui_pages_global_AccountListPage.cpp | 19 ++++++++++++ .../files/patch-libraries_javacheck_CMakeLists.txt | 11 +++++++ .../files/patch-libraries_launcher_CMakeLists.txt | 11 +++++++ games/prismlauncher/pkg-descr | 2 ++ games/prismlauncher/pkg-message | 20 +++++++++++++ games/prismlauncher/pkg-plist | 10 +++++++ 11 files changed, 154 insertions(+) diff --git a/games/Makefile b/games/Makefile index 7755356d8c85..163b06730867 100644 --- a/games/Makefile +++ b/games/Makefile @@ -790,6 +790,7 @@ SUBDIR += prboom SUBDIR += prboom-plus SUBDIR += primateplunge + SUBDIR += prismlauncher SUBDIR += puckman SUBDIR += punchy SUBDIR += pvpgn diff --git a/games/prismlauncher/Makefile b/games/prismlauncher/Makefile new file mode 100644 index 000000000000..714390e18e4d --- /dev/null +++ b/games/prismlauncher/Makefile @@ -0,0 +1,35 @@ +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 + +LIB_DEPENDS= libcmark.so:textproc/cmark \ + libquazip1-qt6.so:archivers/quazip@qt6 \ + libtomlplusplus.so:devel/tomlplusplus +RUN_DEPENDS= lwjgl>0:games/lwjgl \ + lwjgl3>0:games/lwjgl3 \ + openjdk21>0:java/openjdk21 \ + xrandr:x11/xrandr + +USES= cmake compiler:c++17-lang desktop-file-utils gl kde:6 qt:6 \ + shared-mime-info +USE_GITHUB= yes +GH_ACCOUNT= PrismLauncher +GH_PROJECT= ${GH_ACCOUNT} +GH_TUPLE= gulrak:filesystem:2fc4b463:filesystem/libraries/filesystem \ + PrismLauncher:libnbtplusplus:23b95512:libnbtplusplus/libraries/libnbtplusplus +USE_GL= opengl +USE_JAVA= yes +USE_KDE= ecm:build +USE_QT= 5compat base + +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 index 000000000000..a3fff46f0bd9 --- /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 index 000000000000..e44a7c27b8bb --- /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 index 000000000000..eb4cc4ed4837 --- /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 index 000000000000..0c15ed8b6577 --- /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/files/patch-libraries_javacheck_CMakeLists.txt b/games/prismlauncher/files/patch-libraries_javacheck_CMakeLists.txt new file mode 100644 index 000000000000..58dca6f362f4 --- /dev/null +++ b/games/prismlauncher/files/patch-libraries_javacheck_CMakeLists.txt @@ -0,0 +1,11 @@ +--- libraries/javacheck/CMakeLists.txt.orig 2024-06-18 18:07:06 UTC ++++ libraries/javacheck/CMakeLists.txt +@@ -4,7 +4,7 @@ set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck) + + include(UseJava) + set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck) +-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7 -Xlint:deprecation -Xlint:unchecked) ++set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8 -Xlint:deprecation -Xlint:unchecked) + + set(SRC + JavaCheck.java diff --git a/games/prismlauncher/files/patch-libraries_launcher_CMakeLists.txt b/games/prismlauncher/files/patch-libraries_launcher_CMakeLists.txt new file mode 100644 index 000000000000..35c7badf6a7d --- /dev/null +++ b/games/prismlauncher/files/patch-libraries_launcher_CMakeLists.txt @@ -0,0 +1,11 @@ +--- libraries/launcher/CMakeLists.txt.orig 2024-06-18 18:07:06 UTC ++++ libraries/launcher/CMakeLists.txt +@@ -4,7 +4,7 @@ set(CMAKE_JAVA_JAR_ENTRY_POINT org.prismlauncher.Entry + + include(UseJava) + set(CMAKE_JAVA_JAR_ENTRY_POINT org.prismlauncher.EntryPoint) +-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7) ++set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8) + + set(SRC + org/prismlauncher/EntryPoint.java diff --git a/games/prismlauncher/pkg-descr b/games/prismlauncher/pkg-descr new file mode 100644 index 000000000000..4387573cea53 --- /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 index 000000000000..91697adac6df --- /dev/null +++ b/games/prismlauncher/pkg-message @@ -0,0 +1,20 @@ +[ +{ +message: <