diff options
author | Rafael Fontenelle | 2016-05-08 15:54:15 -0300 |
---|---|---|
committer | Rafael Fontenelle | 2016-05-08 15:54:15 -0300 |
commit | 742379c07eedb6947581879952a68ba31f57e174 (patch) | |
tree | d7e2ffd46c8e9c931069220e415adda4e3bdf64f | |
parent | 5ca1e6a596bf65b5cf83adcd9fc862da090b5a52 (diff) | |
download | aur-742379c07eedb6947581879952a68ba31f57e174.tar.gz |
Fix build errors
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | tsc-2.0.0-issue457-utf8-rakefile.patch | 40 | ||||
-rw-r--r-- | tsc-2.0.0-mga-mandir.patch (renamed from fix-manpage.patch) | 6 | ||||
-rw-r--r-- | tsc-2.0.0-mga-rename-custom-filesystem-relative.patch | 468 |
5 files changed, 533 insertions, 10 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Sun May 8 13:47:56 UTC 2016 +# Sun May 8 18:53:33 UTC 2016 pkgbase = tsc pkgdesc = Jump'n'run game with editor and scripting facilities, fork of SMC pkgver = 2.0.0 @@ -24,10 +24,15 @@ pkgbase = tsc depends = glew depends = pcre depends = gtk-update-icon-cache + depends = desktop-file-utils source = ftp://ftp.secretchronicles.de/releases/TSC-2.0.0.tar.xz - source = fix-manpage.patch + source = tsc-2.0.0-mga-mandir.patch + source = tsc-2.0.0-issue457-utf8-rakefile.patch + source = tsc-2.0.0-mga-rename-custom-filesystem-relative.patch sha256sums = c8a9ca3975f9de16aa59fab2a7864c3c541963b46c2c40533632c4fc621b407a - sha256sums = eb4ac81523e4367ebc9c907e1a4a1d08fec3ddcbca83febaef81eb727a2a8c1f + sha256sums = 92603155c1b8f65878361fe31390fa3c79eacbe8559670a9a0476ed654eaa387 + sha256sums = d68a995b8ea8b46228fe70feec2e999d26ada568d4d30faece8d3833cf5a4156 + sha256sums = 70cabaaaf8088473f8e1dafc9ea287e839ce780e99f9d2178122863657cbb207 pkgname = tsc @@ -9,14 +9,22 @@ pkgdesc="Jump'n'run game with editor and scripting facilities, fork of SMC" arch=('i686' 'x86_64') url="http://www.secretchronicles.de/en/" license=('GPL3') -depends=("sdl_image" "sdl_ttf" "sdl_mixer" "devil" "boost-libs" "libxml++" "glew" "pcre" "gtk-update-icon-cache") +depends=("sdl_image" "sdl_ttf" "sdl_mixer" "devil" "boost-libs" "libxml++" "glew" "pcre" "gtk-update-icon-cache" "desktop-file-utils") makedepends=("cmake" "ruby" "gperf" "pkg-config" "bison" "boost" "gettext") -source=("ftp://ftp.secretchronicles.de/releases/TSC-$_ver.tar.xz" "fix-manpage.patch") -sha256sums=("c8a9ca3975f9de16aa59fab2a7864c3c541963b46c2c40533632c4fc621b407a" - "eb4ac81523e4367ebc9c907e1a4a1d08fec3ddcbca83febaef81eb727a2a8c1f") +source=("ftp://ftp.secretchronicles.de/releases/TSC-$_ver.tar.xz" + 'tsc-2.0.0-mga-mandir.patch' + 'tsc-2.0.0-issue457-utf8-rakefile.patch' + 'tsc-2.0.0-mga-rename-custom-filesystem-relative.patch') +sha256sums=('c8a9ca3975f9de16aa59fab2a7864c3c541963b46c2c40533632c4fc621b407a' + '92603155c1b8f65878361fe31390fa3c79eacbe8559670a9a0476ed654eaa387' + 'd68a995b8ea8b46228fe70feec2e999d26ada568d4d30faece8d3833cf5a4156' + '70cabaaaf8088473f8e1dafc9ea287e839ce780e99f9d2178122863657cbb207') prepare() { - patch -p1 -i fix-manpage.patch + # credits: http://svnweb.mageia.org/packages/cauldron/tsc/current/SOURCES/ + patch -p0 -i tsc-2.0.0-mga-mandir.patch + patch -p0 -i tsc-2.0.0-issue457-utf8-rakefile.patch + patch -p0 -i tsc-2.0.0-mga-rename-custom-filesystem-relative.patch } build() { diff --git a/tsc-2.0.0-issue457-utf8-rakefile.patch b/tsc-2.0.0-issue457-utf8-rakefile.patch new file mode 100644 index 000000000000..20ae5744cb9c --- /dev/null +++ b/tsc-2.0.0-issue457-utf8-rakefile.patch @@ -0,0 +1,40 @@ +Index: TSC-2.0.0/tsc/Rakefile +=================================================================== +--- TSC-2.0.0/tsc/Rakefile ++++ TSC-2.0.0/tsc/Rakefile 2015-10-06 20:20:51.899195698 +0200 +@@ -19,7 +19,7 @@ + + CLOBBER.include("build", "crossbuild", "docs/scripting/html", "docs/scripting/rdoc", "docs/api") + +-str = File.read("CMakeLists.txt") ++str = File.open("CMakeLists.txt", "r:UTF-8"){|f| f.read} + TSC_VERSION_MAJOR = str.match(/^set\(TSC_VERSION_MAJOR (\d+)\)/)[1] + TSC_VERSION_MINOR = str.match(/^set\(TSC_VERSION_MINOR (\d+)\)/)[1] + TSC_VERSION_PATCH = str.match(/^set\(TSC_VERSION_PATCH (\d+)\)/)[1] +@@ -30,7 +30,7 @@ + rule %r{credits.cpp} => ["docs/authors.txt", "docs/specialthanks.txt"] do |t| + puts "Converting docs/authors.txt and docs/specialthanks.txt to C++ source file" + +- File.open(t.name, "w") do |f| ++ File.open(t.name, "w:UTF-8") do |f| + # Write first part + f.puts(%Q!#include "#{Dir.pwd}/src/core/global_game.hpp" + #include "#{Dir.pwd}/src/core/main.hpp" +@@ -39,7 +39,7 @@ + + const std::string g_credits = "\\\n!) + +- File.open("docs/authors.txt") do |f2| ++ File.open("docs/authors.txt", "r:UTF-8") do |f2| + # Skip to real content + loop do + line = f2.gets +@@ -58,7 +58,7 @@ + f.puts("-- Special Thanks --\\n\\") + f.puts("\\n\\") + +- File.open("docs/specialthanks.txt") do |f2| ++ File.open("docs/specialthanks.txt", "r:UTF-8") do |f2| + # Skip to real content + loop do + line = f2.gets diff --git a/fix-manpage.patch b/tsc-2.0.0-mga-mandir.patch index afa1800262d0..f03b2b2fc9f6 100644 --- a/fix-manpage.patch +++ b/tsc-2.0.0-mga-mandir.patch @@ -1,5 +1,7 @@ ---- a/TSC-2.0.0/tsc/CMakeLists.txt 2015-08-18 11:21:45.558257165 +0200 -+++ b/TSC-2.0.0/tsc/CMakeLists.txt 2015-08-18 11:22:30.348195821 +0200 +Index: TSC-2.0.0/tsc/CMakeLists.txt +=================================================================== +--- TSC-2.0.0/tsc/CMakeLists.txt ++++ TSC-2.0.0/tsc/CMakeLists.txt 2015-09-27 11:13:56.347674286 +0200 @@ -409,7 +409,7 @@ DESTINATION ${sharedir}/worlds COMPONENT worlds) diff --git a/tsc-2.0.0-mga-rename-custom-filesystem-relative.patch b/tsc-2.0.0-mga-rename-custom-filesystem-relative.patch new file mode 100644 index 000000000000..8889782e4ab4 --- /dev/null +++ b/tsc-2.0.0-mga-rename-custom-filesystem-relative.patch @@ -0,0 +1,468 @@ +diff -Naur TSC-2.0.0/tsc/src/core/filesystem/boost_relative.cpp TSC-2.0.0-patch/tsc/src/core/filesystem/boost_relative.cpp +--- TSC-2.0.0/tsc/src/core/filesystem/boost_relative.cpp 2015-03-31 14:36:44.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/core/filesystem/boost_relative.cpp 1970-01-01 01:00:00.000000000 +0100 +@@ -1,81 +0,0 @@ +-/*************************************************************************** +- * boost_relative.cpp - Implementation of boost::filesystem::relvative() +- * +- * Copyright © 2013 - 2014 The TSC Contributors +- ***************************************************************************/ +-/* +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. +- +- You should have received a copy of the GNU General Public License +- along with this program. If not, see <http://www.gnu.org/licenses/>. +-*/ +- +-#include "boost_relative.hpp" +- +-namespace boost { +-namespace filesystem { +- +-/** +- * Returns the path you need to walk in order to go from `start_path' to +- * `target_path'. Examples: +- * +- * /foo/bar/baz to /foo/blubb/zubb/xx => ../../blubb/zubb/xx +- * /foo/bar to /foo => .. +- * /foo to /foo/bar => bar +- * /foo/bar to /foo/bar => . +- * +- * Only works with absolute pathes. If relative ones are passed, boost::filesystem::absolute() +- * is called on them previously. +- */ +-boost::filesystem::path relative(boost::filesystem::path start_path, boost::filesystem::path target_path) +-{ +- start_path = boost::filesystem::absolute(start_path); +- target_path = boost::filesystem::absolute(target_path); +- +- if (start_path == target_path) +- return boost::filesystem::path("."); +- +- boost::filesystem::path result; +- boost::filesystem::path::iterator startpath_iter = start_path.begin(); +- boost::filesystem::path::iterator targetpath_iter = target_path.begin(); +- +- while(true) { +- if (targetpath_iter == target_path.end()) { +- /* /foo/bar +- * /foo +- */ +- for(; startpath_iter != start_path.end(); startpath_iter++) { +- result /= ".."; +- } +- break; +- } +- else if (startpath_iter == start_path.end()) { +- /* /foo +- * /foo/bar +- */ +- for(; targetpath_iter != target_path.end(); targetpath_iter++) { +- result /= (*targetpath_iter); +- } +- break; +- } +- else if (*startpath_iter != *targetpath_iter) { +- // Both are inequal at this part, but not terminal +- result /= ".."; +- } +- else { +- // Both are equal at this part of the path (part of common root), skip to next one +- // (ignore) +- } +- +- startpath_iter++; +- targetpath_iter++; +- } +- +- return result; +-} +- +-} +-} +diff -Naur TSC-2.0.0/tsc/src/core/filesystem/boost_relative.hpp TSC-2.0.0-patch/tsc/src/core/filesystem/boost_relative.hpp +--- TSC-2.0.0/tsc/src/core/filesystem/boost_relative.hpp 2015-03-31 14:36:44.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/core/filesystem/boost_relative.hpp 1970-01-01 01:00:00.000000000 +0100 +@@ -1,33 +0,0 @@ +-/*************************************************************************** +- * boost_relative.hpp - Implementation of boost::filesystem::relvative() +- * +- * Copyright © 2013 - 2014 The TSC Contributors +- ***************************************************************************/ +-/* +- This program is free software; you can redistribute it and/or modify +- it under the terms of the GNU General Public License as published by +- the Free Software Foundation; either version 3 of the License, or +- (at your option) any later version. +- +- You should have received a copy of the GNU General Public License +- along with this program. If not, see <http://www.gnu.org/licenses/>. +-*/ +- +-/* +- * This file adds a function make_relative() to boost::filesystem that +- * allows us to create a relative path from a given “root”, i.e. the +- * common parts of both paths are missing in the returned path object. +- */ +- +-#ifndef TSC_BOOST_RELATIVE_HPP +-#define TSC_BOOST_RELATIVE_HPP +-#include <boost/filesystem.hpp> +- +-namespace boost { +- +- namespace filesystem { +- /// Find the relative path from start_path to target_path. +- boost::filesystem::path relative(boost::filesystem::path start_path, boost::filesystem::path target_path); +- } +-} +-#endif +diff -Naur TSC-2.0.0/tsc/src/core/filesystem/relative.cpp TSC-2.0.0-patch/tsc/src/core/filesystem/relative.cpp +--- TSC-2.0.0/tsc/src/core/filesystem/relative.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ TSC-2.0.0-patch/tsc/src/core/filesystem/relative.cpp 2016-01-12 08:31:43.537609273 +0100 +@@ -0,0 +1,89 @@ ++/*************************************************************************** ++ * boost_relative.cpp - Implementation of boost::filesystem::relvative() ++ * ++ * Copyright © 2013 - 2014 The TSC Contributors ++ ***************************************************************************/ ++/* ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#include <boost/version.hpp> ++#include <boost/filesystem.hpp> ++#include "relative.hpp" ++ ++/** ++ * Returns the path you need to walk in order to go from `start_path' to ++ * `target_path'. Examples: ++ * ++ * /foo/bar/baz to /foo/blubb/zubb/xx => ../../blubb/zubb/xx ++ * /foo/bar to /foo => .. ++ * /foo to /foo/bar => bar ++ * /foo/bar to /foo/bar => . ++ * ++ * Only works with absolute pathes. If relative ones are passed, boost::filesystem::absolute() ++ * is called on them previously. ++ * ++ * With boost >= 1.60.0 this function is implemented on top of ++ * boost::filesystem::relative(). With boost versions below that ++ * we provide our own implementation. ++ * ++ * TODO: If boost 1.60.0 becomes common enough among distros, remove ++ * our custom implementation. ++ */ ++boost::filesystem::path TSC::fs_relative(boost::filesystem::path start_path, boost::filesystem::path target_path) ++{ ++#if BOOST_VERSION >= 106000 ++ // Boost 1.60.0 has fs::relative(). Beware inverted argument order. ++ return boost::filesystem::relative(target_path, start_path); ++#else ++ start_path = boost::filesystem::absolute(start_path); ++ target_path = boost::filesystem::absolute(target_path); ++ ++ if (start_path == target_path) ++ return boost::filesystem::path("."); ++ ++ boost::filesystem::path result; ++ boost::filesystem::path::iterator startpath_iter = start_path.begin(); ++ boost::filesystem::path::iterator targetpath_iter = target_path.begin(); ++ ++ while(true) { ++ if (targetpath_iter == target_path.end()) { ++ /* /foo/bar ++ * /foo ++ */ ++ for(; startpath_iter != start_path.end(); startpath_iter++) { ++ result /= ".."; ++ } ++ break; ++ } ++ else if (startpath_iter == start_path.end()) { ++ /* /foo ++ * /foo/bar ++ */ ++ for(; targetpath_iter != target_path.end(); targetpath_iter++) { ++ result /= (*targetpath_iter); ++ } ++ break; ++ } ++ else if (*startpath_iter != *targetpath_iter) { ++ // Both are inequal at this part, but not terminal ++ result /= ".."; ++ } ++ else { ++ // Both are equal at this part of the path (part of common root), skip to next one ++ // (ignore) ++ } ++ ++ startpath_iter++; ++ targetpath_iter++; ++ } ++ ++ return result; ++#endif ++} +diff -Naur TSC-2.0.0/tsc/src/core/filesystem/relative.hpp TSC-2.0.0-patch/tsc/src/core/filesystem/relative.hpp +--- TSC-2.0.0/tsc/src/core/filesystem/relative.hpp 1970-01-01 01:00:00.000000000 +0100 ++++ TSC-2.0.0-patch/tsc/src/core/filesystem/relative.hpp 2016-01-12 08:31:45.176534981 +0100 +@@ -0,0 +1,34 @@ ++/*************************************************************************** ++ * relative.hpp - Implementation of relative path detector ++ * ++ * Copyright © 2013 - 2014 The TSC Contributors ++ ***************************************************************************/ ++/* ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see <http://www.gnu.org/licenses/>. ++*/ ++ ++/* ++ * This file adds a function fs_relative() to boost::filesystem that ++ * allows us to create a relative path from a given “root”, i.e. the ++ * common parts of both paths are missing in the returned path object. ++ * ++ * Boost >= 1.60.0 includes such a function, but for the sake of ++ * supporting older versions as well we provide our own version ++ * here. ++ */ ++ ++#ifndef TSC_RELATIVE_HPP ++#define TSC_RELATIVE_HPP ++ ++namespace TSC { ++ ++ /// Find the relative path from start_path to target_path. ++ boost::filesystem::path fs_relative(boost::filesystem::path start_path, boost::filesystem::path target_path); ++} ++#endif +diff -Naur TSC-2.0.0/tsc/src/core/global_basic.hpp TSC-2.0.0-patch/tsc/src/core/global_basic.hpp +--- TSC-2.0.0/tsc/src/core/global_basic.hpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/core/global_basic.hpp 2016-01-12 08:32:15.508164917 +0100 +@@ -75,7 +75,6 @@ + #include <boost/thread/thread.hpp> + #include <boost/chrono.hpp> + #include <boost/system/error_code.hpp> +-#include "filesystem/boost_relative.hpp" + + // libxml++ (with its prerequisite glibmm) + #include <glibmm.h> +diff -Naur TSC-2.0.0/tsc/src/enemies/static.cpp TSC-2.0.0-patch/tsc/src/enemies/static.cpp +--- TSC-2.0.0/tsc/src/enemies/static.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/enemies/static.cpp 2016-01-12 08:32:15.512164737 +0100 +@@ -25,11 +25,9 @@ + #include "../objects/path.hpp" + #include "../core/filesystem/filesystem.hpp" + #include "../core/filesystem/resource_manager.hpp" +-#include "../core/filesystem/boost_relative.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../core/xml_attributes.hpp" + +-namespace fs = boost::filesystem; +- + namespace TSC { + + /* *** *** *** *** *** *** cStaticEnemy *** *** *** *** *** *** *** *** *** *** *** */ +@@ -292,7 +290,7 @@ + CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(wmgr.createWindow("TaharezLook/Editbox", "editor_static_enemy_image")); + Editor_Add(UTF8_("Image"), UTF8_("Image filename"), editbox, 200); + +- editbox->setText(path_to_utf8(fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_image->Get_Path())).c_str()); ++ editbox->setText(path_to_utf8(fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_image->Get_Path())).c_str()); + editbox->subscribeEvent(CEGUI::Editbox::EventTextChanged, CEGUI::Event::Subscriber(&cStaticEnemy::Editor_Image_Text_Changed, this)); + + // rotation speed +diff -Naur TSC-2.0.0/tsc/src/level/level_background.cpp TSC-2.0.0-patch/tsc/src/level/level_background.cpp +--- TSC-2.0.0/tsc/src/level/level_background.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/level/level_background.cpp 2016-01-12 08:32:15.509164872 +0100 +@@ -20,7 +20,7 @@ + #include "../video/gl_surface.hpp" + #include "../core/framerate.hpp" + #include "../core/filesystem/resource_manager.hpp" +-#include "../core/filesystem/boost_relative.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../core/xml_attributes.hpp" + + namespace fs = boost::filesystem; +@@ -195,7 +195,7 @@ + + // Make the path relative to pixmaps/ if it isn’t yet + if (m_image_1_filename.is_absolute()) +- m_image_1_filename = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_image_1_filename); ++ m_image_1_filename = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_image_1_filename); + + m_image_1 = pVideo->Get_Surface(m_image_1_filename); + } +diff -Naur TSC-2.0.0/tsc/src/level/level.cpp TSC-2.0.0-patch/tsc/src/level/level.cpp +--- TSC-2.0.0/tsc/src/level/level.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/level/level.cpp 2016-01-12 08:32:15.509164872 +0100 +@@ -56,7 +56,7 @@ + #include "../objects/path.hpp" + #include "../core/filesystem/filesystem.hpp" + #include "../core/filesystem/resource_manager.hpp" +-#include "../core/filesystem/boost_relative.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../overworld/world_editor.hpp" + #include "../scripting/events/key_down_event.hpp" + +@@ -930,7 +930,7 @@ + + fs::path cLevel::Get_Music_Filename() const + { +- return fs::relative(pResource_Manager->Get_Game_Music_Directory(), m_musicfile); ++ return fs_relative(pResource_Manager->Get_Game_Music_Directory(), m_musicfile); + } + + void cLevel::Set_Music(fs::path filename) +diff -Naur TSC-2.0.0/tsc/src/objects/moving_platform.cpp TSC-2.0.0-patch/tsc/src/objects/moving_platform.cpp +--- TSC-2.0.0/tsc/src/objects/moving_platform.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/objects/moving_platform.cpp 2016-01-12 08:32:15.510164827 +0100 +@@ -29,7 +29,7 @@ + #include "../objects/path.hpp" + #include "../input/mouse.hpp" + #include "../core/filesystem/resource_manager.hpp" +-#include "../core/filesystem/boost_relative.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../core/xml_attributes.hpp" + + namespace fs = boost::filesystem; +@@ -209,15 +209,15 @@ + + fs::path rel; + // image top left +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[0].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[0].m_image->Get_Path()); + Convert_Path_Separators(rel); + Add_Property(p_node, "image_top_left", path_to_utf8(rel)); + // image top middle +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[1].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[1].m_image->Get_Path()); + Convert_Path_Separators(rel); + Add_Property(p_node, "image_top_middle", path_to_utf8(rel)); + // image top right +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[2].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[2].m_image->Get_Path()); + Convert_Path_Separators(rel); + Add_Property(p_node, "image_top_right", path_to_utf8(rel)); + +@@ -1043,7 +1043,7 @@ + editbox = static_cast<CEGUI::Editbox*>(wmgr.createWindow("TaharezLook/Editbox", "editor_moving_platform_image_top_left")); + Editor_Add(UTF8_("Image top left"), UTF8_("Image top left"), editbox, 200); + +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[0].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[0].m_image->Get_Path()); + editbox->setText(path_to_utf8(rel)); + editbox->subscribeEvent(CEGUI::Editbox::EventTextChanged, CEGUI::Event::Subscriber(&cMoving_Platform::Editor_Image_Top_Left_Text_Changed, this)); + +@@ -1051,7 +1051,7 @@ + editbox = static_cast<CEGUI::Editbox*>(wmgr.createWindow("TaharezLook/Editbox", "editor_moving_platform_image_top_middle")); + Editor_Add(UTF8_("Image top middle"), UTF8_("Image top middle"), editbox, 200); + +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[1].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[1].m_image->Get_Path()); + editbox->setText(path_to_utf8(rel)); + editbox->subscribeEvent(CEGUI::Editbox::EventTextChanged, CEGUI::Event::Subscriber(&cMoving_Platform::Editor_Image_Top_Middle_Text_Changed, this)); + +@@ -1059,7 +1059,7 @@ + editbox = static_cast<CEGUI::Editbox*>(wmgr.createWindow("TaharezLook/Editbox", "editor_moving_platform_image_top_right")); + Editor_Add(UTF8_("Image top right"), UTF8_("Image top right"), editbox, 200); + +- rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[2].m_image->Get_Path()); ++ rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_images[2].m_image->Get_Path()); + editbox->setText(path_to_utf8(rel)); + editbox->subscribeEvent(CEGUI::Editbox::EventTextChanged, CEGUI::Event::Subscriber(&cMoving_Platform::Editor_Image_Top_Right_Text_Changed, this)); + +diff -Naur TSC-2.0.0/tsc/src/objects/sprite.cpp TSC-2.0.0-patch/tsc/src/objects/sprite.cpp +--- TSC-2.0.0/tsc/src/objects/sprite.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/objects/sprite.cpp 2016-01-12 08:32:15.510164827 +0100 +@@ -28,6 +28,7 @@ + #include "../core/i18n.hpp" + #include "../scripting/events/touch_event.hpp" + #include "../level/level_editor.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../core/filesystem/resource_manager.hpp" + #include "../core/xml_attributes.hpp" + +@@ -462,7 +463,7 @@ + // Only save the relative part of the filename -- otherwise the + // generated levels wouldn’t be portable. + if (img_filename.is_absolute()) +- img_filename = boost::filesystem::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), img_filename); ++ img_filename = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), img_filename); + + Add_Property(p_node, "image", img_filename.generic_string()); + +@@ -1400,7 +1401,7 @@ + CEGUI::Editbox* editbox = static_cast<CEGUI::Editbox*>(wmgr.createWindow("TaharezLook/Editbox", "editor_sprite_image")); + Editor_Add(UTF8_("Image"), UTF8_("Image filename"), editbox, 200); + +- fs::path rel = fs::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_start_image->Get_Path()); ++ fs::path rel = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), m_start_image->Get_Path()); + editbox->setText(path_to_utf8(rel)); + editbox->subscribeEvent(CEGUI::Editbox::EventTextChanged, CEGUI::Event::Subscriber(&cSprite::Editor_Image_Text_Changed, this)); + +diff -Naur TSC-2.0.0/tsc/src/video/animation.cpp TSC-2.0.0-patch/tsc/src/video/animation.cpp +--- TSC-2.0.0/tsc/src/video/animation.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/video/animation.cpp 2016-01-12 08:32:15.511164782 +0100 +@@ -23,7 +23,7 @@ + #include "../core/i18n.hpp" + #include "../core/filesystem/filesystem.hpp" + #include "../core/filesystem/resource_manager.hpp" +-#include "../core/filesystem/boost_relative.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../core/xml_attributes.hpp" + #include "../input/mouse.hpp" + +@@ -1149,7 +1149,7 @@ + // remember the filename for saving + m_image_filename = filename; + if (filename.is_absolute()) +- m_image_filename = boost::filesystem::relative(pResource_Manager->Get_Game_Pixmaps_Directory(), filename); ++ m_image_filename = fs_relative(pResource_Manager->Get_Game_Pixmaps_Directory(), filename); + + // set new image + Set_Image(pVideo->Get_Surface(m_image_filename, 0)); +diff -Naur TSC-2.0.0/tsc/src/video/video.cpp TSC-2.0.0-patch/tsc/src/video/video.cpp +--- TSC-2.0.0/tsc/src/video/video.cpp 2015-07-16 19:18:42.000000000 +0200 ++++ TSC-2.0.0-patch/tsc/src/video/video.cpp 2016-01-12 08:32:15.511164782 +0100 +@@ -29,6 +29,7 @@ + #include "../core/math/size.hpp" + #include "../core/filesystem/filesystem.hpp" + #include "../core/filesystem/resource_manager.hpp" ++#include "../core/filesystem/relative.hpp" + #include "../gui/spinner.hpp" + + namespace fs = boost::filesystem; +@@ -663,7 +664,7 @@ + for (vector<fs::path>::iterator itr = image_files.begin(); itr != image_files.end(); ++itr) { + // get filenames + fs::path filename = (*itr); +- fs::path cache_filename = imgcache_dir_active / fs::relative(pResource_Manager->Get_Game_Data_Directory(), filename); ++ fs::path cache_filename = imgcache_dir_active / fs_relative(pResource_Manager->Get_Game_Data_Directory(), filename); + + // if directory + if (fs::is_directory(filename)) { +@@ -1011,7 +1012,7 @@ + if (fs::exists(settings_file) && fs::is_regular_file(settings_file)) { + settings = pSettingsParser->Get(settings_file); + +- fs::path img_filename_cache = m_imgcache_dir / fs::relative(pResource_Manager->Get_Game_Data_Directory(), settings_file); // Why add .png here? Should be in the return value of fs::relative() anyway. ++ fs::path img_filename_cache = m_imgcache_dir / fs_relative(pResource_Manager->Get_Game_Data_Directory(), settings_file); // Why add .png here? Should be in the return value of fs_relative() anyway. + // check if image cache file exists + if (fs::exists(img_filename_cache) && fs::is_regular_file(img_filename_cache)) + sdl_surface = IMG_Load(path_to_utf8(img_filename_cache).c_str()); |