From f609cb412959ae8bf436b16f208eada026c84ea9 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Sun, 2 Apr 2017 22:31:07 +0000 Subject: [PATCH] Fix build with -std=c++11 --- .../synfig/files/patch-src__synfig__main.cpp | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/devel/synfig/files/patch-src__synfig__main.cpp b/devel/synfig/files/patch-src__synfig__main.cpp index 45a943156be3..046bd7cea9c7 100644 --- a/devel/synfig/files/patch-src__synfig__main.cpp +++ b/devel/synfig/files/patch-src__synfig__main.cpp @@ -1,6 +1,6 @@ ---- src/synfig/main.cpp.orig 2015-03-28 10:15:01 UTC +--- src/synfig/main.cpp.orig 2017-04-02 22:19:06 UTC +++ src/synfig/main.cpp -@@ -198,7 +198,7 @@ synfig::Main::Main(const synfig::String& +@@ -198,7 +198,7 @@ synfig::Main::Main(const synfig::String& basepath,Prog unsigned int i; #ifdef _DEBUG @@ -9,7 +9,30 @@ std::set_terminate(__gnu_cxx::__verbose_terminate_handler); #endif #endif -@@ -490,7 +490,11 @@ synfig::get_binary_path(const String &fa +@@ -289,17 +289,17 @@ synfig::Main::Main(const synfig::String& basepath,Prog + locations.push_back(getenv("SYNFIG_MODULE_LIST")); + else + { +- locations.push_back("./"MODULE_LIST_FILENAME); ++ locations.push_back("./" MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/.local/share/synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); + #ifdef SYSCONFDIR +- locations.push_back(SYSCONFDIR"/"MODULE_LIST_FILENAME); ++ locations.push_back(SYSCONFDIR "/" MODULE_LIST_FILENAME); + #endif + locations.push_back(prefix+ETL_DIRECTORY_SEPARATOR+"etc"+ETL_DIRECTORY_SEPARATOR+MODULE_LIST_FILENAME); +- locations.push_back("/usr/local/etc/"MODULE_LIST_FILENAME); ++ locations.push_back("/usr/local/etc/" MODULE_LIST_FILENAME); + #ifdef __APPLE__ +- locations.push_back("/Library/Frameworks/synfig.framework/Resources/"MODULE_LIST_FILENAME); +- locations.push_back("/Library/Synfig/"MODULE_LIST_FILENAME); ++ locations.push_back("/Library/Frameworks/synfig.framework/Resources/" MODULE_LIST_FILENAME); ++ locations.push_back("/Library/Synfig/" MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/Library/Synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); + #endif +@@ -490,7 +490,11 @@ synfig::get_binary_path(const String &fallback_path) /* Read from /proc/self/exe (symlink) */ char* path2 = (char*)malloc(buf_size); @@ -21,7 +44,7 @@ while (1) { int i; -@@ -524,9 +528,10 @@ synfig::get_binary_path(const String &fa +@@ -524,9 +528,10 @@ synfig::get_binary_path(const String &fallback_path) /* path is a symlink. Continue loop and resolve this. */ strncpy(path, path2, buf_size - 1); } @@ -33,7 +56,7 @@ if (result == "") { /* readlink() or stat() failed; this can happen when the program is -@@ -568,6 +573,7 @@ synfig::get_binary_path(const String &fa +@@ -568,6 +573,7 @@ synfig::get_binary_path(const String &fallback_path) free(line); fclose(f); }