File endless-sky-fix-data-path.patch of Package endless-sky
diff -Nur endless-sky-0.9.16.1-orig/endless-sky.6 endless-sky-0.9.16.1/endless-sky.6
--- endless-sky-0.9.16.1-orig/endless-sky.6 2022-10-18 21:33:02.000000000 +0200
+++ endless-sky-0.9.16.1/endless-sky.6 2023-04-15 15:39:07.226563739 +0200
@@ -17,7 +17,7 @@
For a manual and other information, visit https://endless\-sky.github.io
-When run from the command line, if a resource directory is not specified, the program will check to see if the current directory contains directories named "data" and "images" and files named "keys.txt" and "credits.txt"; if so it will read resources from the current directory. Otherwise it will use /usr/local/share/games/endless\-sky if it exists, or /usr/share/games/endless\-sky/ otherwise.
+When run from the command line, if a resource directory is not specified, the program will check to see if the current directory contains directories named "data" and "images" and files named "keys.txt" and "credits.txt"; if so it will read resources from the current directory. Otherwise it will use /usr/local/share/endless\-sky if it exists, or /usr/share/endless\-sky/ otherwise.
.SH OPTIONS
.IP \fB\-h,\ \-\-help
diff -Nur endless-sky-0.9.16.1-orig/SConstruct endless-sky-0.9.16.1/SConstruct
--- endless-sky-0.9.16.1-orig/SConstruct 2022-10-18 21:33:02.000000000 +0200
+++ endless-sky-0.9.16.1/SConstruct 2023-04-15 15:40:29.318973502 +0200
@@ -232,11 +232,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")
diff -Nur endless-sky-0.9.16.1-orig/source/Files.cpp endless-sky-0.9.16.1/source/Files.cpp
--- endless-sky-0.9.16.1-orig/source/Files.cpp 2022-10-18 21:33:02.000000000 +0200
+++ endless-sky-0.9.16.1/source/Files.cpp 2023-04-15 15:41:49.083327214 +0200
@@ -101,7 +101,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 -Nur endless-sky-0.9.16.1-orig/source/News.h endless-sky-0.9.16.1/source/News.h
--- endless-sky-0.9.16.1-orig/source/News.h 2022-10-18 21:33:02.000000000 +0200
+++ endless-sky-0.9.16.1/source/News.h 2023-04-15 15:59:23.268524113 +0200
@@ -21,6 +21,7 @@
#include "Phrase.h"
#include <string>
+#include <cstdint>
#include <vector>
class DataNode;