diff options
author | 2021-07-20 11:06:38 +0200 | |
---|---|---|
committer | 2021-08-07 01:50:42 -0400 | |
commit | ff5e87afa1e6030f4bfd2ca30e198bd728a13fda (patch) | |
tree | fd0da1af98eb7ed9efe3dcaaf54d526a4af94f4e /net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch | |
parent | dev-util/cutter: drop 1.12.0 (diff) | |
download | gentoo-ff5e87afa1e6030f4bfd2ca30e198bd728a13fda.tar.gz gentoo-ff5e87afa1e6030f4bfd2ca30e198bd728a13fda.tar.bz2 gentoo-ff5e87afa1e6030f4bfd2ca30e198bd728a13fda.zip |
net-p2p/retroshare: 0.6.6 version bump
Fixes a bunch of bugs fixed upstream in newer version and disabling
components that are been obsoleted upstream in older versions
Modernize 0.6.6 ebuild after ionenwks suggestions
Bug: https://bugs.gentoo.org/779838
Bug: https://bugs.gentoo.org/798048
Bug: https://bugs.gentoo.org/798099
Closes: https://bugs.gentoo.org/785964
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Gioacchino Mazzurco <gio@altermundi.net>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch')
-rw-r--r-- | net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch b/net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch new file mode 100644 index 000000000000..c756937c1657 --- /dev/null +++ b/net-p2p/retroshare/files/retroshare-0.6.6-fix-cxx17-compilation.patch @@ -0,0 +1,79 @@ +From 8bed99cc9f3763269b6b1aada45a43c9993d7b80 Mon Sep 17 00:00:00 2001 +From: Gioacchino Mazzurco <gio@eigenlab.org> +Date: Fri, 6 Aug 2021 12:15:34 +0200 +Subject: [PATCH] Fix compilation with C++17 + +--- + libretroshare/src/util/rsdir.cc | 42 +++++++++++++++++---------------- + 1 file changed, 22 insertions(+), 20 deletions(-) + +diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc +index 8556b8198..1a6375297 100644 +--- a/libretroshare/src/util/rsdir.cc ++++ b/libretroshare/src/util/rsdir.cc +@@ -4,8 +4,8 @@ + * libretroshare: retroshare core library * + * * + * Copyright (C) 2004-2007 Robert Fernie <retroshare@lunamutt.com> * +- * Copyright (C) 2020 Gioacchino Mazzurco <gio@eigenlab.org> * +- * Copyright (C) 2020 Asociación Civil Altermundi <info@altermundi.net> * ++ * Copyright (C) 2020-2021 Gioacchino Mazzurco <gio@eigenlab.org> * ++ * Copyright (C) 2020-2021 Asociación Civil Altermundi <info@altermundi.net> * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU Lesser General Public License as * +@@ -64,6 +64,26 @@ + * #define RSDIR_DEBUG 1 + ****/ + ++#if __cplusplus < 201703L ++bool std::filesystem::create_directories(const std::string& path) ++{ ++ for( std::string::size_type lastIndex = 0; lastIndex < std::string::npos; ++ lastIndex = path.find('/', lastIndex) ) ++ { ++ std::string&& curDir = path.substr(0, ++lastIndex); ++ if(!RsDirUtil::checkCreateDirectory(curDir)) ++ { ++ RsErr() << __PRETTY_FUNCTION__ << " failure creating: " << curDir ++ << " of: " << path << std::endl; ++ return false; ++ } ++ } ++ return true; ++} ++#else ++# include <filesystem> ++#endif // __cplusplus < 201703L ++ + std::string RsDirUtil::getTopDir(const std::string& dir) + { + std::string top; +@@ -528,24 +548,6 @@ bool RsDirUtil::checkCreateDirectory(const std::string& dir) + return true; + } + +-#if __cplusplus < 201703L +-bool std::filesystem::create_directories(const std::string& path) +-{ +- for( std::string::size_type lastIndex = 0; lastIndex < std::string::npos; +- lastIndex = path.find('/', lastIndex) ) +- { +- std::string&& curDir = path.substr(0, ++lastIndex); +- if(!RsDirUtil::checkCreateDirectory(curDir)) +- { +- RsErr() << __PRETTY_FUNCTION__ << " failure creating: " << curDir +- << " of: " << path << std::endl; +- return false; +- } +- } +- return true; +-} +-#endif // __cplusplus < 201703L +- + std::string RsDirUtil::removeSymLinks(const std::string& path) + { + #if defined(WINDOWS_SYS) || defined(__APPLE__) || defined(__ANDROID__) +-- +2.31.1 + |