[trigger-rally] 03/04: Add patches suggested by Marc
Gianfranco Costamagna
locutusofborg at moszumanska.debian.org
Wed Sep 7 15:08:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
locutusofborg pushed a commit to branch master
in repository trigger-rally.
commit 033f8145b80268b7cb39a660293cf185e3fd956f
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Wed Sep 7 17:07:12 2016 +0200
Add patches suggested by Marc
---
debian/patches/811-flags.patch | 37 ++++++++++++++++++++++++++++++++++++
debian/patches/813-config-path.patch | 24 +++++++++++++++++++++++
debian/patches/fix_cfgdefaults.patch | 15 ---------------
debian/patches/series | 3 ++-
4 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/debian/patches/811-flags.patch b/debian/patches/811-flags.patch
new file mode 100644
index 0000000..755c7e5
--- /dev/null
+++ b/debian/patches/811-flags.patch
@@ -0,0 +1,37 @@
+Description: fix *FLAGS overrides
+Origin: upstream, commit 811
+--- a/src/GNUmakefile
++++ b/src/GNUmakefile
+@@ -23,10 +23,11 @@
+ WARNINGS ?= -Wall -Wextra -pedantic
+ OPTIMS ?= -march=native -mtune=native -Ofast
+ DMACROS := -DNDEBUG -DUNIX -DPACKAGE_VERSION=\"$(DISTVER)\"
+-INCDIRS := -I"./include"
+-CXXFLAGS := -std=c++11 $(WARNINGS) $(OPTIMS) $(DMACROS) $(INCDIRS)
++INCDIRS := -I'./include'
++CXXFLAGS += -std=c++11 $(WARNINGS) $(OPTIMS)
++CPPFLAGS += $(DMACROS) $(INCDIRS)
+ EXTRA_LIBS := -lGL -lGLU -lGLEW -lSDL -lSDL_image -lphysfs -lopenal -lalut -lpthread -ltinyxml
+-LDFLAGS := $(EXTRA_LIBS)
++LDFLAGS += $(EXTRA_LIBS)
+ INSTALL_PROGRAM := install --mode=0755
+ INSTALL_DATA := install --mode=0644
+
+@@ -67,6 +68,11 @@
+ @printf "\texec_prefix ?= %s\n" "$(exec_prefix)"
+ @printf "\tOPTIMS ?= %s\n" "$(OPTIMS)"
+ @printf "\tWARNINGS ?= %s\n" "$(WARNINGS)"
++ @printf "\n"
++ @printf "resulting values of build variables:\n"
++ @printf "\tCXXFLAGS += %s\n" "$(CXXFLAGS)"
++ @printf "\tCPPFLAGS += %s\n" "$(CPPFLAGS)"
++ @printf "\tLDFLAGS += %s\n" "$(LDFLAGS)"
+ @printf "\n"
+
+ # installs the software (executable, data files and documentation)
+@@ -149,4 +155,4 @@
+ #
+ %.o: %.cpp GNUmakefile
+ @printf "%s\t%s -> %s\n" $(CXX) $< $@
+- @$(CXX) $(CXXFLAGS) -MMD -MP -c $< -o $@
++ @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MMD -MP -c $< -o $@
diff --git a/debian/patches/813-config-path.patch b/debian/patches/813-config-path.patch
new file mode 100644
index 0000000..e939431
--- /dev/null
+++ b/debian/patches/813-config-path.patch
@@ -0,0 +1,24 @@
+Description: Add Debian config path
+Origin: upstream, commit 813
+--- a/src/Trigger/main.cpp
++++ b/src/Trigger/main.cpp
+@@ -361,7 +361,18 @@
+ std::string cfgfilename = "trigger-rally-" PACKAGE_VERSION ".config";
+
+ if (!PHYSFS_exists(cfgfilename.c_str())) {
+-
++#ifdef UNIX
++ const std::vector<std::string> cfghidingplaces {
++ "/usr/share/games/trigger-rally/"
++ };
++
++ for (const std::string &cfgpath: cfghidingplaces)
++ if (PHYSFS_addToSearchPath(cfgpath.c_str(), 1) == 0)
++ {
++ PUtil::outLog() << "Failed to add PhysFS search directory \"" <<
++ cfgpath << "\"\nPhysFS: " << PHYSFS_getLastError() << std::endl;
++ }
++#endif
+ PUtil::outLog() << "No user config file, copying over defaults" << std::endl;
+
+ std::string cfgdefaults = "trigger-rally.config.defs";
diff --git a/debian/patches/fix_cfgdefaults.patch b/debian/patches/fix_cfgdefaults.patch
deleted file mode 100644
index dc8e735..0000000
--- a/debian/patches/fix_cfgdefaults.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: add the path to the default config file if necessary
-Author: Bertrand Marc <bmarc at debian.org>
---- a/src/Trigger/main.cpp
-+++ b/src/Trigger/main.cpp
-@@ -364,6 +364,10 @@
-
- PUtil::outLog() << "No user config file, copying over defaults" << std::endl;
-
-+ if (PHYSFS_addToSearchPath("/usr/share/games/trigger-rally/", 1) == 0) {
-+ PUtil::outLog() << "Failed to add PhysFS search directory \"/usr/share/games/trigger-rally/\"" << std::endl
-+ << "PhysFS: " << PHYSFS_getLastError() << std::endl;
-+ }
- std::string cfgdefaults = "trigger-rally.config.defs";
-
- if (!PUtil::copyFile(cfgdefaults, cfgfilename)) {
diff --git a/debian/patches/series b/debian/patches/series
index 515de14..bc40b54 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix_build_gcc5.patch
20_system_tinyxml.patch
-fix_cfgdefaults.patch
+813-config-path.patch
+811-flags.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/trigger-rally.git
More information about the Pkg-games-commits
mailing list