summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-02-16 01:55:21 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-02-16 02:29:40 -0500
commit02c104a6e2e2b9c2f7702b16c304bdb0a967e489 (patch)
tree15d94bf07f7186f2798fb3695b45dcfc090877de /games-strategy/endless-sky
parentgames-puzzle/pingus: update upstream metadata with gitlab (diff)
downloadgentoo-02c104a6e2e2b9c2f7702b16c304bdb0a967e489.tar.gz
gentoo-02c104a6e2e2b9c2f7702b16c304bdb0a967e489.tar.bz2
gentoo-02c104a6e2e2b9c2f7702b16c304bdb0a967e489.zip
games-strategy/endless-sky: add 0.9.16.1, enable py3.11
- re-enable tests, seem to work in this version - add IUSE=gles2-only and tighten sdl2+GL deps - revert to bundled dev-cpp/catch (it's newer/suitable at 2.13.9, and using system's without pinning would require migration to v3 which further needs -std=c++14 -- left note to unbundle later) Closes: https://bugs.gentoo.org/830718 Closes: https://bugs.gentoo.org/887483 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-strategy/endless-sky')
-rw-r--r--games-strategy/endless-sky/Manifest1
-rw-r--r--games-strategy/endless-sky/endless-sky-0.9.16.1.ebuild72
-rw-r--r--games-strategy/endless-sky/files/endless-sky-0.9.16.1-respect-cflags.patch13
3 files changed, 86 insertions, 0 deletions
diff --git a/games-strategy/endless-sky/Manifest b/games-strategy/endless-sky/Manifest
index 75a855912828..3c3a337e0421 100644
--- a/games-strategy/endless-sky/Manifest
+++ b/games-strategy/endless-sky/Manifest
@@ -1 +1,2 @@
DIST endless-sky-0.9.14.tar.gz 124358153 BLAKE2B 5845c3b595f0feba7fc5f6ce1ead88b34e9426c3db53cf013fc67f9197d2cabad8fae39056fa6f4d6da76fceb43a9709397b95daba855d1b1ebf3c25a04ba007 SHA512 861fddc8e2f167d335247f3ce1efb59bb4a5951cb0aa5e4a10517fded096db7e69ac17cf0e813f2a1ec040bef57c5d6b6e8e90d952debc9b2caa38d1fb91abe5
+DIST endless-sky-0.9.16.1.tar.gz 184582283 BLAKE2B 3c35df96b54546811713b123bf43993df6ba5271988decd7408722263c2edd904c84888db61c2d22554b3f60edebd25db7913e7784f309ff936d37c815bc6650 SHA512 83e0a47160506b1e3608f67534e2dbcf51515d809016efc379448d14331229ffe26360f82cc60c565c84b10c605aec846efc19bcd4af10ee116e5ef8fc804d56
diff --git a/games-strategy/endless-sky/endless-sky-0.9.16.1.ebuild b/games-strategy/endless-sky/endless-sky-0.9.16.1.ebuild
new file mode 100644
index 000000000000..c07e76bb4888
--- /dev/null
+++ b/games-strategy/endless-sky/endless-sky-0.9.16.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit python-any-r1 scons-utils toolchain-funcs 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/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-BY-SA-4.0 CC-BY-SA-3.0 GPL-3+ public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gles2-only"
+
+RDEPEND="
+ media-libs/libjpeg-turbo:=
+ media-libs/libmad
+ media-libs/libpng:=
+ media-libs/openal
+ sys-apps/util-linux
+ gles2-only? (
+ media-libs/libglvnd
+ media-libs/libsdl2[gles2,video]
+ )
+ !gles2-only? (
+ media-libs/glew:0=
+ media-libs/libglvnd[X]
+ media-libs/libsdl2[opengl,video]
+ )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.14-no-games-path.patch
+ "${FILESDIR}"/${PN}-0.9.14-dont-compress-man-page.patch
+ "${FILESDIR}"/${PN}-0.9.16.1-respect-cflags.patch
+)
+
+src_compile() {
+ tc-export AR CXX
+
+ MYSCONSARGS=(
+ PREFIX="${EPREFIX}"/usr
+ opengl=$(usex gles2-only gles desktop)
+ )
+
+ escons "${MYSCONSARGS[@]}"
+}
+
+src_test() {
+ # TODO: unbundle dev-cpp/catch if upstream migrates to catch v3
+ escons "${MYSCONSARGS[@]}" test
+}
+
+src_install() {
+ escons "${MYSCONSARGS[@]}" DESTDIR="${D}" install
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ einfo "Endless Sky provides high-res sprites for high-dpi screens."
+ einfo "If you want to use them, download"
+ einfo
+ einfo " https://github.com/endless-sky/endless-sky-high-dpi/releases"
+ einfo
+ einfo "and extract it to ~/.local/share/endless-sky/plugins/."
+ einfo
+ einfo "Enjoy."
+}
diff --git a/games-strategy/endless-sky/files/endless-sky-0.9.16.1-respect-cflags.patch b/games-strategy/endless-sky/files/endless-sky-0.9.16.1-respect-cflags.patch
new file mode 100644
index 000000000000..6790f7de647f
--- /dev/null
+++ b/games-strategy/endless-sky/files/endless-sky-0.9.16.1-respect-cflags.patch
@@ -0,0 +1,13 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -53,10 +53,2 @@
+ flags = ["-std=c++11", "-Wall", "-Wold-style-cast", "-fno-rtti"]
+-if env["mode"] != "debug":
+- flags += ["-Werror", "-O3", "-flto"]
+- env.Append(LINKFLAGS = ["-O3", "-flto"])
+-if env["mode"] == "debug":
+- flags += ["-g"]
+-elif env["mode"] == "profile":
+- flags += ["-pg"]
+- env.Append(LINKFLAGS = ["-pg"])
+ env.Append(CCFLAGS = flags)