1 |
commit: ff08079716399cafe5aad20e334b9b8c09ca709d |
2 |
Author: Thiago Donato Ferreira <flowlnlnln <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Sep 18 22:24:11 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 22 10:14:00 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff080797 |
7 |
|
8 |
games-action/polymc: add qt6 USE flag to the live ebuild |
9 |
|
10 |
Signed-off-by: Thiago Donato Ferreira <flowlnlnln <AT> gmail.com> |
11 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
12 |
|
13 |
games-action/polymc/metadata.xml | 1 + |
14 |
games-action/polymc/polymc-9999.ebuild | 36 ++++++++++++++++++++++------------ |
15 |
2 files changed, 24 insertions(+), 13 deletions(-) |
16 |
|
17 |
diff --git a/games-action/polymc/metadata.xml b/games-action/polymc/metadata.xml |
18 |
index f704149126f6..7ba4aabb75f4 100644 |
19 |
--- a/games-action/polymc/metadata.xml |
20 |
+++ b/games-action/polymc/metadata.xml |
21 |
@@ -25,5 +25,6 @@ |
22 |
<longdescription>PolyMC is a multi-instance Minecraft launcher focused on user freedom, redistributability, and simplicity.</longdescription> |
23 |
<use> |
24 |
<flag name="lto">Enable link-time optimization</flag> |
25 |
+ <flag name="qt6">Build with Qt6 support instead of the default Qt5</flag> |
26 |
</use> |
27 |
</pkgmetadata> |
28 |
|
29 |
diff --git a/games-action/polymc/polymc-9999.ebuild b/games-action/polymc/polymc-9999.ebuild |
30 |
index 0f99fa720844..c9733e891936 100644 |
31 |
--- a/games-action/polymc/polymc-9999.ebuild |
32 |
+++ b/games-action/polymc/polymc-9999.ebuild |
33 |
@@ -39,30 +39,41 @@ LICENSE="Apache-2.0 BSD BSD-2 GPL-2+ GPL-3 ISC LGPL-2.1+ LGPL-3+ MIT" |
34 |
|
35 |
SLOT="0" |
36 |
|
37 |
-IUSE="debug lto test" |
38 |
+IUSE="debug lto qt6 test" |
39 |
REQUIRED_USE=" |
40 |
lto? ( !debug ) |
41 |
" |
42 |
|
43 |
RESTRICT="!test? ( test )" |
44 |
|
45 |
-MIN_QT="5.12.0" |
46 |
-QT_SLOT=5 |
47 |
+MIN_QT_5_VERSION="5.12.0" |
48 |
+MIN_QT_6_VERSION="6.0.0" |
49 |
|
50 |
QT_DEPS=" |
51 |
- >=dev-qt/qtconcurrent-${MIN_QT}:${QT_SLOT} |
52 |
- >=dev-qt/qtcore-${MIN_QT}:${QT_SLOT} |
53 |
- >=dev-qt/qtgui-${MIN_QT}:${QT_SLOT} |
54 |
- >=dev-qt/qtnetwork-${MIN_QT}:${QT_SLOT} |
55 |
- >=dev-qt/qttest-${MIN_QT}:${QT_SLOT} |
56 |
- >=dev-qt/qtwidgets-${MIN_QT}:${QT_SLOT} |
57 |
- >=dev-qt/qtxml-${MIN_QT}:${QT_SLOT} |
58 |
+ !qt6? ( |
59 |
+ >=dev-qt/qtconcurrent-${MIN_QT_5_VERSION}:5 |
60 |
+ >=dev-qt/qtcore-${MIN_QT_5_VERSION}:5 |
61 |
+ >=dev-qt/qtgui-${MIN_QT_5_VERSION}:5 |
62 |
+ >=dev-qt/qtnetwork-${MIN_QT_5_VERSION}:5 |
63 |
+ >=dev-qt/qttest-${MIN_QT_5_VERSION}:5 |
64 |
+ >=dev-qt/qtwidgets-${MIN_QT_5_VERSION}:5 |
65 |
+ >=dev-qt/qtxml-${MIN_QT_5_VERSION}:5 |
66 |
+ ) |
67 |
+ |
68 |
+ qt6? ( |
69 |
+ >=dev-qt/qtbase-${MIN_QT_6_VERSION}:6[concurrent,gui,network,widgets,xml(+)] |
70 |
+ >=dev-qt/qtsvg-${MIN_QT_6_VERSION}:6 |
71 |
+ >=dev-qt/qt5compat-${MIN_QT_6_VERSION}:6 |
72 |
+ ) |
73 |
" |
74 |
|
75 |
# Required at both build-time and run-time |
76 |
COMMON_DEPENDS=" |
77 |
${QT_DEPS} |
78 |
- >=dev-libs/quazip-1.3:=[qt5(+)] |
79 |
+ |
80 |
+ !qt6? ( >=dev-libs/quazip-1.3:=[qt5(+)] ) |
81 |
+ qt6? ( >=dev-libs/quazip-1.3:=[qt6(-)] ) |
82 |
+ |
83 |
sys-libs/zlib |
84 |
" |
85 |
|
86 |
@@ -102,8 +113,7 @@ src_configure(){ |
87 |
-DCMAKE_INSTALL_PREFIX="/usr" |
88 |
# Resulting binary is named polymc |
89 |
-DLauncher_APP_BINARY_NAME="${PN}" |
90 |
- # Force Qt5 to avoid accidentaly building the Qt6 version and breaking things |
91 |
- -DLauncher_QT_VERSION_MAJOR=${QT_SLOT} |
92 |
+ -DLauncher_QT_VERSION_MAJOR=$(usex qt6 6 5) |
93 |
|
94 |
-DENABLE_LTO=$(usex lto) |
95 |
-DBUILD_TESTING=$(usex test) |