aboutsummaryrefslogtreecommitdiff
path: root/games-action/fnordlauncher/fnordlauncher-10.0.5.2.ebuild
blob: a47cf4c12a0029cc643d2942689307b351e101e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#
# ~~~ games-action/fnordlauncher
#
# ~~~ fork of prismlauncher with alternative authentication
# ~~~ based on the prismlauncher ebuild
#

#
# ~~~ metadata

# portage info
EAPI=8
SLOT=0

KEYWORDS="amd64"
IUSE="test"
RESTRICT="!test? ( test )"

# info
HOMEPAGE="https://github.com/fnordmc/fnordlauncher/"
DESCRIPTION="Fork of Prism Launcher with alternative authentication support"
LICENSE="GPL-3"

# package data
SRC_URI="https://github.com/fnordmc/fnordlauncher/releases/download/${PV}/fnordlauncher-${PV}.tar.gz"
S="${WORKDIR}/FnordLauncher-${PV}"

#
# ~~~ dependencies

# qt setup
QTMIN=6.0.0
inherit cmake java-pkg-2 optfeature toolchain-funcs xdg

# dependencies
COMMON_DEPEND="
               app-arch/libarchive
               app-text/cmark
               dev-cpp/tomlplusplus
               >=dev-qt/qtbase-${QTMIN}:6[concurrent,gui,network,opengl,widgets,xml(+)]
               >=dev-qt/qtnetworkauth-${QTMIN}:6
               games-util/gamemode
               media-gfx/qrencode
               virtual/zlib
"

DEPEND="
        ${COMMON_DEPEND}
        media-libs/libglvnd
        <virtual/jdk-26
"

BDEPEND="
         app-text/scdoc
         >=kde-frameworks/extra-cmake-modules-6.0.0
         virtual/pkgconfig
"

# run-time dependencies
RDEPEND="
         ${COMMON_DEPEND}
         >=dev-qt/qtsvg-${QTMIN}:6
         >=virtual/jre-1.8.0
         virtual/opengl
"

#
# ~~~ steps

# prepare
src_prepare() {
    cmake_src_prepare
}

# configure
src_configure() {
    local mycmakeargs=(
        -DCMAKE_INSTALL_PREFIX="/usr"
        -DLauncher_APP_BINARY_NAME="${PN}"
        -DLauncher_BUILD_PLATFORM="Gentoo"
        -DLauncher_QT_VERSION_MAJOR=6
        -DENABLE_LTO=$(tc-is-lto)
        -DBUILD_TESTING=$(usex test)
	)

	cmake_src_configure
}

# compile
src_compile() {
    cmake_src_compile
}

# install
pkg_postinst() {
    xdg_pkg_postinst

    optfeature "old Minecraft (<= 1.12.2) support" x11-apps/xrandr
    optfeature "built-in MangoHud support (available in GURU overlay)" games-util/mangohud
    optfeature "built-in Feral Gamemode support" games-util/gamemode
}