games-arcade/supertux: add 0.7.0_beta1

There is one pretty gross bit here, which is the
SUPERTUX_{PACKAGE_VERSION,VERSION_STRING} variables here. This is
because the beta actually seems to have a little logic issue in the
git tag revision cmake, which essentially means that it fails during
an attempt to look for the .git folder (i'm serious). As a workaround,
we just hardcode the package version & version string to the our
PV. This is pretty much how it'd look in a real release anyway. It'll
certainly be fixed upstream obviously.

New use flags for opengl are here as well, as that's now optional
(always has been), and gtest was dropped because we just use ctest
now.

Signed-off-by: Swagtoy <me@ow.swag.toys>
Part-of: https://github.com/gentoo/gentoo/pull/45202
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Swagtoy
2025-12-30 04:15:07 -05:00
committed by Sam James
parent c9d36d8bb0
commit 7c1cf20c0b
2 changed files with 70 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST SuperTux-v0.6.3-Source.tar.gz 182065428 BLAKE2B c4acbe2c61306e6e462a375205b4e95af174c87dbc391f15211e1fac365ab51147d7a83d20a90e35f7d7a994c72b560631ddf1686fee2e1f937f97a711fb1003 SHA512 c6540bab1b3befbd975756031c4587e5569d9613d9539dc829c728b574d1a4da92816d6a7e68947b32963cc13d9b8b52312701c199138640e9f89e5885433798
DIST SuperTux-v0.7.0-beta.1-Source.tar.gz 289516602 BLAKE2B f47fb1614d9b27a20e335d7edccab7c147c247f17b18cba3af9be304f271c390ae0767688e217bc0223856621f5296498b38a8603b5d76dfae80f7f0e480d571 SHA512 589d7abd07e0e5dad48edafad5f8d7d55077f1872a31460956d7e633cc35168ffa3bd6c44dbb2c5e3d6a6ee354a8c4e97b312f8b728fddf8fbd9578ead62c73f

View File

@@ -0,0 +1,69 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CMAKE_QA_COMPAT_SKIP=1
inherit cmake xdg
DESCRIPTION="A run n' jump platforming game featuring Tux the penguin"
HOMEPAGE="https://www.supertux.org"
MY_PV="${PV/_rc/-rc.}"
MY_PV="${MY_PV/_beta/-beta.}"
MY_P="SuperTux-v${MY_PV}-Source"
SRC_URI="https://github.com/SuperTux/${PN}/releases/download/v${MY_PV}/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~x86"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-2+ GPL-3+ ZLIB MIT CC-BY-SA-2.0 CC-BY-SA-3.0"
SLOT="0"
IUSE="debug +opengl test"
RESTRICT="!test? ( test )"
# NOTE: curl is not a required dependency, but there is no compile option
# at the moment to turn it off. Should hopefully be in by beta.2/release.
RDEPEND="
>=dev-games/physfs-3.0
dev-libs/libfmt
media-libs/freetype
media-libs/libpng:0=
>=media-libs/libsdl2-2.0.1[joystick,video]
media-libs/libvorbis
media-libs/openal
>=media-libs/sdl2-ttf-2.0.15
>=media-libs/sdl2-image-2.0.0[png,jpeg]
>=net-misc/curl-7.21.7
opengl? (
media-libs/glew:=
virtual/opengl
)
"
DEPEND="${RDEPEND}
media-libs/glm"
BDEPEND="virtual/pkgconfig"
src_configure() {
local mycmakeargs=(
-DINSTALL_SUBDIR_BIN=bin
-DINSTALL_SUBDIR_DOC=share/doc/${PF}
-DINSTALL_SUBDIR_SHARE=share/${PN}2
-DENABLE_SQDBG="$(usex debug)"
# SuperTux uses its own modified (simple)squirrel fork anyway, so it's
# unlikely that anyone will link with it. It's also prone to a conflict
# if one were to bundle simplesquirrel separately (libsimplesquirrel.so)
-DUSE_STATIC_SIMPLESQUIRREL=ON
-DUSE_SYSTEM_SDL2_TTF=ON
-DIS_SUPERTUX_RELEASE=ON
-DENABLE_OPENGL="$(usex opengl)"
-DBUILD_TESTING="$(usex test)"
# CMake croaks due to missing .git on the beta sources (yes), so
# just manually set the version, as it would do otherwise anyway
# from the git tag.
-DSUPERTUX_PACKAGE_VERSION="v${MY_PV}"
-DSUPERTUX_VERSION_STRING="v${MY_PV}"
)
cmake_src_configure
}