Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/polymc/
Date: Sun, 29 May 2022 18:44:53
Message-Id: 1653849878.c48ba2907738cf5163ffc95e738709425d1d33f4.andrewammerlaan@gentoo
1 commit: c48ba2907738cf5163ffc95e738709425d1d33f4
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 29 18:39:10 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sun May 29 18:44:38 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c48ba290
7
8 games-action/polymc: add 1.3.1
9
10 Closes: https://github.com/gentoo/gentoo/pull/25679
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
12
13 games-action/polymc/Manifest | 1 +
14 games-action/polymc/polymc-1.3.1.ebuild | 111 ++++++++++++++++++++++++++++++++
15 2 files changed, 112 insertions(+)
16
17 diff --git a/games-action/polymc/Manifest b/games-action/polymc/Manifest
18 index ac7ab8450067..53f0d3f4fada 100644
19 --- a/games-action/polymc/Manifest
20 +++ b/games-action/polymc/Manifest
21 @@ -1 +1,2 @@
22 DIST polymc-1.3.0.tar.gz 5115480 BLAKE2B ac818b899d25f1545ceafd109a8eb48acd6a2d4b09b8d7f5365de0fc1b6ce0171ed053bc19785192ab781a2d7f506167599e3f3747e94fe1cf62b9989208e685 SHA512 b33660dfc7026f1153aaffd4429b9047bffa9cc80a3231bb19c0f3a7d4046654c49f278d9c07ae3ac631172ed147fa06065c2713fb59221ff9131406d8c6df46
23 +DIST polymc-1.3.1.tar.gz 5651471 BLAKE2B ee36d6f046959932c72d6b3320704bbc565afd56e03f715db0f9270148b7ced80ff46d4e2ad33167e77e9b95d5dbe3316d9c7b5f9b36c15e28989555fddf0239 SHA512 8cfd644574a588a0b8dca6adbd9aee21bd603fc29649bbf55ad713dc37a1a9d7a8720031a6952d97c6a597c082f7437315044926d7da2d50e58a3da096343c7b
24
25 diff --git a/games-action/polymc/polymc-1.3.1.ebuild b/games-action/polymc/polymc-1.3.1.ebuild
26 new file mode 100644
27 index 000000000000..abe73ed34f30
28 --- /dev/null
29 +++ b/games-action/polymc/polymc-1.3.1.ebuild
30 @@ -0,0 +1,111 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +inherit cmake java-pkg-2 optfeature xdg
37 +
38 +HOMEPAGE="https://polymc.org/ https://github.com/PolyMC/PolyMC"
39 +DESCRIPTION="A custom, open source Minecraft launcher"
40 +
41 +if [[ ${PV} == 9999 ]]; then
42 + inherit git-r3
43 +
44 + EGIT_REPO_URI="
45 + https://github.com/PolyMC/PolyMC
46 + https://github.com/PolyMC/libnbtplusplus
47 + "
48 +
49 + EGIT_SUBMODULES=( 'depends/libnbtplusplus' )
50 +else
51 + MY_PN="PolyMC"
52 +
53 + # Let's use the vendored tarball to avoid dealing with the submodules directly
54 + SRC_URI="
55 + https://github.com/PolyMC/PolyMC/releases/download/${PV}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz
56 + "
57 +
58 + # The PolyMC's files are unpacked to ${WORKDIR}/PolyMC-${PV}
59 + S="${WORKDIR}/${MY_PN}-${PV}"
60 +
61 + KEYWORDS="~amd64"
62 +fi
63 +
64 +# Apache-2.0 for MultiMC (PolyMC is forked from it)
65 +# GPL-3 for PolyMC
66 +# LGPL-3 for libnbtplusplus
67 +# See the rest of PolyMC's libraries at https://github.com/PolyMC/PolyMC/tree/develop/libraries
68 +LICENSE="Apache-2.0 Boost-1.0 BSD BSD-2 GPL-2+ GPL-3 LGPL-3 OFL-1.1 MIT"
69 +
70 +SLOT="0"
71 +
72 +IUSE="debug lto"
73 +REQUIRED_USE="
74 + lto? ( !debug )
75 +"
76 +
77 +MIN_QT="5.12.0"
78 +
79 +QT_DEPS="
80 + >=dev-qt/qtconcurrent-${MIN_QT}:5
81 + >=dev-qt/qtcore-${MIN_QT}:5
82 + >=dev-qt/qtgui-${MIN_QT}:5
83 + >=dev-qt/qtnetwork-${MIN_QT}:5
84 + >=dev-qt/qttest-${MIN_QT}:5
85 + >=dev-qt/qtwidgets-${MIN_QT}:5
86 + >=dev-qt/qtxml-${MIN_QT}:5
87 +"
88 +
89 +# Required at both build-time and run-time
90 +COMMON_DEPENDS="
91 + ${QT_DEPS}
92 + >=dev-libs/quazip-1.3:=
93 + sys-libs/zlib
94 +"
95 +
96 +DEPEND="
97 + ${COMMON_DEPENDS}
98 + media-libs/libglvnd
99 + >=virtual/jdk-1.8.0:*
100 +"
101 +
102 +# At run-time we don't depend on JDK, only JRE
103 +# And we need more than just the GL headers
104 +RDEPEND="
105 + ${COMMON_DEPENDS}
106 + >=virtual/jre-1.8.0:*
107 + virtual/opengl
108 +"
109 +
110 +src_prepare() {
111 + cmake_src_prepare
112 +}
113 +
114 +src_configure(){
115 + local mycmakeargs=(
116 + -DCMAKE_INSTALL_PREFIX="/usr"
117 + # Resulting binary is named polymc
118 + -DLauncher_APP_BINARY_NAME="${PN}"
119 +
120 + -DENABLE_LTO=$(usex lto)
121 + )
122 +
123 + if use debug; then
124 + CMAKE_BUILD_TYPE=Debug
125 + else
126 + CMAKE_BUILD_TYPE=Release
127 + fi
128 +
129 + cmake_src_configure
130 +}
131 +
132 +src_compile(){
133 + cmake_src_compile
134 +}
135 +
136 +pkg_postinst() {
137 + xdg_pkg_postinst
138 +
139 + # https://github.com/PolyMC/PolyMC/issues/227
140 + optfeature "old Minecraft (<= 1.12.2) support" x11-libs/libXrandr
141 +}