From 50470fbc44d3f1dd8b0420ce95b1d4b54cb10af9 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 09:51:03 -0400 Subject: ffs: on devuan use g++-12 and fix new wx3.1.1 stuff --- freefilesync/debian/control | 2 +- freefilesync/debian/patches/ffs_devuan.patch | 12 +++- freefilesync/debian/patches/ffs_gcc.patch | 10 +-- freefilesync/debian/patches/ffs_icon_loader.patch | 15 ++-- freefilesync/debian/patches/ffs_no_wx311.patch | 79 +++++++++++++++++++++- .../debian/patches/ffs_traditional_view.patch | 4 +- 6 files changed, 103 insertions(+), 19 deletions(-) diff --git a/freefilesync/debian/control b/freefilesync/debian/control index 9301bd0..f200bc3 100644 --- a/freefilesync/debian/control +++ b/freefilesync/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: B. Stack Build-Depends: debhelper (>=12~), imagemagick, - g++-11, + g++-12, libbrotli-dev, libcurl4-openssl-dev (>=7.82.0), libglibmm-2.4-dev, diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index fc4db2d..30ae71c 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -61,4 +61,14 @@ diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/RealTimeSyn #Gtk - support "no button border" cxxFlags += `pkg-config --cflags gtk+-2.0` - +--- 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 +@@ -93,7 +93,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)); diff --git a/freefilesync/debian/patches/ffs_gcc.patch b/freefilesync/debian/patches/ffs_gcc.patch index dd9e628..e5a5a96 100644 --- a/freefilesync/debian/patches/ffs_gcc.patch +++ b/freefilesync/debian/patches/ffs_gcc.patch @@ -1,13 +1,13 @@ -Date: 2022-04-18 -Version: 11.20 -Message: Parameterize the C++ compiler invocation +Date: 2022-05-24 +Version: 11.21 +Message: Parameterize the C++ compiler invocation, and use g++-12 Author: bgstack15 diff -aur 11.2-1/FreeFileSync/Source/Makefile 11.2-2/FreeFileSync/Source/Makefile --- 11.2-1/FreeFileSync/Source/Makefile 2020-10-02 14:59:35.816639878 -0400 +++ 11.2-2/FreeFileSync/Source/Makefile 2020-10-02 14:59:54.220866929 -0400 @@ -1,4 +1,5 @@ exeName = FreeFileSync -+CXX=g++-11 ++CXX=g++-12 cxxFlags += -std=c++2b -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 -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ @@ -30,7 +30,7 @@ diff -aur 11.2-1/FreeFileSync/Source/RealTimeSync/Makefile 11.2-2/FreeFileSync/S +++ 11.2-2/FreeFileSync/Source/RealTimeSync/Makefile 2020-10-02 14:59:54.220866929 -0400 @@ -1,4 +1,5 @@ exeName = RealTimeSync -+CXX=g++-11 ++CXX=g++-12 cxxFlags += -std=c++2b -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 -Wnon-virtual-dtor -Wno-unused-function -Wshadow -Wno-maybe-uninitialized \ diff --git a/freefilesync/debian/patches/ffs_icon_loader.patch b/freefilesync/debian/patches/ffs_icon_loader.patch index 2575ec5..14035d5 100644 --- a/freefilesync/debian/patches/ffs_icon_loader.patch +++ b/freefilesync/debian/patches/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(::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/debian/patches/ffs_no_wx311.patch b/freefilesync/debian/patches/ffs_no_wx311.patch index 1671e4c..e74da90 100644 --- a/freefilesync/debian/patches/ffs_no_wx311.patch +++ b/freefilesync/debian/patches/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(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/debian/patches/ffs_traditional_view.patch b/freefilesync/debian/patches/ffs_traditional_view.patch index aeeb9b2..e0cf0d2 100644 --- a/freefilesync/debian/patches/ffs_traditional_view.patch +++ b/freefilesync/debian/patches/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: -- cgit From 93100b161a5334dced2ab9c7c09fa6d7d2c3a5c0 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 14:14:29 -0400 Subject: ffs: fix g++ in dsc --- freefilesync/debian/freefilesync+devuan.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freefilesync/debian/freefilesync+devuan.dsc b/freefilesync/debian/freefilesync+devuan.dsc index e43b7f0..5faccb6 100644 --- a/freefilesync/debian/freefilesync+devuan.dsc +++ b/freefilesync/debian/freefilesync+devuan.dsc @@ -6,7 +6,7 @@ Version: 11.21-1+devuan Maintainer: B. Stack Homepage: https://freefilesync.org/ Standards-Version: 4.1.4 -Build-Depends: debhelper (>= 12~), g++-11, imagemagick, libbrotli-dev, libcurl4-openssl-dev (>= 7.82.0), libglibmm-2.4-dev, libssh2-1-dev, libssl-dev, wx3.0-headers, unzip, libgtk-3-dev, libwxgtk3.0-gtk3-dev, libfontconfig-dev +Build-Depends: debhelper (>= 12~), g++-12, imagemagick, libbrotli-dev, libcurl4-openssl-dev (>= 7.82.0), libglibmm-2.4-dev, libssh2-1-dev, libssl-dev, wx3.0-headers, unzip, libgtk-3-dev, libwxgtk3.0-gtk3-dev, libfontconfig-dev Package-List: freefilesync deb utils optional arch=any Files: -- cgit From e74fadd284712b8959bb94cefb231caa5db477fd Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 14:35:22 -0400 Subject: ffs: dpkg read icon_loader --- freefilesync/debian/patches/series | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freefilesync/debian/patches/series b/freefilesync/debian/patches/series index e3c2763..92dd680 100644 --- a/freefilesync/debian/patches/series +++ b/freefilesync/debian/patches/series @@ -11,4 +11,4 @@ ffs_gcc.patch ffs_traditional_view.patch ffs_desktop_notifications.patch ffs_openssl.patch -#ffs_icon_loader.patch +ffs_icon_loader.patch -- cgit From 0a6d36120d3b494f06a1ab4ccc7d7c09bffa70d1 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 16:24:50 -0400 Subject: ffs: dpkg update deps --- freefilesync/debian/control | 6 +++--- freefilesync/debian/freefilesync+devuan.dsc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/freefilesync/debian/control b/freefilesync/debian/control index f200bc3..9baed3d 100644 --- a/freefilesync/debian/control +++ b/freefilesync/debian/control @@ -6,10 +6,10 @@ Build-Depends: debhelper (>=12~), imagemagick, g++-12, libbrotli-dev, - libcurl4-openssl-dev (>=7.82.0), + libcurl4-openssl-dev (>=7.83.1-1+b1), libglibmm-2.4-dev, - libssh2-1-dev, - libssl-dev, + libssh2-1-dev (>=1.10.0-3+b1), + libssl-dev (>=3.0.3-5), wx3.0-headers, unzip, # gtk3 version, and these must be removed for gtk2 build diff --git a/freefilesync/debian/freefilesync+devuan.dsc b/freefilesync/debian/freefilesync+devuan.dsc index 5faccb6..5bbdf84 100644 --- a/freefilesync/debian/freefilesync+devuan.dsc +++ b/freefilesync/debian/freefilesync+devuan.dsc @@ -6,7 +6,7 @@ Version: 11.21-1+devuan Maintainer: B. Stack Homepage: https://freefilesync.org/ Standards-Version: 4.1.4 -Build-Depends: debhelper (>= 12~), g++-12, imagemagick, libbrotli-dev, libcurl4-openssl-dev (>= 7.82.0), libglibmm-2.4-dev, libssh2-1-dev, libssl-dev, wx3.0-headers, unzip, libgtk-3-dev, libwxgtk3.0-gtk3-dev, libfontconfig-dev +Build-Depends: debhelper (>= 12~), g++-12, imagemagick, libbrotli-dev, libcurl4-openssl-dev (>= 7.83.1-1+b1), libglibmm-2.4-dev, libssh2-1-dev (>= 1.10.0-3+b1), libssl-dev (>= 3.0.3-5), wx3.0-headers, unzip, libgtk-3-dev, libwxgtk3.0-gtk3-dev, libfontconfig-dev Package-List: freefilesync deb utils optional arch=any Files: -- cgit From 27d0b74d44680947d66708b2cf41b687c90da028 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 16:41:25 -0400 Subject: ffs: dpkg disable ssl patch --- freefilesync/debian/patches/series | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freefilesync/debian/patches/series b/freefilesync/debian/patches/series index 92dd680..467d69a 100644 --- a/freefilesync/debian/patches/series +++ b/freefilesync/debian/patches/series @@ -10,5 +10,5 @@ revert_zenju_aggressive_upstreamisms.patch ffs_gcc.patch ffs_traditional_view.patch ffs_desktop_notifications.patch -ffs_openssl.patch +#ffs_openssl.patch ffs_icon_loader.patch -- cgit From 7de07324b3f11de2fd2987c841fd5c30a50183c7 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Tue, 24 May 2022 21:35:56 -0400 Subject: try to address ffs_devuan.patch --- freefilesync/debian/patches/ffs_devuan.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index 30ae71c..b17f50e 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -61,9 +61,10 @@ diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/RealTimeSyn #Gtk - support "no button border" cxxFlags += `pkg-config --cflags gtk+-2.0` +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 -@@ -93,7 +93,7 @@ +@@ -92,7 +92,7 @@ ZEN_ON_SCOPE_EXIT(if (error) ::g_error_free(error)); ::gtk_css_provider_load_from_path(provider, //GtkCssProvider* css_provider, -- cgit From f216fbf91648dff55f125cfda7348c0a15092b2c Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 25 May 2022 09:19:36 -0400 Subject: ffs: add patch for rts app.cpp --- freefilesync/debian/patches/ffs_devuan.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index b17f50e..5726b87 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -61,6 +61,7 @@ diff -Naur -x '*.orig' -x '*.rej' -x .git 11.4-0/FreeFileSync/Source/RealTimeSyn #Gtk - support "no button border" cxxFlags += `pkg-config --cflags gtk+-2.0` +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 @@ -73,3 +74,14 @@ diff -Naur -x '*.orig' -x '*.rej' -x .git 11.21-0/FreeFileSync/Source/applicatio &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)); -- cgit From 0dc6cb5d87d30c851ff292fd1d033c9ea5fb68a2 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 25 May 2022 13:49:34 -0400 Subject: ffs: rpm rc2 --- freefilesync/ffs_fedora.patch | 24 ++++++++++ freefilesync/ffs_icon_loader.patch | 15 ++++--- freefilesync/ffs_no_gcc12.patch | 72 ++++++++++++++++++++++++++++++ freefilesync/ffs_no_wx311.patch | 79 +++++++++++++++++++++++++++++++-- freefilesync/ffs_traditional_view.patch | 4 +- freefilesync/freefilesync.spec | 10 +++-- 6 files changed, 188 insertions(+), 16 deletions(-) create mode 100644 freefilesync/ffs_no_gcc12.patch 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(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(::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 toPreserve; ++ std::map 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; // +- using FileList = std::unordered_map; // key: file name (ignoring Unicode normal forms) +- using SymlinkList = std::unordered_map; // ++ using FolderList = std::map; // ++ using FileList = std::map; // key: file name (ignoring Unicode normal forms) ++ using SymlinkList = std::map; // + //------------------------------------------------------------------ + + 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 + #include + #include + #include + #include + #include +-#include ++#include ++#include + #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>; +- using FileList = std::unordered_map; +- using SymlinkList = std::unordered_map; ++ using FolderList = std::map>; ++ using FileList = std::map; ++ using SymlinkList = std::map; + //------------------------------------------------------------------ + + 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 objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine! ++ std::map objectVal; //"[...] most implementations of JSON libraries do not accept duplicate keys [...]" => fine! + std::vector 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(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 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 - 11.21-1 +* Wed May 25 2022 B. Stack - 11.21-1 - version bump -- remove icon_loader patch (fixed by upstream) +- add ffs_no_gcc12 patch * Mon Apr 18 2022 B. Stack - 11.20-1 - version bump -- cgit From c2daca42dfabe0840d5a6f54395a2c6830bde95d Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 25 May 2022 14:49:34 -0400 Subject: disable package note file --- freefilesync/freefilesync.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 5c6bfb8..76d9c4b 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -18,6 +18,11 @@ %if 0%{?rhel} >= 8 %define libssh2_name libssh2-%{name} %endif +%if 0%{?fedora} >= 36 +# https://www.spinics.net/lists/fedora-devel/msg296646.html +# https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects +%undefine _package_note_file +%endif Name: freefilesync Version: 11.21 Release: 1%{?dist} -- cgit