summaryrefslogtreecommitdiff
path: root/freefilesync
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-11-28 13:50:21 +0000
committerB Stack <bgstack15@gmail.com>2019-11-28 13:50:21 +0000
commitc7fdc62efaccb4248e73ac21e0312b13daffb084 (patch)
tree3a901681d4d445f05de6ffe27544b4680c6a8d2b /freefilesync
parentMerge branch 'veracrypt-dpkg' into 'master' (diff)
parentffs_el7: -std=c++17 (diff)
downloadstackrpms-c7fdc62efaccb4248e73ac21e0312b13daffb084.tar.gz
stackrpms-c7fdc62efaccb4248e73ac21e0312b13daffb084.tar.bz2
stackrpms-c7fdc62efaccb4248e73ac21e0312b13daffb084.zip
Merge branch 'freefilesync-bump' into 'master'
Freefilesync 10.18 See merge request bgstack15/stackrpms!101
Diffstat (limited to 'freefilesync')
-rw-r--r--freefilesync/debian/README.Debian11
-rw-r--r--freefilesync/debian/changelog21
-rw-r--r--freefilesync/debian/control4
-rw-r--r--freefilesync/debian/patches/ffs_devuan.patch89
-rw-r--r--freefilesync/debian/patches/ffs_no_check_updates.patch6
-rw-r--r--freefilesync/debian/patches/ffs_no_wx311.patch21
-rw-r--r--freefilesync/ffs_el.patch30
-rw-r--r--freefilesync/ffs_fedora.patch8
-rw-r--r--freefilesync/ffs_no_check_updates.patch6
-rw-r--r--freefilesync/ffs_no_eraseif.patch407
-rw-r--r--freefilesync/ffs_no_wx311.patch21
-rw-r--r--freefilesync/freefilesync.spec16
12 files changed, 554 insertions, 86 deletions
diff --git a/freefilesync/debian/README.Debian b/freefilesync/debian/README.Debian
index b370841..2dd582d 100644
--- a/freefilesync/debian/README.Debian
+++ b/freefilesync/debian/README.Debian
@@ -1,8 +1,19 @@
+freefilesync (10.18-1+devuan)
+
+ * Switch to gtk3 so OBS can build it
+ - Debian dropped libwxgtk3.0-dev in favor of libwxgtk3.0-gtk3-dev, but gtk3 has some perceived performance issues back from FreeFileSync 8.7 days.
+ - https://dev1galaxy.org/viewtopic.php?pid=18625#p18625
+ - https://freefilesync.org/forum/viewtopic.php?t=4918&p=16608&hilit=proxy_pixbuf_destroy#p16608
+
+ -- B Stack <bgstack15@gmail.com> Thu, 21 Oct 2019 08:18:00 -0500
+
freefilesync (10.17-1+devuan)
* Disable libcurl version check, to match AUR release.
* Minor cleanup of Makefile that upstream failed to notice when he refactored
+ -- B Stack <bgstack15@gmail.com> Tue, 22 Oct 2019 10:06:00 -0400
+
freefilesync (10.16-1+devuan)
* Revert some sftp and libssh2 newer-version functionality. Upstream apparently patches their upstream libs.
diff --git a/freefilesync/debian/changelog b/freefilesync/debian/changelog
index 524371a..a271815 100644
--- a/freefilesync/debian/changelog
+++ b/freefilesync/debian/changelog
@@ -1,3 +1,22 @@
+freefilesync (10.18-1+devuan) obs; urgency=low
+
+ * Save/load database files in parallel
+ * Show item count for each view filter category
+ * Group config history items via background colors
+ * Allow grid sort by category and sync action
+ * Reduced file accesses for faster start up
+ * Buffer redundant database loads
+ * Fix ibus initialization hang on Ubuntu 19.10
+ * Defer showing progress panel for short-lived tasks
+ * Calculate stable scrollbar dimensions on GTK2
+ * Log mod time errors even when sync is cancelled
+ * Show progress and errors when updating sync directions
+ * Detect MLSD support despite invalid FTP FEAT response
+ * Improved GUI responsiveness during config load
+ * Added Vietnamese translation
+
+ -- B Stack <bgstack15@gmail.com> Thu, 21 Nov 2019 07:53:41 -0500
+
freefilesync (10.17-1+devuan) obs; urgency=low
* Support PuTTY private key files for SFTP login
@@ -11,6 +30,8 @@ freefilesync (10.17-1+devuan) obs; urgency=low
* Fixed startup crash caused by corrupted HDD properties
* Allow SFTP access via Ed25519 key in PKIX format
+ -- B Stack <bgstack15@gmail.com> Tue, 22 Oct 2019 10:04:13 -0400
+
freefilesync (10.16-1+devuan) obs; urgency=low
* Redesigned progress indicator graphs
diff --git a/freefilesync/debian/control b/freefilesync/debian/control
index a60410c..4d8291f 100644
--- a/freefilesync/debian/control
+++ b/freefilesync/debian/control
@@ -6,10 +6,10 @@ Build-Depends: debhelper (>=11~),
autotools-dev,
imagemagick,
libcurl4-openssl-dev,
- libgtk2.0-dev,
+ libgtk-3-dev,
libssh2-1-dev,
libssl-dev,
- libwxgtk3.0-dev,
+ libwxgtk3.0-gtk3-dev,
wx3.0-headers,
unzip
Standards-Version: 4.1.4
diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch
index fc16f54..705d84d 100644
--- a/freefilesync/debian/patches/ffs_devuan.patch
+++ b/freefilesync/debian/patches/ffs_devuan.patch
@@ -1,12 +1,12 @@
-Author: Simon Brulhart
-Source: AUR
-Date: 2019-10-21
-Message: Do not try to compile inexistant file
-Files affected: FreeFileSync/Source/Makefile
-diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp
+Author: B Stack
+Source: Original research
+Date: 2019-11-21
+Message: Main patch to compile on Devuan.
+This reintroduces the gtk-3 usage, because Debian/Devuan stopped packaging libwxgtk3.0-dev (which used gtk2) and only does libwxgtk3.0-gtk3-dev. However, by reintroducing the gtk3, it brings back the old gtk3 instability from my previous packaging effort: https://freefilesync.org/forum/viewtopic.php?t=4918. /mnt/public/packages/old/freefilesync/freefilesync-9.7-1.master.tgz. Upstream never replied, but did note in the source that gtk3 is inherently unstable.
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/base/ffs_paths.cpp 10.18-1/FreeFileSync/Source/base/ffs_paths.cpp
--- 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400
-+++ 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:36:28.178274292 -0400
-@@ -55,7 +55,8 @@
++++ 10.18-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-11-21 09:41:42.287474472 -0500
+@@ -64,7 +64,8 @@
Zstring fff::getResourceDirPf()
{
@@ -16,9 +16,9 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S
}
-diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/Makefile 10.18-1/FreeFileSync/Source/Makefile
--- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 08:05:57.000000000 -0400
-+++ 10.11-1/FreeFileSync/Source/Makefile 2019-04-12 14:00:16.774552362 -0400
++++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 09:42:57.408243242 -0500
@@ -1,10 +1,10 @@
-EXENAME = FreeFileSync_$(shell arch)
+EXENAME = FreeFileSync
@@ -32,26 +32,23 @@ diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/F
CXXFLAGS += `pkg-config --cflags openssl`
-@@ -17,6 +17,7 @@ CXXFLAGS += `pkg-config --cflags libssh2`
+@@ -16,9 +16,10 @@
+ CXXFLAGS += `pkg-config --cflags libssh2`
LINKFLAGS += `pkg-config --libs libssh2`
-
- CXXFLAGS += `pkg-config --cflags gtk+-2.0`
-+LINKFLAGS += `pkg-config --libs gtk+-2.0`
+
+-CXXFLAGS += `pkg-config --cflags gtk+-2.0`
++CXXFLAGS += `pkg-config --cflags gtk+-3.0`
++LINKFLAGS += `pkg-config --libs gtk+-3.0`
#treat as system headers so that warnings are hidden:
- CXXFLAGS += -isystem/usr/include/gtk-2.0
-
-@@ -56,7 +56,6 @@
- CPP_FILES+=afs/init_curl_libssh2.cpp
- CPP_FILES+=afs/native.cpp
- CPP_FILES+=afs/sftp.cpp
--CPP_FILES+=afs/libssh2/init_libssh2.cpp
- CPP_FILES+=ui/batch_config.cpp
- CPP_FILES+=ui/abstract_folder_picker.cpp
- CPP_FILES+=ui/batch_status_handler.cpp
-diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile
+-CXXFLAGS += -isystem/usr/include/gtk-2.0
++CXXFLAGS += -isystem/usr/include/gtk-3.0
+
+ #support for SELinux (optional)
+ SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES)
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/RealTimeSync/Makefile 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile
--- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 08:05:57.000000000 -0400
-+++ 10.15-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-08-15 13:59:53.934551753 -0400
-@@ -1,13 +1,14 @@
++++ 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-11-21 09:46:11.378240094 -0500
+@@ -1,15 +1,16 @@
-EXENAME = RealTimeSync_$(shell arch)
+EXENAME = RealTimeSync
@@ -63,15 +60,19 @@ diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/RealTimeSync/Makef
+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread
#Gtk - support "no button border"
- CXXFLAGS += `pkg-config --cflags gtk+-2.0`
-+LINKFLAGS += `pkg-config --libs gtk+-2.0`
+-CXXFLAGS += `pkg-config --cflags gtk+-2.0`
++CXXFLAGS += `pkg-config --cflags gtk+-3.0`
++LINKFLAGS += `pkg-config --libs gtk+-3.0`
#treat as system headers so that warnings are hidden:
- CXXFLAGS += -isystem/usr/include/gtk-2.0
+-CXXFLAGS += -isystem/usr/include/gtk-2.0
++CXXFLAGS += -isystem/usr/include/gtk-3.0
-diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.11-1/FreeFileSync/Source/ui/small_dlgs.cpp
+ CPP_FILES=
+ CPP_FILES+=application.cpp
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.18-1/FreeFileSync/Source/ui/small_dlgs.cpp
--- 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-04-12 08:05:57.000000000 -0400
+++ 10.11-1/FreeFileSync/Source/ui/small_dlgs.cpp 2019-04-12 13:58:55.050550183 -0400
-@@ -115,6 +115,8 @@
+@@ -117,6 +117,8 @@
L" x64";
#endif
@@ -80,3 +81,27 @@ diff -Naur -x '*.orig' -x '*.rej' 10.11-0/FreeFileSync/Source/ui/small_dlgs.cpp
GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/wx+/dc.h 10.18-1/wx+/dc.h
+--- 10.18-0/wx+/dc.h 2019-11-21 08:24:23.967769384 -0500
++++ 10.18-1/wx+/dc.h 2019-11-21 09:42:12.779786504 -0500
+@@ -54,7 +54,7 @@
+ #ifdef wxHAVE_DPI_INDEPENDENT_PIXELS //pulled from wx/window.h: https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/window.h#L2029
+ return d; //e.g. macOS, GTK3
+ #else //https://github.com/wxWidgets/wxWidgets/blob/master/src/common/wincmn.cpp#L2865
+- static_assert(GTK_MAJOR_VERSION == 2);
++ static_assert(GTK_MAJOR_VERSION == 3);
+ //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114
+ //=> requires general fix at wxWidgets-level
+ assert(wxTheApp); //only call after wxWidgets was initalized!
+diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.18-0/FreeFileSync/Source/base/icon_loader.cpp 10.18-1/FreeFileSync/Source/base/icon_loader.cpp
+--- 10.18-0/FreeFileSync/Source/base/icon_loader.cpp 2019-11-21 08:24:23.955769262 -0500
++++ 10.18-1/FreeFileSync/Source/base/icon_loader.cpp 2019-11-21 09:42:15.439813730 -0500
+@@ -18,7 +18,7 @@
+
+ namespace
+ {
+-static_assert(GTK_MAJOR_VERSION == 2, "FreeFileSync does NOT (currently) support GTK3! The GTK calls below will lead to crashes due to not being thread-safe on GTK3.");
++static_assert(GTK_MAJOR_VERSION == 3, "FreeFileSync does NOT (currently) support GTK3! The GTK calls below will lead to crashes due to not being thread-safe on GTK3.");
+ //gdk_threads_enter(); + ZEN_ON_SCOPE_EXIT(::gdk_threads_leave); is NOT enough; e.g. GTK3 + openSuse still crashes with:
+ // Gtk:ERROR:gtkicontheme.c:4026:proxy_pixbuf_destroy: assertion failed: (icon_info->proxy_pixbuf != NULL)
+ //GTK icon theme internals: https://github.com/GNOME/gtk/blob/master/gtk/gtkicontheme.c
diff --git a/freefilesync/debian/patches/ffs_no_check_updates.patch b/freefilesync/debian/patches/ffs_no_check_updates.patch
index 4e56d19..eaff5c4 100644
--- a/freefilesync/debian/patches/ffs_no_check_updates.patch
+++ b/freefilesync/debian/patches/ffs_no_check_updates.patch
@@ -37,7 +37,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14-
diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 10.14-1/FreeFileSync/Source/ui/version_check.cpp
--- 10.9-0/FreeFileSync/Source/ui/version_check.cpp 2019-02-10 22:01:42.126160041 -0500
-+++ 10.14-1/FreeFileSync/Source/ui/version_check.cpp 2019-07-16 11:45:36.113848111 -0400
++++ 10.18-1/FreeFileSync/Source/ui/version_check.cpp 2019-11-20 09:19:50.936975067 -0500
@@ -69,6 +69,8 @@
bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck)
@@ -57,8 +57,8 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1
updateDetailsMsg = utfTo<std::wstring>(buf);
}
catch (const zen::SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); }
-@@ -187,8 +188,7 @@
- //access is thread-safe on Windows (WinInet), but not on Linux/OS X (wxWidgets)
+@@ -182,8 +183,7 @@
+
std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError
{
- const std::string buffer = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams,
diff --git a/freefilesync/debian/patches/ffs_no_wx311.patch b/freefilesync/debian/patches/ffs_no_wx311.patch
index e6069d4..92b5372 100644
--- a/freefilesync/debian/patches/ffs_no_wx311.patch
+++ b/freefilesync/debian/patches/ffs_no_wx311.patch
@@ -28,19 +28,18 @@ diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp
else
diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp
--- 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400
-+++ 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:26:56.794422701 -0400
-@@ -75,8 +75,9 @@
- Zstring cfgFolderPath;
- //OS standard path (XDG layout): ~/.config/FreeFileSync
- //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag
-- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
-- cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync";
-+ // Fedora does not have wxGTK 3.1.1 which is the dev branch.
-+ //wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
-+ cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync";
++++ 10.18-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-11-20 08:55:38.553446634 -0500
+@@ -80,8 +80,8 @@
+ //OS standard path (XDG layout): ~/.config/FreeFileSync
+ //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag
+- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
+- const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync";
++ // Many distros do not have wxGTK 3.1.1 which is the dev branch.
++ const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync";
- std::call_once(onceFlagCreateCfgPath, [&]
+ try //create the config folder if not existing + create "Logs" subfolder while we're at it
+ {
diff --git a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp
index 6e769bb..ce6110b 100644
--- a/FreeFileSync/Source/ui/command_box.cpp
diff --git a/freefilesync/ffs_el.patch b/freefilesync/ffs_el.patch
index 3e1e9d3..d3849f3 100644
--- a/freefilesync/ffs_el.patch
+++ b/freefilesync/ffs_el.patch
@@ -17,12 +17,13 @@ diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/S
diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Makefile
--- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400
-+++ 10.15-1/FreeFileSync/Source/Makefile 2019-08-16 08:19:12.101271747 -0400
++++ 10.18-1/FreeFileSync/Source/Makefile 2019-11-21 20:59:25.548277619 -0500
@@ -1,10 +1,10 @@
-EXENAME = FreeFileSync_$(shell arch)
+EXENAME = FreeFileSync
- CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+-CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
++CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
+ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread
@@ -40,14 +41,6 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefil
#treat as system headers so that warnings are hidden:
CXXFLAGS += -isystem/usr/include/gtk-2.0
-@@ -56,7 +56,6 @@
- CPP_FILES+=afs/init_curl_libssh2.cpp
- CPP_FILES+=afs/native.cpp
- CPP_FILES+=afs/sftp.cpp
--CPP_FILES+=afs/libssh2/init_libssh2.cpp
- CPP_FILES+=ui/batch_config.cpp
- CPP_FILES+=ui/abstract_folder_picker.cpp
- CPP_FILES+=ui/batch_status_handler.cpp
diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 10.11-1/FreeFileSync/Source/RealTimeSync/application.h
--- 10.11-0/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 07:59:45.035147580 -0400
+++ 10.11-1/FreeFileSync/Source/RealTimeSync/application.h 2019-04-12 10:19:57.227913415 -0400
@@ -62,13 +55,13 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTim
diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile
--- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -0400
-+++ 10.15-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-08-16 08:19:21.959638104 -0400
++++ 10.18-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-11-22 10:14:04.326175203 -0500
@@ -1,13 +1,14 @@
-EXENAME = RealTimeSync_$(shell arch)
+EXENAME = RealTimeSync
-CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-+CXXFLAGS = -std=c++2a -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
++CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
-Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
+ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread
@@ -128,3 +121,16 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/zen/serialize.h 10.11-1/zen
#include "string_base.h"
//keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h!
+Message: For -std=c++17 we do not get to use charconv. It appears it is not actually in use, because the application compiles with this patch.
+diff -Naur -x '*.orig' -x '.git*' -x '*.swp' -x '*.rej' 10.18-0/zen/legacy_compiler.cpp 10.18-1/zen/legacy_compiler.cpp
+--- 10.18-0/zen/legacy_compiler.cpp 2019-11-21 20:59:02.633016149 -0500
++++ 10.18-1/zen/legacy_compiler.cpp 2019-11-21 20:59:31.042340308 -0500
+@@ -5,7 +5,7 @@
+ // *****************************************************************************
+
+ #include "legacy_compiler.h"
+-#include <charconv>
++//#include <charconv>
+ //1. including this one in string_tools.h blows up VC++:
+ // "An internal error has occurred in the compiler. (compiler file 'd:\agent\_work\1\s\src\vctools\Compiler\Utc\src\p2\p2symtab.c', line 2618)"
+ //2. using inside PCH: "fatal error C1076: compiler limit: internal heap limit reached"
diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch
index 5c5e3b7..12346fb 100644
--- a/freefilesync/ffs_fedora.patch
+++ b/freefilesync/ffs_fedora.patch
@@ -54,14 +54,6 @@ diff -Naur 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Make
#treat as system headers so that warnings are hidden:
CXXFLAGS += -isystem/usr/include/gtk-2.0
-@@ -56,7 +56,6 @@
- CPP_FILES+=afs/init_curl_libssh2.cpp
- CPP_FILES+=afs/native.cpp
- CPP_FILES+=afs/sftp.cpp
--CPP_FILES+=afs/libssh2/init_libssh2.cpp
- CPP_FILES+=ui/batch_config.cpp
- CPP_FILES+=ui/abstract_folder_picker.cpp
- CPP_FILES+=ui/batch_status_handler.cpp
diff -Naur 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 10.11-1/FreeFileSync/Source/RealTimeSync/Makefile
--- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -0400
+++ 10.15-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-08-15 13:59:53.934551753 -0400
diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch
index 4e56d19..eaff5c4 100644
--- a/freefilesync/ffs_no_check_updates.patch
+++ b/freefilesync/ffs_no_check_updates.patch
@@ -37,7 +37,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/main_dlg.cpp 10.14-
diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 10.14-1/FreeFileSync/Source/ui/version_check.cpp
--- 10.9-0/FreeFileSync/Source/ui/version_check.cpp 2019-02-10 22:01:42.126160041 -0500
-+++ 10.14-1/FreeFileSync/Source/ui/version_check.cpp 2019-07-16 11:45:36.113848111 -0400
++++ 10.18-1/FreeFileSync/Source/ui/version_check.cpp 2019-11-20 09:19:50.936975067 -0500
@@ -69,6 +69,8 @@
bool fff::shouldRunAutomaticUpdateCheck(time_t lastUpdateCheck)
@@ -57,8 +57,8 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1
updateDetailsMsg = utfTo<std::wstring>(buf);
}
catch (const zen::SysError& e) { throw FileError(_("Failed to retrieve update information."), e.toString()); }
-@@ -187,8 +188,7 @@
- //access is thread-safe on Windows (WinInet), but not on Linux/OS X (wxWidgets)
+@@ -182,8 +183,7 @@
+
std::string getOnlineVersion(const std::vector<std::pair<std::string, std::string>>& postParams) //throw SysError
{
- const std::string buffer = sendHttpPost(Zstr("https://api.freefilesync.org/latest_version"), postParams,
diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_no_eraseif.patch
new file mode 100644
index 0000000..eaaab38
--- /dev/null
+++ b/freefilesync/ffs_no_eraseif.patch
@@ -0,0 +1,407 @@
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 10.18-2/FreeFileSync/Source/afs/abstract_impl.h
+--- 10.18-1/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 16:15:55.823668066 -0500
++++ 10.18-2/FreeFileSync/Source/afs/abstract_impl.h 2019-11-20 17:57:30.555558350 -0500
+@@ -255,7 +255,7 @@
+ pathLocks_.access([&](std::map<NativePath, std::weak_ptr<std::mutex>>& pathLocks)
+ {
+ //remove obsolete entries
+- std::erase_if(pathLocks, [](const auto& v) { return !v.second.lock(); });
++ zen::eraseIf(pathLocks, [](const auto& v) { return !v.second.lock(); });
+
+ //get or create mutex
+ std::weak_ptr<std::mutex>& weakPtr = pathLocks[nativePath];
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/gdrive.cpp 10.18-2/FreeFileSync/Source/afs/gdrive.cpp
+--- 10.18-1/FreeFileSync/Source/afs/gdrive.cpp 2019-11-20 16:15:55.828668123 -0500
++++ 10.18-2/FreeFileSync/Source/afs/gdrive.cpp 2019-11-20 17:57:30.556558361 -0500
+@@ -1777,7 +1777,7 @@
+ if (it != itemDetails_.end())
+ {
+ GoogleItemDetails detailsNew = it->second;
+- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; });
++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdOld; });
+ notifyItemUpdate(stateDelta, itemId, detailsNew);
+ }
+ else //conflict!!!
+@@ -1792,7 +1792,7 @@
+ GoogleItemDetails detailsNew = it->second;
+ detailsNew.itemName = utfTo<std::string>(newName);
+
+- std::erase_if(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); //
++ eraseIf(detailsNew.parentIds, [&](const std::string& id) { return id == parentIdFrom || id == parentIdTo; }); //
+ detailsNew.parentIds.push_back(parentIdTo); //not a duplicate
+
+ notifyItemUpdate(stateDelta, itemId, detailsNew);
+@@ -1902,7 +1902,7 @@
+ return; //=> avoid misleading changeLog_ entries after Google Drive sync!!!
+
+ //update change logs (and clean up obsolete entries)
+- std::erase_if(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr)
++ eraseIf(changeLog_, [&](std::weak_ptr<ItemIdDelta>& weakPtr)
+ {
+ if (std::shared_ptr<ItemIdDelta> iid = weakPtr.lock())
+ {
+@@ -1923,8 +1923,8 @@
+
+ std::vector<std::string> parentIdsNew = details->parentIds;
+ std::vector<std::string> parentIdsRemoved = it->second.parentIds;
+- std::erase_if(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); });
+- std::erase_if(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); });
++ eraseIf(parentIdsNew, [&](const std::string& id) { return std::find(it->second.parentIds.begin(), it->second.parentIds.end(), id) != it->second.parentIds.end(); });
++ eraseIf(parentIdsRemoved, [&](const std::string& id) { return std::find(details->parentIds.begin(), details->parentIds.end(), id) != details->parentIds.end(); });
+
+ for (const std::string& parentId : parentIdsNew)
+ folderContents_[parentId].childItems.push_back(it); //new insert => no need for duplicate check
+@@ -1933,7 +1933,7 @@
+ {
+ auto itP = folderContents_.find(parentId);
+ if (itP != folderContents_.end())
+- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; });
++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; });
+ }
+ //if all parents are removed, Google Drive will (recursively) delete the item => don't prematurely do this now: wait for change notifications!
+
+@@ -1955,7 +1955,7 @@
+ {
+ auto itP = folderContents_.find(parentId);
+ if (itP != folderContents_.end())
+- std::erase_if(itP->second.childItems, [&](auto itChild) { return itChild == it; });
++ eraseIf(itP->second.childItems, [&](auto itChild) { return itChild == it; });
+ }
+ itemDetails_.erase(it);
+ }
+@@ -1964,7 +1964,7 @@
+ if (itP != folderContents_.end())
+ {
+ for (auto itChild : itP->second.childItems) //2. delete as parent from child items (don't wait for change notifications of children)
+- std::erase_if(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; });
++ eraseIf(itChild->second.parentIds, [&](const std::string& id) { return id == itemId; });
+ folderContents_.erase(itP);
+ }
+ }
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/afs/sftp.cpp 10.18-2/FreeFileSync/Source/afs/sftp.cpp
+--- 10.18-1/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:54:23.078438037 -0500
++++ 10.18-2/FreeFileSync/Source/afs/sftp.cpp 2019-11-20 17:57:30.557558372 -0500
+@@ -946,7 +946,7 @@
+ std::this_thread::yield();
+ return; //don't hold lock for too long: delete only one session at a time, then yield...
+ }
+- std::erase_if(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer
++ eraseIf(sessions.sshSessionsWithThreadAffinity, [](const auto& v) { return !v.second.lock(); }); //clean up dangling weak pointer
+ done = true;
+ });
+ }
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/algorithm.cpp 10.18-2/FreeFileSync/Source/base/algorithm.cpp
+--- 10.18-1/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 16:15:55.832668168 -0500
++++ 10.18-2/FreeFileSync/Source/base/algorithm.cpp 2019-11-20 17:57:30.558558384 -0500
+@@ -1372,8 +1372,8 @@
+ {
+ std::vector<const FileSystemObject*> itemSelectionLeft (rowsToCopyOnLeft .begin(), rowsToCopyOnLeft .end());
+ std::vector<const FileSystemObject*> itemSelectionRight(rowsToCopyOnRight.begin(), rowsToCopyOnRight.end());
+- std::erase_if(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats!
+- std::erase_if(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //
++ eraseIf(itemSelectionLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed for correct stats!
++ eraseIf(itemSelectionRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //
+
+ const int itemTotal = static_cast<int>(itemSelectionLeft.size() + itemSelectionRight.size());
+ int64_t bytesTotal = 0;
+@@ -1548,8 +1548,8 @@
+ std::vector<FileSystemObject*> deleteLeft = rowsToDeleteOnLeft;
+ std::vector<FileSystemObject*> deleteRight = rowsToDeleteOnRight;
+
+- std::erase_if(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed?
+- std::erase_if(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats:
++ eraseIf(deleteLeft, [](const FileSystemObject* fsObj) { return fsObj->isEmpty< LEFT_SIDE>(); }); //needed?
++ eraseIf(deleteRight, [](const FileSystemObject* fsObj) { return fsObj->isEmpty<RIGHT_SIDE>(); }); //yes, for correct stats:
+
+ const int itemCount = static_cast<int>(deleteLeft.size() + deleteRight.size());
+ callback.initNewPhase(itemCount, 0, ProcessPhase::none); //throw X
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/db_file.cpp 10.18-2/FreeFileSync/Source/base/db_file.cpp
+--- 10.18-1/FreeFileSync/Source/base/db_file.cpp 2019-11-20 16:15:55.836668213 -0500
++++ 10.18-2/FreeFileSync/Source/base/db_file.cpp 2019-11-20 17:57:30.559558395 -0500
+@@ -591,7 +591,7 @@
+ }
+
+ //delete removed items (= "in-sync") from database
+- std::erase_if(dbFiles, [&](const InSyncFolder::FileList::value_type& v)
++ eraseIf(dbFiles, [&](const InSyncFolder::FileList::value_type& v)
+ {
+ if (contains(toPreserve, v.first))
+ return false;
+@@ -628,7 +628,7 @@
+ }
+
+ //delete removed items (= "in-sync") from database
+- std::erase_if(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v)
++ eraseIf(dbSymlinks, [&](const InSyncFolder::SymlinkList::value_type& v)
+ {
+ if (contains(toPreserve, v.first))
+ return false;
+@@ -663,7 +663,7 @@
+ }
+
+ //delete removed items (= "in-sync") from database
+- std::erase_if(dbFolders, [&](InSyncFolder::FolderList::value_type& v)
++ eraseIf(dbFolders, [&](InSyncFolder::FolderList::value_type& v)
+ {
+ if (auto it = toPreserve.find(v.first); it != toPreserve.end())
+ {
+@@ -687,10 +687,10 @@
+ //delete all entries for removed folder (= "in-sync") from database
+ void dbSetEmptyState(InSyncFolder& dbFolder, const Zstring& parentRelPathPf)
+ {
+- std::erase_if(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); });
+- std::erase_if(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); });
++ eraseIf(dbFolder.files, [&](const InSyncFolder::FileList ::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); });
++ eraseIf(dbFolder.symlinks, [&](const InSyncFolder::SymlinkList::value_type& v) { return filter_.passFileFilter(parentRelPathPf + v.first); });
+
+- std::erase_if(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v)
++ eraseIf(dbFolder.folders, [&](InSyncFolder::FolderList::value_type& v)
+ {
+ const Zstring& itemRelPath = parentRelPathPf + v.first;
+
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 10.18-2/FreeFileSync/Source/base/dir_lock.cpp
+--- 10.18-1/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 16:15:55.836668213 -0500
++++ 10.18-2/FreeFileSync/Source/base/dir_lock.cpp 2019-11-20 17:57:30.559558395 -0500
+@@ -502,8 +502,8 @@
+
+ void tidyUp() //remove obsolete entries
+ {
+- std::erase_if(locksByGuid_, [](const auto& v) { return !v.second.lock(); });
+- std::erase_if(guidByPath_, [&](const auto& v) { return !contains(locksByGuid_, v.second); });
++ eraseIf(locksByGuid_, [](const auto& v) { return !v.second.lock(); });
++ eraseIf(guidByPath_, [&](const auto& v) { return locksByGuid_.find(v.second) == locksByGuid_.end(); });
+ }
+
+ std::map<Zstring, UniqueId> guidByPath_; //lockFilePath |-> GUID; n:1; locks can be referenced by a lockFilePath or alternatively a GUID
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp
+--- 10.18-1/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 16:15:55.820668033 -0500
++++ 10.18-2/FreeFileSync/Source/RealTimeSync/config.cpp 2019-11-20 17:57:30.559558395 -0500
+@@ -155,7 +155,7 @@
+ checkXmlMappingErrors(in, filePath); //throw FileError
+ //---------------------------------------------------------------------------------------
+
+- std::erase_if(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); });
++ eraseIf(uniqueFolders, [](const Zstring& str) { return trimCpy(str).empty(); });
+ cfg.directories.assign(uniqueFolders.begin(), uniqueFolders.end());
+ cfg.commandline = Zstr('"') + fff::getFreeFileSyncLauncherPath() + Zstr("\" \"") + filePath + Zstr('"');
+ }
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/monitor.cpp
+--- 10.18-1/FreeFileSync/Source/RealTimeSync/monitor.cpp 2019-11-20 16:15:55.822668055 -0500
++++ 10.18-2/FreeFileSync/Source/RealTimeSync/monitor.cpp 2019-11-20 17:57:30.560558406 -0500
+@@ -163,7 +163,7 @@
+ {
+ std::vector<DirWatcher::Entry> changedItems = watcher->getChanges([&] { requestUiUpdate(false /*readyForSync*/); /*throw X*/ },
+ cbInterval); //throw FileError
+- std::erase_if(changedItems, [](const DirWatcher::Entry& e)
++ eraseIf(changedItems, [](const DirWatcher::Entry& e)
+ {
+ return
+ endsWith(e.itemPath, Zstr(".ffs_tmp")) || //sync.8ea2.ffs_tmp
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp
+--- 10.18-1/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 16:15:55.822668055 -0500
++++ 10.18-2/FreeFileSync/Source/RealTimeSync/tray_menu.cpp 2019-11-20 17:57:30.560558406 -0500
+@@ -247,7 +247,7 @@
+ rts::AbortReason rts::runFolderMonitor(const XmlRealConfig& config, const wxString& jobname)
+ {
+ std::vector<Zstring> dirNamesNonFmt = config.directories;
+- std::erase_if(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet!
++ eraseIf(dirNamesNonFmt, [](const Zstring& str) { return trimCpy(str).empty(); }); //remove empty entries WITHOUT formatting paths yet!
+
+ if (dirNamesNonFmt.empty())
+ {
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp
+--- 10.18-1/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 16:15:55.847668337 -0500
++++ 10.18-2/FreeFileSync/Source/ui/cfg_grid.cpp 2019-11-20 17:57:30.561558418 -0500
+@@ -113,7 +113,7 @@
+ {
+ const std::set<Zstring, LessNativePath> pathsSorted(filePaths.begin(), filePaths.end());
+
+- std::erase_if(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); });
++ eraseIf(cfgListView_, [&](auto it) { return pathsSorted.find(it->first) != pathsSorted.end(); });
+
+ for (const Zstring& filePath : filePaths)
+ cfgList_.erase(filePath);
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/command_box.cpp 10.18-2/FreeFileSync/Source/ui/command_box.cpp
+--- 10.18-1/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:54:14.861345102 -0500
++++ 10.18-2/FreeFileSync/Source/ui/command_box.cpp 2019-11-20 17:57:30.561558418 -0500
+@@ -75,7 +75,7 @@
+ equalNoCase(newCommand, cmd))
+ return;
+
+- std::erase_if(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); });
++ eraseIf(history_, [&](const Zstring& item) { return equalNoCase(newCommand, item); });
+
+ history_.insert(history_.begin(), newCommand);
+
+@@ -194,7 +194,7 @@
+ //this->SetSelection(wxNOT_FOUND);
+
+ //delete selected row
+- std::erase_if(history_, [&](const Zstring& item) { return item == selValue; });
++ eraseIf(history_, [&](const Zstring& item) { return item == selValue; });
+
+ SetString(pos, wxString()); //in contrast to Delete(), this one does not kill the drop-down list and gives a nice visual feedback!
+ //Delete(pos);
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/file_view.cpp 10.18-2/FreeFileSync/Source/ui/file_view.cpp
+--- 10.18-1/FreeFileSync/Source/ui/file_view.cpp 2019-11-20 16:15:55.849668360 -0500
++++ 10.18-2/FreeFileSync/Source/ui/file_view.cpp 2019-11-20 17:57:30.562558429 -0500
+@@ -253,7 +253,7 @@
+ rowPositionsFirstChild_.clear();
+
+ //remove rows that have been deleted meanwhile
+- std::erase_if(sortedRef_, [&](const RefIndex& refIdx) { return !FileSystemObject::retrieve(refIdx.objId); });
++ eraseIf(sortedRef_, [&](const RefIndex& refIdx) { return !FileSystemObject::retrieve(refIdx.objId); });
+ }
+
+
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 10.18-2/FreeFileSync/Source/ui/folder_history_box.h
+--- 10.18-1/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 16:15:55.849668360 -0500
++++ 10.18-2/FreeFileSync/Source/ui/folder_history_box.h 2019-11-20 17:57:30.562558429 -0500
+@@ -41,7 +41,7 @@
+ const Zstring nameTmp = zen::trimCpy(folderPathPhrase);
+
+ //insert new folder or put it to the front if already existing
+- std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); });
++ zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, nameTmp); });
+
+ folderPathPhrases_.insert(folderPathPhrases_.begin(), nameTmp);
+
+@@ -49,7 +49,7 @@
+ folderPathPhrases_.resize(maxSize_);
+ }
+
+- void delItem(const Zstring& folderPathPhrase) { std::erase_if(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); }
++ void delItem(const Zstring& folderPathPhrase) { zen::eraseIf(folderPathPhrases_, [&](const Zstring& item) { return equalNoCase(item, folderPathPhrase); }); }
+
+ private:
+ size_t maxSize_ = 0;
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 10.18-2/FreeFileSync/Source/ui/log_panel.cpp
+--- 10.18-1/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 16:15:55.852668394 -0500
++++ 10.18-2/FreeFileSync/Source/ui/log_panel.cpp 2019-11-20 17:57:30.562558429 -0500
+@@ -545,7 +545,7 @@
+ if (auto prov = m_gridMessages->getDataProvider())
+ {
+ std::vector<Grid::ColAttributes> colAttr = m_gridMessages->getColumnConfig();
+- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
+ if (!colAttr.empty())
+ for (size_t row : m_gridMessages->getSelectedRows())
+ {
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp
+--- 10.18-1/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:54:16.135359512 -0500
++++ 10.18-2/FreeFileSync/Source/ui/main_dlg.cpp 2019-11-20 17:57:30.564558452 -0500
+@@ -1240,7 +1240,7 @@
+ if (auto prov = grid->getDataProvider())
+ {
+ std::vector<Grid::ColAttributes> colAttr = grid->getColumnConfig();
+- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
+ if (!colAttr.empty())
+ for (size_t row : grid->getSelectedRows())
+ {
+@@ -5372,9 +5372,9 @@
+ auto colAttrCenter = m_gridMainC->getColumnConfig();
+ auto colAttrRight = m_gridMainR->getColumnConfig();
+
+- std::erase_if(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; });
+- std::erase_if(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; });
+- std::erase_if(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; });
++ eraseIf(colAttrLeft, [](const Grid::ColAttributes& ca) { return !ca.visible; });
++ eraseIf(colAttrCenter, [](const Grid::ColAttributes& ca) { return !ca.visible || static_cast<ColumnTypeCenter>(ca.type) == ColumnTypeCenter::CHECKBOX; });
++ eraseIf(colAttrRight, [](const Grid::ColAttributes& ca) { return !ca.visible; });
+
+ if (provLeft && provCenter && provRight)
+ {
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 10.18-2/FreeFileSync/Source/ui/search_grid.cpp
+--- 10.18-1/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 16:15:55.855668428 -0500
++++ 10.18-2/FreeFileSync/Source/ui/search_grid.cpp 2019-11-20 17:57:30.564558452 -0500
+@@ -69,7 +69,7 @@
+ if (auto prov = grid.getDataProvider())
+ {
+ std::vector<Grid::ColAttributes> colAttr = grid.getColumnConfig();
+- std::erase_if(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
++ eraseIf(colAttr, [](const Grid::ColAttributes& ca) { return !ca.visible; });
+ if (!colAttr.empty())
+ {
+ const MatchFound<respectCase> matchFound(searchString);
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp
+--- 10.18-1/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 16:15:55.858668462 -0500
++++ 10.18-2/FreeFileSync/Source/ui/tree_grid.cpp 2019-11-20 17:57:30.565558463 -0500
+@@ -601,7 +601,7 @@
+ folderCmp_ = newData;
+
+ //remove truly empty folder pairs as early as this: we want to distinguish single/multiple folder pair cases by looking at "folderCmp"
+- std::erase_if(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj)
++ eraseIf(folderCmp_, [](const std::shared_ptr<BaseFolderPair>& baseObj)
+ {
+ return AFS::isNullPath(baseObj->getAbstractPath< LEFT_SIDE>()) &&
+ AFS::isNullPath(baseObj->getAbstractPath<RIGHT_SIDE>());
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/wx+/async_task.h 10.18-2/wx+/async_task.h
+--- 10.18-1/wx+/async_task.h 2019-11-20 16:15:55.860668484 -0500
++++ 10.18-2/wx+/async_task.h 2019-11-20 17:57:30.565558463 -0500
+@@ -85,7 +85,7 @@
+
+ std::vector<std::unique_ptr<Task>> readyTasks; //Reentrancy; access to AsyncTasks::add is not protected! => evaluate outside eraseIf
+
+- std::erase_if(tasks_, [&](std::unique_ptr<Task>& task)
++ eraseIf(tasks_, [&](std::unique_ptr<Task>& task)
+ {
+ if (task->resultReady())
+ {
+diff -x '*.swp' -x .git -x '*.orig' -x '*.rej' -Naur 10.18-1/zen/stl_tools.h 10.18-2/zen/stl_tools.h
+--- 10.18-1/zen/stl_tools.h 2019-11-20 16:15:55.875668653 -0500
++++ 10.18-2/zen/stl_tools.h 2019-11-20 17:58:20.801126674 -0500
+@@ -20,6 +20,16 @@
+ //enhancements for <algorithm>
+ namespace zen
+ {
++//erase selected elements from any container:
++template <class T, class Alloc, class Predicate>
++void eraseIf(std::vector<T, Alloc>& v, Predicate p);
++
++template <class T, class LessType, class Alloc, class Predicate>
++void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p);
++
++template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate>
++void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p);
++
+ //append STL containers
+ template <class T, class Alloc, class C>
+ void append(std::vector<T, Alloc>& v, const C& c);
+@@ -115,6 +125,36 @@
+
+
+ //######################## implementation ########################
++
++template <class T, class Alloc, class Predicate> inline
++void eraseIf(std::vector<T, Alloc>& v, Predicate p)
++{
++ v.erase(std::remove_if(v.begin(), v.end(), p), v.end());
++}
++
++
++namespace impl
++{
++template <class S, class Predicate> inline
++void setOrMapEraseIf(S& s, Predicate p)
++{
++ for (auto it = s.begin(); it != s.end();)
++ if (p(*it))
++ s.erase(it++);
++ else
++ ++it;
++}
++}
++
++
++template <class T, class LessType, class Alloc, class Predicate> inline
++void eraseIf(std::set<T, LessType, Alloc>& s, Predicate p) { impl::setOrMapEraseIf(s, p); } //don't make this any more generic! e.g. must not compile for std::vector!!!
++
++
++template <class KeyType, class ValueType, class LessType, class Alloc, class Predicate> inline
++void eraseIf(std::map<KeyType, ValueType, LessType, Alloc>& m, Predicate p) { impl::setOrMapEraseIf(m, p); }
++
++
+ template <class T, class Alloc, class C> inline
+ void append(std::vector<T, Alloc>& v, const C& c) { v.insert(v.end(), c.begin(), c.end()); }
+
diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch
index e6069d4..92b5372 100644
--- a/freefilesync/ffs_no_wx311.patch
+++ b/freefilesync/ffs_no_wx311.patch
@@ -28,19 +28,18 @@ diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp
else
diff -Naur 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp
--- 10.13-0/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:23:07.615661499 -0400
-+++ 10.13-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-06-14 20:26:56.794422701 -0400
-@@ -75,8 +75,9 @@
- Zstring cfgFolderPath;
- //OS standard path (XDG layout): ~/.config/FreeFileSync
- //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag
-- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
-- cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync";
-+ // Fedora does not have wxGTK 3.1.1 which is the dev branch.
-+ //wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
-+ cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync";
++++ 10.18-1/FreeFileSync/Source/base/ffs_paths.cpp 2019-11-20 08:55:38.553446634 -0500
+@@ -80,8 +80,8 @@
+ //OS standard path (XDG layout): ~/.config/FreeFileSync
+ //wxBug: wxStandardPaths::GetUserDataDir() does not honor FileLayout_XDG flag
+- wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
+- const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + "FreeFileSync";
++ // Many distros do not have wxGTK 3.1.1 which is the dev branch.
++ const Zstring cfgFolderPath = appendSeparator(utfTo<Zstring>(wxStandardPaths::Get().GetUserConfigDir())) + appendSeparator(utfTo<Zstring>(".config")) + "FreeFileSync";
- std::call_once(onceFlagCreateCfgPath, [&]
+ try //create the config folder if not existing + create "Logs" subfolder while we're at it
+ {
diff --git a/FreeFileSync/Source/ui/command_box.cpp b/FreeFileSync/Source/ui/command_box.cpp
index 6e769bb..ce6110b 100644
--- a/FreeFileSync/Source/ui/command_box.cpp
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
index ce183fa..3ed654a 100644
--- a/freefilesync/freefilesync.spec
+++ b/freefilesync/freefilesync.spec
@@ -7,8 +7,8 @@
%define scl_env %{nil}
%define scl_buildreq coreutils
%if 0%{?el6}%{?el7}
- %define scl_env devtoolset-8
- %define scl_buildreq devtoolset-8-toolchain
+ %define scl_env devtoolset-7
+ %define scl_buildreq devtoolset-7-toolchain
%define min_libcurl >= 7.64.0
%define min_libssh2 >= 1.8.0
%define min_openssl >= 1.1.1c
@@ -18,8 +18,8 @@
%define libssh2_name libssh2-%{name}
%endif
Name: freefilesync
-Version: 10.17
-Release: 1%{?dist}
+Version: 10.18
+Release: 2%{?dist}
Summary: A file synchronization utility
Group: Applications/File
@@ -40,6 +40,7 @@ Patch5: ffs_el.patch
Patch6: ffs_libssh2.patch
Patch7: ffs_curl.patch
Patch8: ffs_bit.patch
+Patch9: ffs_no_eraseif.patch
Packager: B Stack <bgstack15@gmail.com>
# WARNING: the build will FAIL if you have wxGTK3-devel installed. Only wxGTK2-devel should be on the build system.
@@ -97,6 +98,7 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
%patch7 -p1
%if 0%{?el6}%{?el7}%{?el8}%{?fc29}
%patch8 -p1
+%patch9 -p1
%endif
# custom build parameters for packaging application in rpm
@@ -200,6 +202,12 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml
%changelog
+* Thu Nov 21 2019 B Stack <bgstack15@gmail.com> - 10.18-2
+- el and fc29 reverted to devtoolset-7, -std=c++17, and some older internal logic
+
+* Wed Nov 20 2019 B Stack <bgstack15@gmail.com> - 10.18-1
+- version bump
+
* Wed Oct 23 2019 B Stack <bgstack15@gmail.com> - 10.17-1
- version bump
- el7 uses devtoolset-8 for c++2a support
bgstack15