[opentyrian] 01/02: add old GDP patch
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sat Mar 4 19:55:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository opentyrian.
commit 2cc9d5c6e7a7219753653c22efde9d1db2a62437
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Mar 4 20:46:55 2017 +0100
add old GDP patch
---
debian/patches/gdp.patch | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 54 insertions(+)
diff --git a/debian/patches/gdp.patch b/debian/patches/gdp.patch
new file mode 100644
index 0000000..83fc7de
--- /dev/null
+++ b/debian/patches/gdp.patch
@@ -0,0 +1,53 @@
+diff -r 12c763dc1ca0 src/varz.c
+--- a/src/varz.c Sun Apr 05 11:29:52 2015 +0200
++++ b/src/varz.c Sun Apr 05 13:03:59 2015 +0200
+@@ -16,6 +16,10 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
++#ifdef TARGET_UNIX
++#include <unistd.h>
++#endif
++
+ #include "config.h"
+ #include "editship.h"
+ #include "episodes.h"
+@@ -498,6 +502,38 @@
+ }
+
+ SDL_Quit();
++
++#ifdef TARGET_UNIX
++#define MISSING_TEXT "One or more of the required Tyrian " TYRIAN_VERSION " data files could not be found.\n" \
++ "These can be installed using game-data-packager.\n"
++ if (code == 1)
++ {
++ char* argv[6];
++ pid_t child_pid;
++ child_pid = fork();
++ if(child_pid == 0) {
++ argv[0] = "zenity";
++ argv[1] = "--error";
++ argv[2] = "--text=" MISSING_TEXT;
++ argv[3] = "--title=Tyrian";
++ argv[4] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "kdialog";
++ argv[2] = MISSING_TEXT;
++ execvp(argv[0], argv);
++ argv[0] = "xmessage";
++ argv[1] = "-center";
++ argv[3] = NULL;
++ execvp(argv[0], argv);
++ argv[0] = "notify-send";
++ argv[1] = "Tyrian";
++ argv[3] = "-i";
++ argv[4] = "dialog-error";
++ argv[5] = NULL;
++ execvp(argv[0], argv);
++ }
++ }
++#endif
+ exit(code);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index b178c2d..f1fb140 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ data_dir.patch
uninitialized-vars.patch
cppflags.patch
check-return-values.patch
+gdp.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/opentyrian.git
More information about the Pkg-games-commits
mailing list