summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Donato Ferreira <flowlnlnln@gmail.com>2022-09-18 19:24:11 -0300
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-09-22 12:14:00 +0200
commitff08079716399cafe5aad20e334b9b8c09ca709d (patch)
tree5dd64227b8a200bd89ef757811b3566f67f604ac /games-action
parentnet-libs/accounts-qml: drop 0.7-r1 (diff)
downloadgentoo-ff08079716399cafe5aad20e334b9b8c09ca709d.tar.gz
gentoo-ff08079716399cafe5aad20e334b9b8c09ca709d.tar.bz2
gentoo-ff08079716399cafe5aad20e334b9b8c09ca709d.zip
games-action/polymc: add qt6 USE flag to the live ebuild
Signed-off-by: Thiago Donato Ferreira <flowlnlnln@gmail.com> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r--games-action/polymc/metadata.xml1
-rw-r--r--games-action/polymc/polymc-9999.ebuild36
2 files changed, 24 insertions, 13 deletions
diff --git a/games-action/polymc/metadata.xml b/games-action/polymc/metadata.xml
index f704149126f6..7ba4aabb75f4 100644
--- a/games-action/polymc/metadata.xml
+++ b/games-action/polymc/metadata.xml
@@ -25,5 +25,6 @@
<longdescription>PolyMC is a multi-instance Minecraft launcher focused on user freedom, redistributability, and simplicity.</longdescription>
<use>
<flag name="lto">Enable link-time optimization</flag>
+ <flag name="qt6">Build with Qt6 support instead of the default Qt5</flag>
</use>
</pkgmetadata>
diff --git a/games-action/polymc/polymc-9999.ebuild b/games-action/polymc/polymc-9999.ebuild
index 0f99fa720844..c9733e891936 100644
--- a/games-action/polymc/polymc-9999.ebuild
+++ b/games-action/polymc/polymc-9999.ebuild
@@ -39,30 +39,41 @@ LICENSE="Apache-2.0 BSD BSD-2 GPL-2+ GPL-3 ISC LGPL-2.1+ LGPL-3+ MIT"
SLOT="0"
-IUSE="debug lto test"
+IUSE="debug lto qt6 test"
REQUIRED_USE="
lto? ( !debug )
"
RESTRICT="!test? ( test )"
-MIN_QT="5.12.0"
-QT_SLOT=5
+MIN_QT_5_VERSION="5.12.0"
+MIN_QT_6_VERSION="6.0.0"
QT_DEPS="
- >=dev-qt/qtconcurrent-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qtcore-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qtgui-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qtnetwork-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qttest-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qtwidgets-${MIN_QT}:${QT_SLOT}
- >=dev-qt/qtxml-${MIN_QT}:${QT_SLOT}
+ !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/qtsvg-${MIN_QT_6_VERSION}:6
+ >=dev-qt/qt5compat-${MIN_QT_6_VERSION}:6
+ )
"
# Required at both build-time and run-time
COMMON_DEPENDS="
${QT_DEPS}
- >=dev-libs/quazip-1.3:=[qt5(+)]
+
+ !qt6? ( >=dev-libs/quazip-1.3:=[qt5(+)] )
+ qt6? ( >=dev-libs/quazip-1.3:=[qt6(-)] )
+
sys-libs/zlib
"
@@ -102,8 +113,7 @@ src_configure(){
-DCMAKE_INSTALL_PREFIX="/usr"
# Resulting binary is named polymc
-DLauncher_APP_BINARY_NAME="${PN}"
- # Force Qt5 to avoid accidentaly building the Qt6 version and breaking things
- -DLauncher_QT_VERSION_MAJOR=${QT_SLOT}
+ -DLauncher_QT_VERSION_MAJOR=$(usex qt6 6 5)
-DENABLE_LTO=$(usex lto)
-DBUILD_TESTING=$(usex test)