games-strategy/endless-sky: add 0.11.2

The unit tests require Catch2 v3, update the dependency.

Closes: https://bugs.gentoo.org/966538
Signed-off-by: Stefan Strogin <steils@gentoo.org>
This commit is contained in:
Stefan Strogin
2026-06-30 04:07:37 +03:00
parent 637988cefb
commit ea11a95ce8
2 changed files with 109 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST endless-sky-0.10.16.tar.gz 363292961 BLAKE2B cba02ad25a298a68852ebdac128476ce1fc4a0a18a65efc9c4230a7a785bd92ab5500550d120866caa105465809b6d841f45178d5803e84d6a57baa3226d60d5 SHA512 8dd8ee8bdb71ceda23024ac07502adab4f246ed3723fdc49d152de1796ba799c8584d31892f357034fa9c7d93c2880278f05cde9c0bd7e7e789eabb0513ba4ca
DIST endless-sky-0.11.2.tar.gz 364993591 BLAKE2B f738db6e50689cd9c2a50442c5676db7baa858639021296dbc81043053c34fbd58b0d5799b889052a61585b94d3bb07803580ec3c4992bc2d1eb03c5c5ba3771 SHA512 dd53b9f5253c46bb17720eba49c768ade0b794c4b9cab10a2e1011384b1dd73556d18ebd6512228eb62b25143f2db156ef7640afece384821036c4d88d2c25c0

View File

@@ -0,0 +1,108 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic xdg
DESCRIPTION="Space exploration, trading & combat in the tradition of Terminal Velocity"
HOMEPAGE="https://endless-sky.github.io/"
SRC_URI="
https://github.com/endless-sky/endless-sky/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
"
LICENSE="
GPL-3+
CC-BY-2.0 CC-BY-3.0 CC-BY-4.0
CC-BY-SA-3.0 CC-BY-SA-4.0
CC0-1.0 Unsplash public-domain
"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gles2-only test"
RESTRICT="!test? ( test )"
RDEPEND="
media-libs/flac:=[cxx]
media-libs/libavif:=
media-libs/libglvnd
media-libs/libjpeg-turbo:=
media-libs/libmad
media-libs/libpng:=
media-libs/libsdl2[video]
media-libs/openal
sys-apps/util-linux
virtual/minizip:=
gles2-only? ( media-libs/libsdl2[gles2] )
!gles2-only? (
media-libs/glew:0=
media-libs/libsdl2[opengl]
)
"
DEPEND="
${RDEPEND}
test? ( >=dev-cpp/catch-3:0 )
"
BDEPEND="virtual/pkgconfig"
src_prepare() {
cmake_src_prepare
# no /usr/*games/ on Gentoo, adjust docdir, install even if != Release,
# and GLEW is unused if USE=gles2-only (using sed for less rebasing)
sed -e '/install(/s: games: libexec:' \
-e '/install(/s: share/games: share:' \
-e "/install(/s: share/doc/endless-sky: share/doc/${PF}:" \
-e '/install(/s: CONFIGURATIONS Release::' \
-e 's:GLEW REQUIRED:GLEW:' \
-i CMakeLists.txt || die
# do not use sanitizers for tests
sed -i '/SANITIZER_OPTS/d' tests/CMakeLists.txt || die
# cmake creates build/compile_commands.json during configure
mkdir -p build || die
# source/Files.cpp has odd logic to find resources, make a wrapper
# rather than try to modify it
printf '#!/usr/bin/env sh\nexec %q --resources %q "$@"\n' \
"${EPREFIX}"/usr/libexec/${PN} \
"${EPREFIX}"/usr/share/${PN} > "${T}"/${PN} || die
}
src_configure() {
filter-lto # -Werror=odr issues
local mycmakeargs=(
-DBUILD_TESTING=$(usex test)
-DES_GLES=$(usex gles2-only)
-DES_USE_SYSTEM_LIBRARIES=yes
-DES_USE_VCPKG=no
)
cmake_src_configure
}
src_install() {
cmake_src_install
dobin "${T}"/${PN}
gzip -d -- "${ED}"/usr/share/man/man6/${PN}.6.gz || die
rm -- "${ED}"/usr/share/doc/${PF}/{copyright,license.txt} || die
}
pkg_postinst() {
xdg_pkg_postinst
elog "Endless Sky provides high-res sprites for high-dpi screens."
elog "If you want to use them, download:"
elog
elog " https://github.com/endless-sky/endless-sky-high-dpi/releases"
elog
elog "and extract it to ~/.local/share/endless-sky/plugins/"
elog
elog "If you are using the high-dpi plugin, you should download"
elog "and install the updated version that goes with this release."
}