add mcpelauncher-linux-1.1.2 and mcpelauncher-ui-qt-1.1.2

This commit is contained in:
Gered 2024-12-29 18:01:14 -05:00
parent 340d8913bd
commit e3d311801c
2 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,73 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit git-r3 cmake toolchain-funcs flag-o-matic
DESCRIPTION="Minecraft Bedrock Launcher for Linux (unofficial)"
HOMEPAGE="https://github.com/minecraft-linux/mcpelauncher-manifest"
SRC_URI="https://github.com/nlohmann/json/releases/download/v3.7.3/include.zip -> nlohmann_json-3.7.3.zip"
EGIT_COMMIT="v${PV}-qt6"
EGIT_REPO_URI="https://github.com/minecraft-linux/mcpelauncher-manifest.git"
LICENSE="MIT GPL-3"
SLOT="0"
KEYWORDS=""
DEPEND="
net-misc/curl
sys-libs/zlib
media-libs/libpng
dev-libs/libevdev
x11-libs/libXi
dev-qt/qtwebengine:6
dev-qt/qtdeclarative:6
dev-qt/qtbase:6
dev-libs/libuv
llvm-core/clang:*
llvm-core/llvm:*"
RDEPEND="${DEPEND}
games-util/mcpelauncher-ui-qt
"
BDEPEND="app-arch/unzip"
# Prevent downloading nlohmann_json sources
PATCHES="
${FILESDIR}/system-nlohmann_json.patch
"
src_unpack() {
unpack "${DISTDIR}/nlohmann_json-3.7.3.zip"
git-r3_src_unpack
}
src_configure() {
# Force clang (pulled from www-client/firefox)
# Some of the code comes from Android which doesn't like GCC
elog "Forcing clang"
AR=llvm-ar
CC=${CHOST}-clang
CXX=${CHOST}-clang++
NM=llvm-nm
RANLIB=llvm-ranlib
strip-unsupported-flags
append-flags "-D_FORTIFY_SOURCE=0"
# Ensure we use correct toolchain
export HOST_CC="$(tc-getBUILD_CC)"
export HOST_CXX="$(tc-getBUILD_CXX)"
tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
local mycmakeargs=(
-DUSE_OWN_CURL=OFF # own curl builds broken due to wrong url currently. skip it!
-DBUILD_SHARED_LIBS=OFF
-DUSE_EXTERNAL_JSON=YES # Workaround for nlohmann_json
-DJSON_SOURCES="${WORKDIR}" # Workaround for nlohmann_json
-DJNI_USE_JNIVM=ON
-Wno-dev
)
cmake_src_configure
}

View file

@ -0,0 +1,50 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit git-r3 cmake flag-o-matic
DESCRIPTION="mcpelauncher-linux UI"
HOMEPAGE="https://github.com/minecraft-linux/mcpelauncher-ui-manifest"
EGIT_COMMIT="v${PV}-qt6"
EGIT_REPO_URI="https://github.com/minecraft-linux/mcpelauncher-ui-manifest.git"
RESTRICT="network-sandbox"
LICENSE="MIT GPL-3"
SLOT="0"
KEYWORDS=""
DEPEND="
dev-qt/qtbase:6
dev-qt/qtwebengine:6
dev-qt/qtdeclarative:6
dev-qt/qtsvg:6
dev-libs/libzip
dev-libs/protobuf"
RDEPEND="${DEPEND}"
BDEPEND=""
PATCHES="
${FILESDIR}/0001-cmake-Fix-compatibility-with-newer-protobuf-versions.patch
"
src_configure() {
# Doesn't like LTO
filter-flags -flto*
local mycmakeargs=(
-DBUILD_SHARED_LIBS=OFF
-DLAUNCHER_ENABLE_GLFW=OFF # 2023-08-28: just temporarily to deal with broken glfw source download during build
)
cmake_src_configure
}
pkg_postinst() {
xdg_desktop_database_update
}
pkg_postrm() {
xdg_desktop_database_update
}