summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--freefilesync/ffs_fedora.patch24
-rw-r--r--freefilesync/ffs_icon_loader.patch15
-rw-r--r--freefilesync/ffs_no_gcc12.patch72
-rw-r--r--freefilesync/ffs_no_wx311.patch79
-rw-r--r--freefilesync/ffs_traditional_view.patch4
-rw-r--r--freefilesync/freefilesync.spec10
6 files changed, 188 insertions, 16 deletions
diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch
index 4b883cb..d54110b 100644
--- a/freefilesync/ffs_fedora.patch
+++ b/freefilesync/ffs_fedora.patch
@@ -82,3 +82,27 @@ diff -x '*.swp' -x '.git*' -x '*.orig' -x '*.rej' -Naur 10.19-0/FreeFileSync/Sou
build += SPACED_BULLET;
build += utfTo<wxString>(formatTime(formatDateTag, getCompileTime()));
+Message: Fix some sloppiness by Zenju.
+diff -Naur -x '*.orig' -x '*.rej' -x .git 11.21-0/FreeFileSync/Source/application.cpp 11.21-1/FreeFileSync/Source/application.cpp
+--- 11.21-0/FreeFileSync/Source/application.cpp 2022-05-22 17:09:32.234809499 -0400
++++ 11.21-1/FreeFileSync/Source/application.cpp 2022-05-24 08:36:51.949159500 -0400
+@@ -92,7 +92,7 @@
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
+
+ ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider,
+- (getResourceDirPf() + fileName).c_str(), //const gchar* path,
++ (getResourceDirPath() + fileName).c_str(), //const gchar* path,
+ &error); //GError** error
+ if (error)
+ throw SysError(formatGlibError("gtk_css_provider_load_from_path", error));
+--- 11.21-0/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-22 17:09:32.226809398 -0400
++++ 11.21-1/FreeFileSync/Source/RealTimeSync/application.cpp 2022-05-25 09:15:00.262617987 -0400
+@@ -68,7 +68,7 @@
+ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error));
+
+ ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider,
+- (fff::getResourceDirPf() + fileName).c_str(), //const gchar* path,
++ (fff::getResourceDirPath() + fileName).c_str(), //const gchar* path,
+ &error); //GError** error
+ if (error)
+ throw SysError(formatGlibError("gtk_css_provider_load_from_path", error));
diff --git a/freefilesync/ffs_icon_loader.patch b/freefilesync/ffs_icon_loader.patch
index 2575ec5..14035d5 100644
--- a/freefilesync/ffs_icon_loader.patch
+++ b/freefilesync/ffs_icon_loader.patch
@@ -1,20 +1,21 @@
Summary: Solve libglib2.0 problem in sketchy manner
-Date: 2021-09-22
-Version: 11.14
+Date: 2022-05-24
+Version: 11.21
Author: bgstack15
Message:
Warning! I have absolutely no idea what I am doing. Check https://freefilesync.org/forum/viewtopic.php?t=8780 for future developments.
In Devuan Ceres, starting in 2021-08 with libglib2.0-0=2.68.3-2 the file icon_loader.cpp fails to compile. By removing the static_cast, this file can compile. The built application throws all sorts of GLib-GObject-CRITICIAL messages but the application operates.
Downgrade to "deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20210801T144205Z/ unstable main non-free contrib" in /etc/apt/sources.list and install the exact libglib version necessary to compile without this patch.
$ sudo apt-get -V install libglib2.0-0=2.66.8-1 libglib2.0-bin=2.66.8-1 libglib2.0-data=2.66.8-1 libglib2.0-dev=2.66.8-1 libglib2.0-dev-bin=2.66.8-1 libglib2.0-0:i386=2.66.8-1
---- 11.13-0/FreeFileSync/Source/base/icon_loader.cpp 2021-09-22 07:35:40.991208133 -0400
-+++ 11.14-0/FreeFileSync/Source/base/icon_loader.cpp 2021-09-22 14:40:10.981215352 -0400
+Zenju tried addressing this for me, but it still does not compile, even with g++-12. So I still have to omit this macro call.
+--- 11.21-0/FreeFileSync/Source/base/icon_loader.cpp 2022-05-22 17:09:32.234809499 -0400
++++ 11.21-1/FreeFileSync/Source/base/icon_loader.cpp 2022-05-24 08:59:15.433965993 -0400
@@ -216,7 +216,7 @@
//the remaining icon types won't block!
assert(GDK_IS_PIXBUF(gicon) || G_IS_THEMED_ICON(gicon) || G_IS_EMBLEMED_ICON(gicon));
-- return FileIconHolder(static_cast<GIcon*>(::g_object_ref(gicon)) /*pass ownership*/, maxSize);
-+ return FileIconHolder(gicon /*pass ownership*/, maxSize);
+- ::g_object_ref(gicon); //pass ownership
++ //::g_object_ref(gicon); //pass ownership
+ return FileIconHolder(gicon, maxSize); //
}
-
diff --git a/freefilesync/ffs_no_gcc12.patch b/freefilesync/ffs_no_gcc12.patch
new file mode 100644
index 0000000..88b0d27
--- /dev/null
+++ b/freefilesync/ffs_no_gcc12.patch
@@ -0,0 +1,72 @@
+Message: Because we do not use gcc 12, we have an error with unordered_map and std::pair.
+Author: zensubz
+Date-Modified: 2022-05-24
+Version: 11.21
+--- a/FreeFileSync/Source/base/db_file.cpp
++++ b/FreeFileSync/Source/base/db_file.cpp
+@@ -642,7 +642,7 @@
+
+ void process(const ContainerObject::FolderList& currentFolders, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders)
+ {
+- std::unordered_map<ZstringNorm, const FolderPair*> toPreserve;
++ std::map<ZstringNorm, const FolderPair*> toPreserve;
+
+ for (const FolderPair& folder : currentFolders)
+ if (!folder.isPairEmpty())
+--- a/FreeFileSync/Source/base/db_file.h
++++ b/FreeFileSync/Source/base/db_file.h
+@@ -67,9 +67,9 @@
+ InSyncStatus status = DIR_STATUS_STRAW_MAN;
+
+ //------------------------------------------------------------------
+- using FolderList = std::unordered_map<ZstringNorm, InSyncFolder >; //
+- using FileList = std::unordered_map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
+- using SymlinkList = std::unordered_map<ZstringNorm, InSyncSymlink>; //
++ using FolderList = std::map<ZstringNorm, InSyncFolder >; //
++ using FileList = std::map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
++ using SymlinkList = std::map<ZstringNorm, InSyncSymlink>; //
+ //------------------------------------------------------------------
+
+ FolderList folders;
+--- a/FreeFileSync/Source/base/file_hierarchy.h
++++ b/FreeFileSync/Source/base/file_hierarchy.h
+@@ -7,12 +7,14 @@
+ #ifndef FILE_HIERARCHY_H_257235289645296
+ #define FILE_HIERARCHY_H_257235289645296
+
++#include <map>
+ #include <string>
+ #include <memory>
+ #include <list>
+ #include <functional>
+ #include <unordered_set>
+-#include <unordered_map>
++#include <zen/zstring.h>
++#include <zen/stl_tools.h>
+ #include "structures.h"
+ #include "path_filter.h"
+ #include "../afs/abstract.h"
+@@ -94,9 +96,9 @@
+ //------------------------------------------------------------------
+ //key: raw file name, without any (Unicode) normalization, preserving original upper-/lower-case
+ //"Changing data [...] to NFC would cause interoperability problems. Always leave data as it is."
+- using FolderList = std::unordered_map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
+- using FileList = std::unordered_map<Zstring, FileAttributes>;
+- using SymlinkList = std::unordered_map<Zstring, LinkAttributes>;
++ using FolderList = std::map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
++ using FileList = std::map<Zstring, FileAttributes>;
++ using SymlinkList = std::map<Zstring, LinkAttributes>;
+ //------------------------------------------------------------------
+
+ FolderContainer() = default;
+--- a/zen/json.h
++++ b/zen/json.h
+@@ -41,7 +41,7 @@
+
+ Type type = Type::null;
+ std::string primVal; //for primitive types
+- std::unordered_map<std::string, JsonValue> objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine!
++ std::map<std::string, JsonValue> objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine!
+ std::vector<JsonValue> arrayVal;
+ };
+
diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch
index 1671e4c..e74da90 100644
--- a/freefilesync/ffs_no_wx311.patch
+++ b/freefilesync/ffs_no_wx311.patch
@@ -1,10 +1,10 @@
-Last modified: 2022-04-18
-Version: 11.20
+Last modified: 2022-05-24
+Version: 11.21
Author: bgstack15
Message: Just compile by stepping around wxWidgets 3.1.1 calls
diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp
--- 11.4-0/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 08:15:29.432156507 -0500
-+++ 11.4-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 18:22:19.929543356 -0500
++++ 11.21-1/FreeFileSync/Source/ui/small_dlgs.cpp 2020-12-08 18:22:19.929543356 -0500
@@ -300,7 +300,8 @@
{
showNotificationDialog(this, DialogInfoType::error, PopupDialogCfg().setDetailInstructions(e.toString()));
@@ -15,6 +15,16 @@ diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/ui/small_dl
//set default values for Google Drive: use first item of m_listBoxGdriveUsers
if (!gdriveAccounts.empty() && !acceptsItemPathPhraseGdrive(folderPathPhrase))
+@@ -1292,7 +1298,8 @@
+ for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_)
+ dialogMessages.push_back(msg);
+
+- m_checkListHiddenDialogs->Append(dialogMessages);
++ for (const wxString& item :dialogMessages) // reverted to pre-wx 3.1.1 logic
++ m_checkListHiddenDialogs->Append(item);
+
+ unsigned int itemPos = 0;
+ for (const auto& [dlgShown, dlgSetShown, msg] : hiddenDialogCfgMapping_)
@@ -1689,7 +1690,6 @@
//setMainInstructionFont(*m_staticTextMain);
@@ -63,3 +73,66 @@ diff -x '*.rej' -x '*.orig' -x '*.git*' -Naur 10.24-0/FreeFileSync/Source/ui/fol
//this->SetSelection(wxNOT_FOUND); //don't select anything
ChangeValue(folderPathPhrase); //preserve main text!
+--- 11.21-0/FreeFileSync/Source/config.cpp 2022-05-22 17:09:32.238809549 -0400
++++ 11.21-1/FreeFileSync/Source/config.cpp 2022-05-24 08:41:55.360955076 -0400
+@@ -1502,13 +1512,13 @@
+ if (lngName == "English (US)")
+ cfg.programLanguage = wxLANGUAGE_ENGLISH_US;
+ else if (lngName == "Chinese (Simplified)")
+- cfg.programLanguage = wxLANGUAGE_CHINESE_CHINA;
++ cfg.programLanguage = wxLANGUAGE_CHINESE_SIMPLIFIED;
+ else if (lngName == "Chinese (Traditional)")
+ cfg.programLanguage = wxLANGUAGE_CHINESE_TAIWAN;
+ else if (lngName == "English (U.K.)")
+ cfg.programLanguage = wxLANGUAGE_ENGLISH_UK;
+ else if (lngName == "Norwegian (Bokmal)")
+- cfg.programLanguage = wxLANGUAGE_NORWEGIAN;
++ cfg.programLanguage = wxLANGUAGE_NORWEGIAN_BOKMAL;
+ else if (lngName == "Portuguese (Brazilian)")
+ cfg.programLanguage = wxLANGUAGE_PORTUGUESE_BRAZILIAN;
+ else if (const wxLanguageInfo* lngInfo = wxLocale::FindLanguageInfo(utfTo<wxString>(lngName)))
+--- 11.21-0/FreeFileSync/Source/localization.cpp 2022-05-22 17:09:32.238809549 -0400
++++ 11.21-1/FreeFileSync/Source/localization.cpp 2022-05-24 08:48:56.398222091 -0400
+@@ -195,19 +195,19 @@
+ if (lngCode == "zh")
+ {
+ if (lng == wxLANGUAGE_CHINESE) //wxWidgets assigns this to "zh" or "zh_TW" for some reason
+- return wxLANGUAGE_CHINESE_CHINA;
++ return wxLANGUAGE_CHINESE_SIMPLIFIED;
+
+ for (const char* l : {"zh_HK", "zh_MO", "zh_TW"})
+ if (locale == l)
+ return wxLANGUAGE_CHINESE_TAIWAN;
+
+- return wxLANGUAGE_CHINESE_CHINA;
++ return wxLANGUAGE_CHINESE_SIMPLIFIED;
+ }
+
+ if (lngCode == "en")
+ {
+ if (lng == wxLANGUAGE_ENGLISH || //wxWidgets assigns this to "en" or "en_GB" for some reason
+- lng == wxLANGUAGE_ENGLISH_WORLD)
++ lng == wxLANGUAGE_ENGLISH_EIRE)
+ return wxLANGUAGE_ENGLISH_US;
+
+ for (const char* l : {"en_US", "en_CA", "en_AS", "en_UM", "en_VI"})
+@@ -218,7 +218,7 @@
+ }
+
+ if (lngCode == "nb" || lngCode == "nn") //wxLANGUAGE_NORWEGIAN_BOKMAL, wxLANGUAGE_NORWEGIAN_NYNORSK
+- return wxLANGUAGE_NORWEGIAN;
++ return wxLANGUAGE_NORWEGIAN_BOKMAL;
+
+ if (locale == "pt_BR")
+ return wxLANGUAGE_PORTUGUESE_BRAZILIAN;
+--- 11.21-0/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-22 17:09:32.246809650 -0400
++++ 11.21-1/FreeFileSync/Source/ui/main_dlg.cpp 2022-05-24 09:29:32.384695364 -0400
+@@ -1759,7 +1753,7 @@
+ if (statusTxts_.empty())
+ {
+ m_staticTextStatusCenter->SetForegroundColour(highlight ? wxColor(31, 57, 226) /*blue*/ : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+- m_staticTextStatusCenter->SetFont((m_staticTextStatusCenter->GetFont().*(highlight ? &wxFont::Bold : &wxFont::GetBaseFont))());
++ m_staticTextStatusCenter->SetFont(m_staticTextStatusCenter->GetFont().Bold());
+
+ setText(*m_staticTextStatusCenter, text);
+ m_panelStatusBar->Layout();
diff --git a/freefilesync/ffs_traditional_view.patch b/freefilesync/ffs_traditional_view.patch
index aeeb9b2..e0cf0d2 100644
--- a/freefilesync/ffs_traditional_view.patch
+++ b/freefilesync/ffs_traditional_view.patch
@@ -1,5 +1,5 @@
Version: 11.21
-Date: 2022-05-22
+Date: 2022-05-24
Author: bgstack15@gmail.com
Message: restore a traditional view to FreeFileSync
diff -x '*.orig' -x '*.rej' -aur 11.3-0/FreeFileSync/Source/ui/file_grid.cpp 11.3-1/FreeFileSync/Source/ui/file_grid.cpp
@@ -85,7 +85,7 @@ diff -x '*.orig' -x '*.rej' -aur 11.3-0/FreeFileSync/Source/ui/file_grid.cpp 11.
+ if (!endsWith(groupParentFolder, L'/' ) && //e.g. ftp://server/
+ !endsWith(groupParentFolder, L'\\') && /*e.g. C:\ */
+ groupParentFolder.size() > 0 )
-+ groupParentFolder += groupParentSep;
++ groupParentFolder += contains(groupParentFolder, L'/') ? L'/' : (contains(groupParentFolder, L'\\') ? L'\\' : FILE_NAME_SEPARATOR);
+ break;
+ case ItemPathFormat::name:
+ case ItemPathFormat::relative:
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
index 9ffa82f..5c6bfb8 100644
--- a/freefilesync/freefilesync.spec
+++ b/freefilesync/freefilesync.spec
@@ -46,7 +46,8 @@ Patch10: revert_zenju_aggressive_upstreamisms.patch
Patch11: ffs_traditional_view.patch
Patch12: ffs_desktop_notifications.patch
Patch13: ffs_openssl.patch
-#Patch14: ffs_icon_loader.patch
+Patch14: ffs_icon_loader.patch
+Patch15: ffs_no_gcc12.patch
Packager: B. Stack <bgstack15@gmail.com>
BuildRequires: brotli-devel
@@ -113,7 +114,8 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
# Patch13 openssl is only for openssl < 3.0.0
%patch13 -p1
%endif
-#%%patch14 -p1
+%patch14 -p1
+%patch15 -p1
# custom build parameters for packaging application in rpm
# fedora provides build_cxxflags, which is really just optflags
@@ -217,9 +219,9 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml
%changelog
-* Sun May 22 2022 B. Stack <bgstack15@gmail.com> - 11.21-1
+* Wed May 25 2022 B. Stack <bgstack15@gmail.com> - 11.21-1
- version bump
-- remove icon_loader patch (fixed by upstream)
+- add ffs_no_gcc12 patch
* Mon Apr 18 2022 B. Stack <bgstack15@gmail.com> - 11.20-1
- version bump
bgstack15