1 |
commit: a33d6f330ca2ed4de966822261accdbb4d468582 |
2 |
Author: Thiago Donato Ferreira <flowlnlnln <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 9 10:30:37 2022 +0000 |
4 |
Commit: Thiago Donato Ferreira <flowlnlnln <AT> gmail <DOT> com> |
5 |
CommitDate: Sat Apr 9 10:36:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a33d6f33 |
7 |
|
8 |
games-action/polymc: new package |
9 |
|
10 |
Signed-off-by: Thiago Donato Ferreira <flowlnlnln <AT> gmail.com> |
11 |
|
12 |
games-action/polymc/Manifest | 1 + |
13 |
games-action/polymc/metadata.xml | 17 ++++++ |
14 |
games-action/polymc/polymc-1.1.1.ebuild | 93 +++++++++++++++++++++++++++++++++ |
15 |
games-action/polymc/polymc-9999.ebuild | 89 +++++++++++++++++++++++++++++++ |
16 |
4 files changed, 200 insertions(+) |
17 |
|
18 |
diff --git a/games-action/polymc/Manifest b/games-action/polymc/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000..bb6f6641a |
21 |
--- /dev/null |
22 |
+++ b/games-action/polymc/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST PolyMC-1.1.1.tar.gz 5116164 BLAKE2B ca251cac3c8ea21de8a59297a0e637dac078d751476fec5fe86696df270c63ff079779056f016fa656506ea205bb7ace50ab6e0df190ffca14e43297b92292af SHA512 db32479e9e8a92ec61292c97281673b3084e1085d29b764214834de872d9eddf2ed1d2e383bcd79197e0c9321eec025af652b12c863596ff6abb0f5fba9a7af5 |
25 |
|
26 |
diff --git a/games-action/polymc/metadata.xml b/games-action/polymc/metadata.xml |
27 |
new file mode 100644 |
28 |
index 000000000..a3aeebb29 |
29 |
--- /dev/null |
30 |
+++ b/games-action/polymc/metadata.xml |
31 |
@@ -0,0 +1,17 @@ |
32 |
+<?xml version="1.0" encoding="UTF-8"?> |
33 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
34 |
+<pkgmetadata> |
35 |
+ <maintainer type="person"> |
36 |
+ <email>flowlnlnln@×××××.com</email> |
37 |
+ <name>Thiago Donato Ferreira</name> |
38 |
+ </maintainer> |
39 |
+ <maintainer type="person"> |
40 |
+ <email>swurl@×××××.xyz</email> |
41 |
+ <name>Carson Rueter</name> |
42 |
+ </maintainer> |
43 |
+ <upstream> |
44 |
+ <bugs-to>https://github.com/PolyMC/PolyMC/issues</bugs-to> |
45 |
+ <doc>https://polymc.org/wiki/</doc> |
46 |
+ </upstream> |
47 |
+ <longdescription lang="en">PolyMC is a multi-instance Minecraft launcher focused on user freedom, redistributability, and simplicity.</longdescription> |
48 |
+</pkgmetadata> |
49 |
|
50 |
diff --git a/games-action/polymc/polymc-1.1.1.ebuild b/games-action/polymc/polymc-1.1.1.ebuild |
51 |
new file mode 100644 |
52 |
index 000000000..d93038a61 |
53 |
--- /dev/null |
54 |
+++ b/games-action/polymc/polymc-1.1.1.ebuild |
55 |
@@ -0,0 +1,93 @@ |
56 |
+# Copyright 1999-2022 Gentoo Authors |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+EAPI=8 |
60 |
+ |
61 |
+inherit cmake java-pkg-2 optfeature xdg |
62 |
+ |
63 |
+HOMEPAGE="https://polymc.org/" |
64 |
+DESCRIPTION="A custom, open source Minecraft launcher" |
65 |
+ |
66 |
+MY_PN="PolyMC" |
67 |
+ |
68 |
+# Let's use the vendored tarball to avoid dealing with the submodules directly |
69 |
+SRC_URI=" |
70 |
+ https://github.com/PolyMC/PolyMC/releases/download/${PV}/${MY_PN}-${PV}.tar.gz |
71 |
+" |
72 |
+ |
73 |
+# GPL-3 for PolyMC |
74 |
+# LGPL-3 for libnbtplusplus |
75 |
+# LGPL-2.1 with linking exception for Quazip |
76 |
+LICENSE="GPL-3 LGPL-3 LGPL-2.1-with-linking-exception" |
77 |
+ |
78 |
+SLOT="0" |
79 |
+KEYWORDS="amd64" |
80 |
+ |
81 |
+IUSE="debug" |
82 |
+ |
83 |
+QT_DEPS=" |
84 |
+ >=dev-qt/qtcore-5.6.0:5 |
85 |
+ >=dev-qt/qttest-5.6.0:5 |
86 |
+ >=dev-qt/qtconcurrent-5.6.0:5 |
87 |
+ >=dev-qt/qtgui-5.6.0:5 |
88 |
+ >=dev-qt/qtnetwork-5.6.0:5 |
89 |
+ >=dev-qt/qtwidgets-5.6.0:5 |
90 |
+ >=dev-qt/qtxml-5.6.0:5 |
91 |
+" |
92 |
+ |
93 |
+BDEPEND=" |
94 |
+ ${QT_DEPS} |
95 |
+ sys-libs/zlib |
96 |
+ >=virtual/jdk-1.8.0:* |
97 |
+ media-libs/libglvnd |
98 |
+" |
99 |
+ |
100 |
+DEPEND=" |
101 |
+ ${QT_DEPS} |
102 |
+ >=virtual/jre-1.8.0:* |
103 |
+ virtual/opengl |
104 |
+" |
105 |
+ |
106 |
+RDEPEND="${DEPEND}" |
107 |
+ |
108 |
+# We'll fetch the files from the GitHub archive directly, at least for now... |
109 |
+RESTRICT="mirror" |
110 |
+ |
111 |
+# The PolyMC's files are unpacked to ${WORKDIR}/PolyMC-${PV} |
112 |
+S="${WORKDIR}/${MY_PN}-${PV}" |
113 |
+ |
114 |
+src_prepare(){ |
115 |
+ default |
116 |
+ cmake_src_prepare |
117 |
+} |
118 |
+ |
119 |
+src_configure(){ |
120 |
+ if use debug; then |
121 |
+ CMAKE_BUILD_TYPE=Debug |
122 |
+ else |
123 |
+ # Prepare for LTO in 1.2.0 (?) |
124 |
+ # See https://github.com/PolyMC/PolyMC/pull/333 |
125 |
+ CMAKE_BUILD_TYPE=Release |
126 |
+ fi |
127 |
+ |
128 |
+ local mycmakeargs=( |
129 |
+ # Do a system install |
130 |
+ -DLauncher_PORTABLE=false |
131 |
+ -DCMAKE_INSTALL_PREFIX="/usr" |
132 |
+ # Resulting binary is named polymc |
133 |
+ -DLauncher_APP_BINARY_NAME="${PN}" |
134 |
+ ) |
135 |
+ |
136 |
+ cmake_src_configure |
137 |
+} |
138 |
+ |
139 |
+src_compile(){ |
140 |
+ cmake_src_compile |
141 |
+} |
142 |
+ |
143 |
+pkg_postinst() { |
144 |
+ xdg_pkg_postinst |
145 |
+ |
146 |
+ # https://github.com/PolyMC/PolyMC/issues/227 |
147 |
+ optfeature "old Minecraft (<= 1.12.2) support" x11-libs/libXrandr |
148 |
+} |
149 |
|
150 |
diff --git a/games-action/polymc/polymc-9999.ebuild b/games-action/polymc/polymc-9999.ebuild |
151 |
new file mode 100644 |
152 |
index 000000000..ae09f674b |
153 |
--- /dev/null |
154 |
+++ b/games-action/polymc/polymc-9999.ebuild |
155 |
@@ -0,0 +1,89 @@ |
156 |
+# Copyright 1999-2022 Gentoo Authors |
157 |
+# Distributed under the terms of the GNU General Public License v2 |
158 |
+ |
159 |
+EAPI=8 |
160 |
+ |
161 |
+inherit cmake git-r3 java-pkg-2 optfeature xdg |
162 |
+ |
163 |
+HOMEPAGE="https://polymc.org/" |
164 |
+DESCRIPTION="A custom, open source Minecraft launcher" |
165 |
+ |
166 |
+EGIT_REPO_URI=" |
167 |
+ https://github.com/PolyMC/PolyMC |
168 |
+ https://github.com/MultiMC/libnbtplusplus |
169 |
+ https://github.com/stachenov/quazip |
170 |
+" |
171 |
+ |
172 |
+# GPL-3 for PolyMC |
173 |
+# LGPL-3 for libnbtplusplus |
174 |
+# LGPL-2.1 with linking exception for Quazip |
175 |
+LICENSE="GPL-3 LGPL-3 LGPL-2.1-with-linking-exception" |
176 |
+ |
177 |
+SLOT="0" |
178 |
+ |
179 |
+IUSE="debug" |
180 |
+ |
181 |
+QT_DEPS=" |
182 |
+ >=dev-qt/qtcore-5.6.0:5 |
183 |
+ >=dev-qt/qttest-5.6.0:5 |
184 |
+ >=dev-qt/qtconcurrent-5.6.0:5 |
185 |
+ >=dev-qt/qtgui-5.6.0:5 |
186 |
+ >=dev-qt/qtnetwork-5.6.0:5 |
187 |
+ >=dev-qt/qtwidgets-5.6.0:5 |
188 |
+ >=dev-qt/qtxml-5.6.0:5 |
189 |
+" |
190 |
+ |
191 |
+BDEPEND=" |
192 |
+ ${QT_DEPS} |
193 |
+ sys-libs/zlib |
194 |
+ >=virtual/jdk-1.8.0:* |
195 |
+ media-libs/libglvnd |
196 |
+" |
197 |
+ |
198 |
+DEPEND=" |
199 |
+ ${QT_DEPS} |
200 |
+ >=virtual/jre-1.8.0:* |
201 |
+ virtual/opengl |
202 |
+" |
203 |
+ |
204 |
+RDEPEND="${DEPEND}" |
205 |
+ |
206 |
+src_prepare() { |
207 |
+ if ${PV} != 9999; then |
208 |
+ EGIT_COMMIT="${PV}" |
209 |
+ fi |
210 |
+ |
211 |
+ git submodule init |
212 |
+ git config submodule.libnbtplusplus.url "${WORKDIR}/libnbtplusplus" |
213 |
+ git config submodule.quazip.url "${WORKDIR}/quazip" |
214 |
+ git submodule update |
215 |
+ |
216 |
+ default |
217 |
+ cmake_src_prepare |
218 |
+} |
219 |
+ |
220 |
+src_configure(){ |
221 |
+ if use debug; then |
222 |
+ CMAKE_BUILD_TYPE=Debug |
223 |
+ else |
224 |
+ CMAKE_BUILD_TYPE=Release |
225 |
+ fi |
226 |
+ |
227 |
+ local mycmakeargs=( |
228 |
+ -DLauncher_PORTABLE=0 |
229 |
+ -DCMAKE_INSTALL_PREFIX="/usr" |
230 |
+ -DLauncher_APP_BINARY_NAME="${PN}" |
231 |
+ ) |
232 |
+ cmake_src_configure |
233 |
+} |
234 |
+ |
235 |
+src_compile(){ |
236 |
+ cmake_src_compile |
237 |
+} |
238 |
+ |
239 |
+pkg_postinst() { |
240 |
+ xdg_pkg_postinst |
241 |
+ |
242 |
+ # https://github.com/PolyMC/PolyMC/issues/227 |
243 |
+ optfeature "old Minecraft (<= 1.12.2) support" x11-libs/libXrandr |
244 |
+} |