we're so back

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2024-04-30 21:10:49 -04:00
commit f3482852da
No known key found for this signature in database
GPG Key ID: A5A7629F109C8FD1
8 changed files with 317 additions and 0 deletions

26
README.md Normal file
View File

@ -0,0 +1,26 @@
# polymc overlay
ebuilds for the official PolyMC Gentoo overlay.
# Adding the Repository
```bash
# add the repo to repos.conf
cat << EOF > /etc/portage/repos.conf/polymc.conf
[swirl]
location = /var/db/repos/polymc
sync-type = git
sync-uri = https://git.swurl.xyz/PolyMC/overlay
EOF
```
## Syncing
```bash
emaint sync --repo polymc
```
# Notes
If you want development versions of packages, simply unmask version `9999` of the packages you want:
```bash
# echo "=category/package-9999 **" >> /etc/portage/package.accept_keywords
```

View File

@ -0,0 +1,4 @@
DIST polymc-6.1.tar.gz 13297841 BLAKE2B 9903d7a649191d62eacd2bf02f127e90f359edd7c416908a788893a3307722a629cf2f07f708bf7eefdf8e314069e69c0a5610917a23265b595d5b9673e38cb7 SHA512 aafc115cc36226166e123dc48244733b657542537c8f4f8503b1d8d96a8a957691ff168c1cfb4e80b3a1649d26c97bd6aeab84753f851d09489743e873895c56
EBUILD polymc-6.1.ebuild 3012 BLAKE2B a363fdb5ff697a2fb4bd0578aeafba82d972bbbf6b2be7e1e24fbb96c5ea95ecf297fd728da47214b2519da3c81984a9c94e9c567af93811df5f966976735d8f SHA512 d00fada36d1923dac768b5d059376d29f2be7c0d87174ef82efbf16978de61490f15a34d3f03431cbde35431161e3aa385bf2a757cd8266dd90377c0d738485e
EBUILD polymc-9999.ebuild 3012 BLAKE2B a363fdb5ff697a2fb4bd0578aeafba82d972bbbf6b2be7e1e24fbb96c5ea95ecf297fd728da47214b2519da3c81984a9c94e9c567af93811df5f966976735d8f SHA512 d00fada36d1923dac768b5d059376d29f2be7c0d87174ef82efbf16978de61490f15a34d3f03431cbde35431161e3aa385bf2a757cd8266dd90377c0d738485e
MISC metadata.xml 425 BLAKE2B 414e39761923f41a23008759d8d124bc1f0e6a221f6e3b36ecaf552d0dbc8a1632ab4725f67a54399bdbf83e087a8ecc656234257c06f92a52e08dbea1daa48b SHA512 acb9391fb45b6d7341ee407222974f895905f22d219dfbfca86f4e91374e6b230c0a9d2ec4f4213df9fdf2df900ee59447c34173f5de7bbede2a50f730794c50

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
<pkgmetadata>
<maintainer type="person">
<email>swurl@swurl.xyz</email>
<name>swirl</name>
</maintainer>
<longdescription>An Open Source Minecraft launcher with the ability to manage multiple instances, accounts and mods. Focused on user freedom and free redistributability.</longdescription>
</pkgmetadata>

View File

@ -0,0 +1,136 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake java-pkg-2 optfeature xdg
HOMEPAGE="https://polymc.org/ https://github.com/PolyMC/PolyMC"
DESCRIPTION="A custom, open source Minecraft launcher"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="
https://github.com/PolyMC/PolyMC
"
EGIT_SUBMODULES=( 'depends/libnbtplusplus' )
else
MY_PN="PolyMC"
# Let's use the vendored tarball to avoid dealing with the submodules directly
SRC_URI="
https://github.com/PolyMC/PolyMC/releases/download/${PV}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz
"
# The PolyMC's files are unpacked to ${WORKDIR}/PolyMC-${PV}
S="${WORKDIR}/${MY_PN}-${PV}"
KEYWORDS="~amd64"
fi
# Apache-2.0 for MultiMC (PolyMC is forked from it)
# GPL-3 for PolyMC
# LGPL-3+ for libnbtplusplus
# See the rest of PolyMC's libraries at https://github.com/PolyMC/PolyMC/tree/develop/libraries
LICENSE="Apache-2.0 BSD BSD-2 GPL-2+ GPL-3 ISC LGPL-2.1+ LGPL-3+ MIT"
SLOT="0"
IUSE="debug lto test"
REQUIRED_USE="
lto? ( !debug )
"
RESTRICT="!test? ( test )"
MIN_QT="5.12.0"
QT_SLOT=5
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}
>=dev-qt/qtcharts-${MIN_QT}:${QT_SLOT}
"
# Required at both build-time and run-time
COMMON_DEPENDS="
${QT_DEPS}
>=dev-libs/quazip-1.3:=[qt5(+)]
sys-libs/zlib
"
BDEPEND="
app-text/scdoc
kde-frameworks/extra-cmake-modules
"
DEPEND="
${COMMON_DEPENDS}
media-libs/libglvnd
>=virtual/jdk-1.8.0:*
"
# At run-time we don't depend on JDK, only JRE
# And we need more than just the GL headers
RDEPEND="
${COMMON_DEPENDS}
>=dev-qt/qtsvg-${MIN_QT}:${QT_SLOT}
>=virtual/jre-1.8.0:*
virtual/opengl
"
PATCHES=(
"${FILESDIR}"/${PN}-1.4.1-include_QDebug.patch
)
src_prepare() {
cmake_src_prepare
# Prevent conflicting with the user's flags
# See https://bugs.gentoo.org/848765 for more info
sed -i -e 's/-Werror//' -e 's/-D_FORTIFY_SOURCE=2//' CMakeLists.txt || die 'Failed to remove -Werror and -D_FORTIFY_SOURCE via sed'
}
src_configure(){
local mycmakeargs=(
-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}
-DENABLE_LTO=$(usex lto)
-DBUILD_TESTING=$(usex test)
)
if use debug; then
CMAKE_BUILD_TYPE=Debug
else
CMAKE_BUILD_TYPE=Release
fi
cmake_src_configure
}
src_compile(){
cmake_src_compile
}
pkg_postinst() {
xdg_pkg_postinst
# https://github.com/PolyMC/PolyMC/issues/227
optfeature "old Minecraft (<= 1.12.2) support" x11-apps/xrandr
optfeature "built-in MangoHud support" games-util/mangohud
optfeature "built-in Feral Gamemode support" games-util/gamemode
}

View File

@ -0,0 +1,136 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake java-pkg-2 optfeature xdg
HOMEPAGE="https://polymc.org/ https://github.com/PolyMC/PolyMC"
DESCRIPTION="A custom, open source Minecraft launcher"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="
https://github.com/PolyMC/PolyMC
"
EGIT_SUBMODULES=( 'depends/libnbtplusplus' )
else
MY_PN="PolyMC"
# Let's use the vendored tarball to avoid dealing with the submodules directly
SRC_URI="
https://github.com/PolyMC/PolyMC/releases/download/${PV}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz
"
# The PolyMC's files are unpacked to ${WORKDIR}/PolyMC-${PV}
S="${WORKDIR}/${MY_PN}-${PV}"
KEYWORDS="~amd64"
fi
# Apache-2.0 for MultiMC (PolyMC is forked from it)
# GPL-3 for PolyMC
# LGPL-3+ for libnbtplusplus
# See the rest of PolyMC's libraries at https://github.com/PolyMC/PolyMC/tree/develop/libraries
LICENSE="Apache-2.0 BSD BSD-2 GPL-2+ GPL-3 ISC LGPL-2.1+ LGPL-3+ MIT"
SLOT="0"
IUSE="debug lto test"
REQUIRED_USE="
lto? ( !debug )
"
RESTRICT="!test? ( test )"
MIN_QT="5.12.0"
QT_SLOT=5
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}
>=dev-qt/qtcharts-${MIN_QT}:${QT_SLOT}
"
# Required at both build-time and run-time
COMMON_DEPENDS="
${QT_DEPS}
>=dev-libs/quazip-1.3:=[qt5(+)]
sys-libs/zlib
"
BDEPEND="
app-text/scdoc
kde-frameworks/extra-cmake-modules
"
DEPEND="
${COMMON_DEPENDS}
media-libs/libglvnd
>=virtual/jdk-1.8.0:*
"
# At run-time we don't depend on JDK, only JRE
# And we need more than just the GL headers
RDEPEND="
${COMMON_DEPENDS}
>=dev-qt/qtsvg-${MIN_QT}:${QT_SLOT}
>=virtual/jre-1.8.0:*
virtual/opengl
"
PATCHES=(
"${FILESDIR}"/${PN}-1.4.1-include_QDebug.patch
)
src_prepare() {
cmake_src_prepare
# Prevent conflicting with the user's flags
# See https://bugs.gentoo.org/848765 for more info
sed -i -e 's/-Werror//' -e 's/-D_FORTIFY_SOURCE=2//' CMakeLists.txt || die 'Failed to remove -Werror and -D_FORTIFY_SOURCE via sed'
}
src_configure(){
local mycmakeargs=(
-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}
-DENABLE_LTO=$(usex lto)
-DBUILD_TESTING=$(usex test)
)
if use debug; then
CMAKE_BUILD_TYPE=Debug
else
CMAKE_BUILD_TYPE=Release
fi
cmake_src_configure
}
src_compile(){
cmake_src_compile
}
pkg_postinst() {
xdg_pkg_postinst
# https://github.com/PolyMC/PolyMC/issues/227
optfeature "old Minecraft (<= 1.12.2) support" x11-apps/xrandr
optfeature "built-in MangoHud support" games-util/mangohud
optfeature "built-in Feral Gamemode support" games-util/gamemode
}

2
manifests.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
find -name "*.ebuild" -exec ebuild {} manifest \;

3
metadata/layout.conf Normal file
View File

@ -0,0 +1,3 @@
repo-name = polymc
masters = gentoo
sign-commits = true

1
profiles/repo_name Normal file
View File

@ -0,0 +1 @@
polymc