diff options
-rw-r--r-- | freefilesync/ffs_curl.patch | 4 | ||||
-rw-r--r-- | freefilesync/ffs_el.patch | 42 | ||||
-rw-r--r-- | freefilesync/ffs_fedora.patch | 40 | ||||
-rw-r--r-- | freefilesync/ffs_no_check_updates.patch | 2 | ||||
-rw-r--r-- | freefilesync/ffs_no_wx311.patch | 39 | ||||
-rw-r--r-- | freefilesync/ffs_sftp.patch | 27 | ||||
-rw-r--r-- | freefilesync/freefilesync.spec | 14 | ||||
-rw-r--r-- | freefilesync/revert_zenju_aggressive_upstreamisms.patch | 275 |
8 files changed, 362 insertions, 81 deletions
diff --git a/freefilesync/ffs_curl.patch b/freefilesync/ffs_curl.patch index fee8b13..ec038d7 100644 --- a/freefilesync/ffs_curl.patch +++ b/freefilesync/ffs_curl.patch @@ -22,8 +22,8 @@ diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/a Message: For Fedora <= 30 that has curl < 7.66.0 you need this patch. diff -Naur 10.20-0/libcurl/curl_wrap.h 10.20-1/libcurl/curl_wrap.h -[bgirton@fc31x-01a|/usr/src/freefilesync]$ diff -x '*.swp' -x '*.rej' -x '*.orig' -Naur 10.22-[01]/libcurl/curl_wrap.h--- 10.22-0/libcurl/curl_wrap.h 2020-03-18 15:49:57.839901161 -0400 -+++ 10.22-1/libcurl/curl_wrap.h 2020-03-18 15:56:21.034499900 -0400 +--- 10.22-0/libcurl/curl_wrap.h 2020-03-18 15:49:57.839901161 -0400 ++++ 10.22-1/libcurl/curl_wrap.h 2020-03-18 15:56:21.034499900 -0400 @@ -134,12 +134,7 @@ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM); diff --git a/freefilesync/ffs_el.patch b/freefilesync/ffs_el.patch index 2df678e..4611e5e 100644 --- a/freefilesync/ffs_el.patch +++ b/freefilesync/ffs_el.patch @@ -19,27 +19,27 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/Makefil --- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -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 +-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++17 -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread - CXXFLAGS += `pkg-config --cflags openssl` + cxxFlags += `pkg-config --cflags openssl` @@ -17,6 +17,7 @@ - LINKFLAGS += `pkg-config --libs 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` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + cxxFlags += -isystem/usr/include/gtk-2.0 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 @@ -57,23 +57,23 @@ diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.11-0/FreeFileSync/Source/RealTim --- 10.11-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-04-12 07:59:45.008146336 -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 +-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++17 -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 --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -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` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + cxxFlags += -isystem/usr/include/gtk-2.0 diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.19-1/FreeFileSync/Source/ui/small_dlgs.cpp --- 10.22-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 15:49:57.837901137 -0400 @@ -82,7 +82,7 @@ diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Sou build += L"64 Bit"; #endif -+ build += L" for CentOS 7/Fedora 29"; ++ build += L" for CentOS"; + build += SPACED_BULLET; build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime())); diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch index a82ccad..82787ea 100644 --- a/freefilesync/ffs_fedora.patch +++ b/freefilesync/ffs_fedora.patch @@ -15,45 +15,45 @@ diff -Naur 10.11-0/FreeFileSync/Source/Makefile 10.11-1/FreeFileSync/Source/Make --- 10.11-0/FreeFileSync/Source/Makefile 2019-04-12 07:59:45.042147902 -0400 +++ 10.11-1/FreeFileSync/Source/Makefile 2019-04-12 08:27:42.062542410 -0400 @@ -1,10 +1,10 @@ --EXENAME = FreeFileSync_$(shell arch) -+EXENAME = FreeFileSync +-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" \ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread - CXXFLAGS += `pkg-config --cflags openssl` -@@ -17,6 +17,7 @@ CXXFLAGS += `pkg-config --cflags libssh2` - LINKFLAGS += `pkg-config --libs libssh2` + cxxFlags += `pkg-config --cflags openssl` +@@ -17,6 +17,7 @@ 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` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + cxxFlags += -isystem/usr/include/gtk-2.0 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 @@ -1,13 +1,14 @@ --EXENAME = RealTimeSync_$(shell arch) -+EXENAME = RealTimeSync +-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" \ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread --LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread -+LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread +-linkFlags = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread ++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` ++linkFlags += `pkg-config --libs gtk+-2.0` #treat as system headers so that warnings are hidden: - CXXFLAGS += -isystem/usr/include/gtk-2.0 + cxxFlags += -isystem/usr/include/gtk-2.0 diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.19-1/FreeFileSync/Source/ui/small_dlgs.cpp --- 10.22-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-03-18 15:49:57.837901137 -0400 @@ -62,7 +62,7 @@ diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Sou build += L"64 Bit"; #endif -+ build += L" for Devuan"; ++ build += L" for Fedora"; + build += SPACED_BULLET; build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime())); diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch index bb54677..1ef4148 100644 --- a/freefilesync/ffs_no_check_updates.patch +++ b/freefilesync/ffs_no_check_updates.patch @@ -78,7 +78,7 @@ diff --exclude '*.orig' -Naur 10.14-0/FreeFileSync/Source/ui/version_check.cpp 1 + // showUpdateAvailableDialog(parent, onlineVersion); + //else showNotificationDialog(parent, DialogInfoType::info, PopupDialogCfg(). - setIcon(getResourceImage(L"update_check")). + setIcon(getResourceImage("update_check")). setTitle(_("Check for Program Updates")). - setMainInstructions(_("FreeFileSync is up to date."))); + setMainInstructions(_("Use your package manager for any updates to FreeFileSync."))); diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch index f3afae0..f617122 100644 --- a/freefilesync/ffs_no_wx311.patch +++ b/freefilesync/ffs_no_wx311.patch @@ -5,7 +5,7 @@ diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Sou @@ -1546,7 +1546,7 @@ //setMainInstructionFont(*m_staticTextMain); - m_bitmapActivation->SetBitmap(getResourceImage(L"internet")); + m_bitmapActivation->SetBitmap(getResourceImage("internet")); - m_textCtrlOfflineActivationKey->ForceUpper(); + //m_textCtrlOfflineActivationKey->ForceUpper(); @@ -39,32 +39,29 @@ diff -Naur 10.13-0/FreeFileSync/Source/ffs_paths.cpp 10.13-1/FreeFileSync/Source 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 -+++ b/FreeFileSync/Source/ui/command_box.cpp -@@ -130,7 +130,9 @@ void CommandBox::setValueAndUpdateList(const wxString& value) - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/command_box.cpp 10.24-1/FreeFileSync/Source/ui/command_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:01:12.893890567 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/command_box.cpp 2020-05-17 11:22:18.069114993 -0400 +@@ -120,7 +120,8 @@ + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(items); -+ for (const wxString& item : items) +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& item : items) // reverted to pre-wx 3.1.1 logic + this->Append(item); -+ - + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(value); //preserve main text! -diff --git a/FreeFileSync/Source/ui/folder_history_box.cpp b/FreeFileSync/Source/ui/folder_history_box.cpp -index 2b824b1..a17ea2f 100644 ---- a/FreeFileSync/Source/ui/folder_history_box.cpp -+++ b/FreeFileSync/Source/ui/folder_history_box.cpp -@@ -90,7 +90,8 @@ void FolderHistoryBox::setValueAndUpdateList(const wxString& folderPathPhrase) - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp +--- 10.24-0/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:01:12.909890709 -0400 ++++ 10.24-1/FreeFileSync/Source/ui/folder_history_box.cpp 2020-05-17 11:21:18.460583251 -0400 +@@ -90,7 +90,8 @@ + //this->Clear(); -> NO! emits yet another wxEVT_COMMAND_TEXT_UPDATED!!! wxItemContainer::Clear(); //suffices to clear the selection items only! -- this->Append(dirList); -+ for (const wxString& dir : dirList) -+ this->Append(dir); - +- this->Append(items); //expensive as fuck! => only call when absolutely needed! ++ for (const wxString& itemk : items) // reverted to pre-wx 3.1.1 logic ++ this->Append(itemk); + //this->SetSelection(wxNOT_FOUND); //don't select anything ChangeValue(folderPathPhrase); //preserve main text! diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch index c30b09c..09e6655 100644 --- a/freefilesync/ffs_sftp.patch +++ b/freefilesync/ffs_sftp.patch @@ -3,20 +3,21 @@ Author: B Stack Message: The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile. Date: 2019-02-11T12:15:59Z https://github.com/libssh2/libssh2/issues/90 -diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/afs/sftp.cpp 10.9-1/FreeFileSync/Source/afs/sftp.cpp ---- 10.9-0/FreeFileSync/Source/afs/sftp.cpp 2019-02-10 16:42:29.139040980 -0500 -+++ 10.9-1/FreeFileSync/Source/afs/sftp.cpp 2019-02-10 21:28:00.030732089 -0500 -@@ -56,9 +56,10 @@ - +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/afs/sftp.cpp 10.24-1/FreeFileSync/Source/afs/sftp.cpp +--- 10.24-0/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:01:12.821889929 -0400 ++++ 10.24-1/FreeFileSync/Source/afs/sftp.cpp 2020-05-17 11:37:50.229446467 -0400 +@@ -63,10 +63,10 @@ + LIBSSH2_SFTP_S_IROTH | LIBSSH2_SFTP_S_IXOTH; + //attention: if operation fails due to time out, e.g. file copy, the cleanup code may hang, too => total delay = 2 x time out interval - --const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 --const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * MAX_SFTP_OUTGOING_SIZE; // +- +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * MAX_SFTP_READ_SIZE; //https://github.com/libssh2/libssh2/issues/90 +-const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * MAX_SFTP_OUTGOING_SIZE; // -static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); +// these values are all manually derived from https://github.com/libssh2/libssh2/blob/master/src/sftp.h which for some weak reason are not included in the libssh2-devel headers. -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 4 * 30000; //https://github.com/libssh2/libssh2/issues/90 -+const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 4 * 30000; // ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_READ = 8 * 30000; //https://github.com/libssh2/libssh2/issues/90 ++const size_t SFTP_OPTIMAL_BLOCK_SIZE_WRITE = 8 * 30000; // +//static_assert(MAX_SFTP_READ_SIZE == 30000 && MAX_SFTP_OUTGOING_SIZE == 30000, "reevaluate optimal block sizes if these constants change!"); - /* - Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: - + + /* Perf Test, Sourceforge frs, SFTP upload, compressed 25 MB test file: + diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 6b28b26..914c333 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -1,6 +1,7 @@ %global pkgname FreeFileSync %global prog2name RealTimeSync %global dummy_package 0 +%define debug_package %{nil} %define min_libcurl %{nil} %define min_libssh2 %{nil} %define min_openssl %{nil} @@ -18,7 +19,7 @@ %define libssh2_name libssh2-%{name} %endif Name: freefilesync -Version: 10.23 +Version: 10.24 Release: 1%{?dist} Summary: A file synchronization utility @@ -41,6 +42,7 @@ Patch6: ffs_libssh2.patch Patch7: ffs_curl.patch Patch8: ffs_bit.patch Patch9: ffs_no_eraseif.patch +Patch10: revert_zenju_aggressive_upstreamisms.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. @@ -91,7 +93,7 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ # use the el patch %patch5 -p1 %else -# use the fedora patch +# use the fedora patch, even for el8 %patch4 -p1 %endif %patch6 -p1 @@ -100,12 +102,13 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ %patch8 -p1 %patch9 -p1 %endif +%patch10 -p1 # custom build parameters for packaging application in rpm # fedora provides build_cxxflags, which is really just optflags %{__sed} \ -e 's|-O3 -DNDEBUG|-DNDEBUG -D"warn_static(arg)= " -DZEN_LINUX %{?build_cxxflags:%{build_cxxflags}}%{!?build_cxxflags:%{optflags}}|g' \ - -e '/LINKFLAGS/s|-s|%{__global_ldflags}|;' \ + -e '/linkFlags/s|-s|%{__global_ldflags}|;' \ -i %{pkgname}/Source/Makefile %{pkgname}/Source/%{prog2name}/Makefile %build @@ -202,6 +205,11 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & : %ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml %changelog +* Mon May 18 2020 B Stack <bgstack15@gmail.com> - 10.24-1 +- version bump +- add revert_zenju_aggressive_upstreamisms.patch +- disable debug package + * Tue Apr 21 2020 B Stack <bgstack15@gmail.com> - 10.23-1 - version bump - remove ffs_libssl.patch diff --git a/freefilesync/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/revert_zenju_aggressive_upstreamisms.patch new file mode 100644 index 0000000..0da4e06 --- /dev/null +++ b/freefilesync/revert_zenju_aggressive_upstreamisms.patch @@ -0,0 +1,275 @@ +Author: Ben Stack <bgstack15@gmail.com> +Date: 2020-05-17 14:11 -0400 +Message: Use the following command to get this old contents. Zenju must be using some newer definition of -std=c++2a than what Devuan Ceres provides as of 2020-05-17, and probably wxwidgets. This is the 10.23 code for these files. + + git checkout b4ecf755 zen/legacy_compiler.h zen/string_base.h wx+/choice_enum.h + +Unfortunately with the removal of the wxWidgets-gtk2 code from Debian, we are stuck using all available at approximately November 1, 2019 snapshot of Debian: https://snapshot.debian.org/archive/debian/20191101T211023Z/pool/main/w/wxwidgets3.0/ +libwxbase3.0-0v5_3.0.4+dfsg-14_amd64.deb +libwxbase3.0-0v5_3.0.4+dfsg-14_i386.deb +libwxbase3.0-dev_3.0.4+dfsg-14_amd64.deb +libwxbase3.0-dev_3.0.4+dfsg-14_i386.deb +libwxgtk3.0-0v5_3.0.4+dfsg-14_amd64.deb +libwxgtk3.0-0v5_3.0.4+dfsg-14_i386.deb +libwxgtk3.0-dev_3.0.4+dfsg-14_amd64.deb +libwxgtk3.0-dev_3.0.4+dfsg-14_i386.deb +wx3.0-headers_3.0.4+dfsg-14_all.deb +wx-common_3.0.4+dfsg-14_amd64.deb +wx-common_3.0.4+dfsg-14_i386.deb +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/zen/legacy_compiler.h 10.24-1/zen/legacy_compiler.h +--- 10.24-0/zen/legacy_compiler.h 2020-05-17 13:44:27.542140458 -0400 ++++ 10.24-1/zen/legacy_compiler.h 2020-05-17 14:07:49.115166339 -0400 +@@ -7,9 +7,6 @@ + #ifndef LEGACY_COMPILER_H_839567308565656789 + #define LEGACY_COMPILER_H_839567308565656789 + +- #include <numbers> //C++20 +- +- #include <span> //requires C++20 + + + +@@ -21,8 +18,53 @@ + + //--------------------------------------------------------------------------------- + ++#if __cpp_lib_span ++ #error get rid of workaround: ++#endif ++ ++template <class T> ++class span ++{ ++public: ++ template <class Iterator> ++ span(Iterator first, Iterator last) : size_(last - first), data_(first != last ? &*first : nullptr) {} ++ ++ template <class Container> ++ span(Container& cont) : span(cont.begin(), cont.end()) {} ++ ++ using iterator = T*; ++ using const_iterator = const T*; ++ ++ iterator begin() { return data_; } ++ iterator end () { return data_ + size_; } ++ ++ const_iterator begin() const { return data_; } ++ const_iterator end () const { return data_ + size_; } + ++ const_iterator cbegin() const { return begin(); } ++ const_iterator cend () const { return end (); } + ++ T* data() const { return data_; } ++ size_t size() const { return size_; } ++ bool empty() const { return size_ == 0; } ++ ++private: ++ const size_t size_; ++ T* const data_; ++}; ++ ++ ++#if __cpp_lib_math_constants ++ #error get rid of workaround: ++#endif ++ ++namespace numbers ++{ ++const double pi = 3.14159265358979323846; ++const double e = 2.71828182845904523536; ++const double sqrt2 = 1.41421356237309504880; ++const double ln2 = 0.693147180559945309417; ++} + } + + +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/zen/string_base.h 10.24-1/zen/string_base.h +--- 10.24-0/zen/string_base.h 2020-05-17 13:44:27.554140569 -0400 ++++ 10.24-1/zen/string_base.h 2020-05-17 14:09:44.164244361 -0400 +@@ -12,7 +12,9 @@ + #include <cstdint> + #include <atomic> + #include "string_tools.h" ++#if __cpp_impl_three_way_comparison && __cpp_lib_three_way_comparison + #include <compare> ++#endif + + + //Zbase - a policy based string class optimizing performance and flexibility +@@ -293,15 +295,29 @@ + }; + + ++#if __cpp_impl_three_way_comparison && __cpp_lib_three_way_comparison ++ #error implement! ++#endif ++ + + template <class Char, template <class> class SP> bool operator==(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs); + template <class Char, template <class> class SP> bool operator==(const Zbase<Char, SP>& lhs, const Char* rhs); + template <class Char, template <class> class SP> inline bool operator==(const Char* lhs, const Zbase<Char, SP>& rhs) { return operator==(rhs, lhs); } + ++#if __cpp_impl_three_way_comparison && __cpp_lib_three_way_comparison + template <class Char, template <class> class SP> std::strong_ordering operator<=>(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs); + template <class Char, template <class> class SP> std::strong_ordering operator<=>(const Zbase<Char, SP>& lhs, const Char* rhs); + template <class Char, template <class> class SP> std::strong_ordering operator<=>(const Char* lhs, const Zbase<Char, SP>& rhs); + ++#else ++template <class Char, template <class> class SP> inline bool operator!=(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs) { return !operator==(lhs, rhs); } ++template <class Char, template <class> class SP> inline bool operator!=(const Zbase<Char, SP>& lhs, const Char* rhs) { return !operator==(lhs, rhs); } ++template <class Char, template <class> class SP> inline bool operator!=(const Char* lhs, const Zbase<Char, SP>& rhs) { return !operator==(lhs, rhs); } ++ ++template <class Char, template <class> class SP> bool operator<(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs); ++template <class Char, template <class> class SP> bool operator<(const Zbase<Char, SP>& lhs, const Char* rhs); ++template <class Char, template <class> class SP> bool operator<(const Char* lhs, const Zbase<Char, SP>& rhs); ++#endif + + template <class Char, template <class> class SP> inline Zbase<Char, SP> operator+(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs) { return Zbase<Char, SP>(lhs) += rhs; } + template <class Char, template <class> class SP> inline Zbase<Char, SP> operator+(const Zbase<Char, SP>& lhs, const Char* rhs) { return Zbase<Char, SP>(lhs) += rhs; } +@@ -482,11 +498,12 @@ + } + + ++#if __cpp_impl_three_way_comparison && __cpp_lib_three_way_comparison + template <class Char, template <class> class SP> inline + std::strong_ordering operator<=>(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs) + { +- return std::lexicographical_compare_three_way(lhs.begin(), lhs.end(), //respect embedded 0 +- rhs.begin(), rhs.end()); // ++ return std::lexicographical_compare_three_way(lhs.begin(), lhs.end(), //respect embedded 0 ++ rhs.begin(), rhs.end()); + } + + +@@ -501,11 +518,35 @@ + template <class Char, template <class> class SP> inline + std::strong_ordering operator<=>(const Char* lhs, const Zbase<Char, SP>& rhs) + { +- return std::lexicographical_compare_three_way(lhs, lhs + strLength(lhs), +- rhs.begin(), rhs.end()); //respect embedded 0 ++ return std::lexicographical_compare_three_way(lhs, lhs + strLength(lhs), //respect embedded 0 ++ rhs.begin(), rhs.end()); ++} ++ ++#else ++template <class Char, template <class> class SP> inline ++bool operator<(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs) ++{ ++ return std::lexicographical_compare(lhs.begin(), lhs.end(), //respect embedded 0 ++ rhs.begin(), rhs.end()); + } + + ++template <class Char, template <class> class SP> inline ++bool operator<(const Zbase<Char, SP>& lhs, const Char* rhs) ++{ ++ return std::lexicographical_compare(lhs.begin(), lhs.end(), //respect embedded 0 ++ rhs, rhs + strLength(rhs)); ++} ++ ++ ++template <class Char, template <class> class SP> inline ++bool operator<(const Char* lhs, const Zbase<Char, SP>& rhs) ++{ ++ return std::lexicographical_compare(lhs, lhs + strLength(lhs), //respect embedded 0 ++ rhs.begin(), rhs.end()); ++} ++#endif ++ + + template <class Char, template <class> class SP> inline + size_t Zbase<Char, SP>::length() const +diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/wx+/choice_enum.h 10.24-1/wx+/choice_enum.h +--- 10.24-0/wx+/choice_enum.h 2020-05-17 18:30:59.441499418 -0400 ++++ 10.24-1/wx+/choice_enum.h 2020-05-17 18:53:59.893685507 -0400 +@@ -7,7 +7,6 @@ + #ifndef CHOICE_ENUM_H_132413545345687 + #define CHOICE_ENUM_H_132413545345687 + +-#include <unordered_map> + #include <vector> + #include <wx/choice.h> + +@@ -44,11 +43,8 @@ + descrList.push_back({ value, { text, tooltip } }); + return *this; + } +- + using DescrList = std::vector<std::pair<Enum, std::pair<wxString, wxString>>>; + DescrList descrList; +- +- std::unordered_map<const wxChoice*, std::vector<wxString>> itemsSetLast; + }; + template <class Enum> void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value); + template <class Enum> Enum getEnumVal(const EnumDescrList<Enum>& mapping, const wxChoice& ctrl); +@@ -69,34 +65,26 @@ + + //--------------- impelementation ------------------------------------------- + template <class Enum> +-void setEnumVal(EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) ++void setEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl, Enum value) + { +- auto& itemsSetLast = mapping.itemsSetLast[&ctrl]; ++ ctrl.Clear(); + +- std::vector<wxString> items; ++ int selectedPos = 0; + for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) +- items.push_back(it->second.first); +- +- if (items != itemsSetLast) + { +- ctrl.Set(items); //expensive as fuck! => only call when absolutely needed! +- itemsSetLast = std::move(items); ++ ctrl.Append(it->second.first); ++ if (it->first == value) ++ { ++ selectedPos = it - mapping.descrList.begin(); ++ ++ if (it->second.second.empty()) ++ ctrl.UnsetToolTip(); ++ else ++ ctrl.SetToolTip(it->second.second); ++ } + } +- //----------------------------------------------------------------- +- +- const auto it = std::find_if(mapping.descrList.begin(), mapping.descrList.end(), [&](const auto& mapItem) { return mapItem.first == value; }); +- if (it != mapping.descrList.end()) +- { +- if (const wxString& tooltip = it->second.second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); + +- const int selectedPos = it - mapping.descrList.begin(); +- ctrl.SetSelection(selectedPos); +- } +- else assert(false); ++ ctrl.SetSelection(selectedPos); + } + + template <class Enum> +@@ -115,17 +103,11 @@ + + template <class Enum> void updateTooltipEnumVal(const EnumDescrList<Enum>& mapping, wxChoice& ctrl) + { +- const int selectedPos = ctrl.GetSelection(); ++ const Enum currentValue = getEnumVal(mapping, ctrl); + +- if (0 <= selectedPos && selectedPos < static_cast<int>(mapping.descrList.size())) +- { +- if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; +- !tooltip.empty()) +- ctrl.SetToolTip(tooltip); +- else +- ctrl.UnsetToolTip(); +- } +- else assert(false); ++ for (const auto& [enumValue, textAndTooltip] : mapping.descrList) ++ if (currentValue == enumValue) ++ ctrl.SetToolTip(textAndTooltip.second); + } + } + |