commit:     72aa2845bba14a3291d5c73d178278a448e11d7f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  6 23:06:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  6 23:06:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72aa2845

games-strategy/endless-sky: initial import (restore at 0.9.14)

Closes: https://bugs.gentoo.org/735542
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/endless-sky/Manifest                |  1 +
 .../endless-sky/endless-sky-0.9.14.ebuild          | 59 ++++++++++++++++++++++
 .../files/endless-sky-0.9.14-no-games-path.patch   | 42 +++++++++++++++
 .../files/endless-sky-0.9.14-respect-cflags.patch  | 20 ++++++++
 games-strategy/endless-sky/metadata.xml            | 16 ++++++
 5 files changed, 138 insertions(+)

diff --git a/games-strategy/endless-sky/Manifest 
b/games-strategy/endless-sky/Manifest
new file mode 100644
index 000000000000..75a855912828
--- /dev/null
+++ b/games-strategy/endless-sky/Manifest
@@ -0,0 +1 @@
+DIST endless-sky-0.9.14.tar.gz 124358153 BLAKE2B 
5845c3b595f0feba7fc5f6ce1ead88b34e9426c3db53cf013fc67f9197d2cabad8fae39056fa6f4d6da76fceb43a9709397b95daba855d1b1ebf3c25a04ba007
 SHA512 
861fddc8e2f167d335247f3ce1efb59bb4a5951cb0aa5e4a10517fded096db7e69ac17cf0e813f2a1ec040bef57c5d6b6e8e90d952debc9b2caa38d1fb91abe5

diff --git a/games-strategy/endless-sky/endless-sky-0.9.14.ebuild 
b/games-strategy/endless-sky/endless-sky-0.9.14.ebuild
new file mode 100644
index 000000000000..f0f7509aa8a8
--- /dev/null
+++ b/games-strategy/endless-sky/endless-sky-0.9.14.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+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"
+
+# Needs work; doesn't link against SDL 2
+RESTRICT="test"
+
+RDEPEND="media-libs/glew:0=
+       media-libs/libsdl2
+       media-libs/libjpeg-turbo:=
+       media-libs/libmad
+       media-libs/libpng:=
+       media-libs/openal
+       virtual/opengl"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.9.14-respect-cflags.patch
+       "${FILESDIR}"/${PN}-0.9.14-no-games-path.patch
+)
+
+src_compile() {
+       tc-export CXX
+
+       escons
+}
+
+src_test() {
+       escons test
+}
+
+src_install() {
+       escons PREFIX="${ED}"/usr/ 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.14-no-games-path.patch 
b/games-strategy/endless-sky/files/endless-sky-0.9.14-no-games-path.patch
new file mode 100644
index 000000000000..bdec820de1e1
--- /dev/null
+++ b/games-strategy/endless-sky/files/endless-sky-0.9.14-no-games-path.patch
@@ -0,0 +1,42 @@
+https://src.fedoraproject.org/rpms/endless-sky/raw/rawhide/f/endless-sky-0.9.13-remove-games-path.patch
+--- a/SConstruct
++++ b/SConstruct
+@@ -191,11 +191,11 @@
+                       RecursiveInstall(env, pathjoin(target, name), 
node.abspath)
+               else:
+                       env.Install(target, node)
+-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/data", "data")
+-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/images", 
"images")
+-RecursiveInstall(env, "$DESTDIR$PREFIX/share/games/endless-sky/sounds", 
"sounds")
+-env.Install("$DESTDIR$PREFIX/share/games/endless-sky", "credits.txt")
+-env.Install("$DESTDIR$PREFIX/share/games/endless-sky", "keys.txt")
++RecursiveInstall(env, "$DESTDIR$PREFIX/share/endless-sky/data", "data")
++RecursiveInstall(env, "$DESTDIR$PREFIX/share/endless-sky/images", "images")
++RecursiveInstall(env, "$DESTDIR$PREFIX/share/endless-sky/sounds", "sounds")
++env.Install("$DESTDIR$PREFIX/share/endless-sky", "credits.txt")
++env.Install("$DESTDIR$PREFIX/share/endless-sky", "keys.txt")
+ 
+ # Make the word "install" in the command line do an installation.
+ env.Alias("install", "$DESTDIR$PREFIX")
+--- a/SConstruct
++++ b/SConstruct
+@@ -142,7 +142,7 @@
+ 
+ 
+ # Install the binary:
+-env.Install("$DESTDIR$PREFIX/games", sky)
++env.Install("$DESTDIR$PREFIX/bin", sky)
+ 
+ # Install the desktop file:
+ env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop")
+--- a/source/Files.cpp
++++ b/source/Files.cpp
+@@ -119,7 +119,7 @@
+       // the executable, but are under the same prefix (/usr or /usr/local).
+       static const string LOCAL_PATH = "/usr/local/";
+       static const string STANDARD_PATH = "/usr/";
+-      static const string RESOURCE_PATH = "share/games/endless-sky/";
++      static const string RESOURCE_PATH = "share/endless-sky/";
+       if(!resources.compare(0, LOCAL_PATH.length(), LOCAL_PATH))
+               resources = LOCAL_PATH + RESOURCE_PATH;
+       else if(!resources.compare(0, STANDARD_PATH.length(), STANDARD_PATH))

diff --git 
a/games-strategy/endless-sky/files/endless-sky-0.9.14-respect-cflags.patch 
b/games-strategy/endless-sky/files/endless-sky-0.9.14-respect-cflags.patch
new file mode 100644
index 000000000000..8bea82409af0
--- /dev/null
+++ b/games-strategy/endless-sky/files/endless-sky-0.9.14-respect-cflags.patch
@@ -0,0 +1,20 @@
+https://src.fedoraproject.org/rpms/endless-sky/raw/rawhide/f/endless-sky-0.9.14-remove-additional-ccflags.patch
+--- a/SConstruct
++++ b/SConstruct
+@@ -46,15 +46,7 @@
+ #   $ CXXFLAGS=-msse3 scons
+ #   $ CXXFLAGS=-march=native scons
+ # or modify the `flags` variable:
+-flags = ["-std=c++11", "-Wall", "-Werror", "-Wold-style-cast"]
+-if env["mode"] != "debug":
+-      flags += ["-O3", "-flto"]
+-      env.Append(LINKFLAGS = ["-O3", "-flto"])
+-if env["mode"] == "debug":
+-      flags += ["-g"]
+-elif env["mode"] == "profile":
+-      flags += ["-pg"]
+-      env.Append(LINKFLAGS = ["-pg"])
++flags = ["-std=c++11"]
+ env.Append(CCFLAGS = flags)
+ 
+ # Always use `ar` to create the symbol table, and don't use ranlib at all, 
since it fails to preserve

diff --git a/games-strategy/endless-sky/metadata.xml 
b/games-strategy/endless-sky/metadata.xml
new file mode 100644
index 000000000000..6f9e5ee62db4
--- /dev/null
+++ b/games-strategy/endless-sky/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="project">
+               <email>ga...@gentoo.org</email>
+               <name>Gentoo Games</name>
+       </maintainer>
+       <longdescription>
+               Explore other star systems. Earn money by trading, carrying 
passengers, or completing missions.
+               Use your earnings to buy a better ship or to upgrade the 
weapons and engines on your current one. Blow up pirates.
+               Take sides in a civil war. Or leave human space behind and hope 
to find some friendly aliens whose culture is more civilized than your own...
+       </longdescription>
+       <upstream>
+               <remote-id type="github">endless-sky/endless-sky</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to