From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D9F6A158020 for ; Thu, 20 Oct 2022 04:25:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 106BCE085A; Thu, 20 Oct 2022 04:25:11 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E23C1E085A for ; Thu, 20 Oct 2022 04:25:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6B93340F88 for ; Thu, 20 Oct 2022 04:25:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5307D5DE for ; Thu, 20 Oct 2022 04:25:08 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1666239742.a56bea75ed3a0b6795a4c2446422ef38367e13a6.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/prismlauncher/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-action/prismlauncher/metadata.xml games-action/prismlauncher/prismlauncher-9999.ebuild X-VCS-Directories: games-action/prismlauncher/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a56bea75ed3a0b6795a4c2446422ef38367e13a6 X-VCS-Branch: master Date: Thu, 20 Oct 2022 04:25:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3b826d86-c592-4450-a8df-cc464c2092a0 X-Archives-Hash: 191f05b89205645c8fade53046631363 commit: a56bea75ed3a0b6795a4c2446422ef38367e13a6 Author: Thiago Donato Ferreira gmail com> AuthorDate: Wed Oct 19 00:13:02 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 20 04:22:22 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a56bea75 games-action/prismlauncher: new package, add 9999 This is mostly an adaptation of the games-action/polymc ebuild, considering we're a 2-day old fork of it. Bug: https://bugs.gentoo.org/877495 Signed-off-by: Thiago Donato Ferreira gmail.com> Signed-off-by: Sam James gentoo.org> games-action/prismlauncher/metadata.xml | 26 ++++ .../prismlauncher/prismlauncher-9999.ebuild | 143 +++++++++++++++++++++ 2 files changed, 169 insertions(+) diff --git a/games-action/prismlauncher/metadata.xml b/games-action/prismlauncher/metadata.xml new file mode 100644 index 000000000000..f54dc7d44a8d --- /dev/null +++ b/games-action/prismlauncher/metadata.xml @@ -0,0 +1,26 @@ + + + + + flowlnlnln@gmail.com + Thiago Donato Ferreira + + + andrewammerlaan@gentoo.org + Andrew Ammerlaan + + + proxy-maint@gentoo.org + Proxy Maintainers + + + https://github.com/PrismLauncher/PrismLauncher/issues + https://prismlauncher.org/wiki/ + PrismLauncher/PrismLauncher + + Prism Launcher is a multi-instance Minecraft launcher focused on user freedom, redistributability, and simplicity. + + Enable link-time optimization + Build with Qt6 support instead of the default Qt5 + + diff --git a/games-action/prismlauncher/prismlauncher-9999.ebuild b/games-action/prismlauncher/prismlauncher-9999.ebuild new file mode 100644 index 000000000000..0c3fb958fff1 --- /dev/null +++ b/games-action/prismlauncher/prismlauncher-9999.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake java-pkg-2 optfeature xdg + +HOMEPAGE="https://prismlauncher.org/ https://github.com/PrismLauncher/PrismLauncher" +DESCRIPTION="A custom, open source Minecraft launcher" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + + EGIT_REPO_URI=" + https://github.com/PrismLauncher/PrismLauncher + " + + # TODO: Add tomlplusplus as a system library, like quazip + EGIT_SUBMODULES=( '*' '-libraries/quazip' ) +else + MY_PN="PrismLauncher" + + # Let's use the vendored tarball to avoid dealing with the submodules directly + SRC_URI=" + https://github.com/PrismLauncher/PrismLauncher/releases/download/${PV}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz + " + + # The Prism's files are unpacked to ${WORKDIR}/PrismLauncher-${PV} + S="${WORKDIR}/${MY_PN}-${PV}" + + KEYWORDS="~amd64" +fi + +# GPL-3 for PolyMC (PrismLauncher is forked from it) and Prism itself +# Apache-2.0 for MultiMC (PolyMC is forked from it) +# LGPL-3+ for libnbtplusplus +# MIT for tomlplusplus +# See the rest of PrismLauncher's libraries at https://github.com/PrismLauncher/PrismLauncher/tree/develop/libraries +LICENSE="Apache-2.0 BSD BSD-2 GPL-2+ GPL-3 ISC LGPL-2.1+ LGPL-3+ MIT" + +SLOT="0" + +IUSE="debug lto qt6 test" +REQUIRED_USE=" + lto? ( !debug ) +" + +RESTRICT="!test? ( test )" + +MIN_QT_5_VERSION="5.12.0" +MIN_QT_6_VERSION="6.0.0" + +QT_DEPS=" + !qt6? ( + >=dev-qt/qtconcurrent-${MIN_QT_5_VERSION}:5 + >=dev-qt/qtcore-${MIN_QT_5_VERSION}:5 + >=dev-qt/qtgui-${MIN_QT_5_VERSION}:5 + >=dev-qt/qtnetwork-${MIN_QT_5_VERSION}:5 + >=dev-qt/qttest-${MIN_QT_5_VERSION}:5 + >=dev-qt/qtwidgets-${MIN_QT_5_VERSION}:5 + >=dev-qt/qtxml-${MIN_QT_5_VERSION}:5 + ) + + qt6? ( + >=dev-qt/qtbase-${MIN_QT_6_VERSION}:6[concurrent,gui,network,widgets,xml(+)] + >=dev-qt/qt5compat-${MIN_QT_6_VERSION}:6 + ) +" + +# Required at both build-time and run-time +COMMON_DEPENDS=" + ${QT_DEPS} + + !qt6? ( >=dev-libs/quazip-1.3:=[qt5(+)] ) + qt6? ( >=dev-libs/quazip-1.3:=[qt6(-)] ) + + sys-libs/zlib +" + +BDEPEND=" + app-text/scdoc + kde-frameworks/extra-cmake-modules:5 +" + +DEPEND=" + ${COMMON_DEPENDS} + media-libs/libglvnd + >=virtual/jdk-1.8.0:* +" + +# At run-time we don't depend on JDK, only JRE +# And we need more than just the GL headers +RDEPEND=" + ${COMMON_DEPENDS} + + !qt6? ( >=dev-qt/qtsvg-${MIN_QT_5_VERSION}:5 ) + qt6? ( >=dev-qt/qtsvg-${MIN_QT_6_VERSION}:6 ) + + >=virtual/jre-1.8.0:* + virtual/opengl +" + +src_prepare() { + cmake_src_prepare + + # Prevent conflicting with the user's flags + # See https://bugs.gentoo.org/848765 for more info + sed -i -e 's/-Werror//' -e 's/-D_FORTIFY_SOURCE=2//' CMakeLists.txt || die 'Failed to remove -Werror and -D_FORTIFY_SOURCE via sed' +} + +src_configure(){ + local mycmakeargs=( + -DCMAKE_INSTALL_PREFIX="/usr" + # Resulting binary is named prismlauncher + -DLauncher_APP_BINARY_NAME="${PN}" + -DLauncher_QT_VERSION_MAJOR=$(usex qt6 6 5) + + -DENABLE_LTO=$(usex lto) + -DBUILD_TESTING=$(usex test) + ) + + if use debug; then + CMAKE_BUILD_TYPE=Debug + else + CMAKE_BUILD_TYPE=Release + fi + + cmake_src_configure +} + +src_compile(){ + cmake_src_compile +} + +pkg_postinst() { + xdg_pkg_postinst + + # Original issue: https://github.com/PolyMC/PolyMC/issues/227 + optfeature "old Minecraft (<= 1.12.2) support" x11-apps/xrandr + + optfeature "built-in MangoHud support" games-util/mangohud + optfeature "built-in Feral Gamemode support" games-util/gamemode +}