From d339c145870a86c37509debe5d8fa145e192f390 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Fri, 9 Feb 2024 21:09:54 -0500 Subject: ffs: major refresh on top of bastif dpkg --- freefilesync/debian/patches/ffs_curl.patch | 44 --- freefilesync/debian/patches/ffs_devuan.patch | 49 ++- freefilesync/debian/patches/ffs_devuan_gtk3.patch | 4 +- freefilesync/debian/patches/ffs_libssh2.patch | 22 -- freefilesync/debian/patches/ffs_no_wx311.patch | 138 ------- freefilesync/debian/patches/ffs_openssl.patch | 52 --- .../libcurl_improve_supported_error_codes.patch | 116 ++++++ .../debian/patches/libssh2_relax_dep.patch | 27 ++ .../debian/patches/makefile-improvements.patch | 110 ++++++ .../revert_zenju_aggressive_upstreamisms.patch | 399 --------------------- freefilesync/debian/patches/series | 10 +- 11 files changed, 301 insertions(+), 670 deletions(-) delete mode 100644 freefilesync/debian/patches/ffs_curl.patch delete mode 100644 freefilesync/debian/patches/ffs_libssh2.patch delete mode 100644 freefilesync/debian/patches/ffs_no_wx311.patch delete mode 100644 freefilesync/debian/patches/ffs_openssl.patch create mode 100644 freefilesync/debian/patches/libcurl_improve_supported_error_codes.patch create mode 100644 freefilesync/debian/patches/libssh2_relax_dep.patch create mode 100644 freefilesync/debian/patches/makefile-improvements.patch delete mode 100644 freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch (limited to 'freefilesync/debian/patches') diff --git a/freefilesync/debian/patches/ffs_curl.patch b/freefilesync/debian/patches/ffs_curl.patch deleted file mode 100644 index 2b93756..0000000 --- a/freefilesync/debian/patches/ffs_curl.patch +++ /dev/null @@ -1,44 +0,0 @@ -Author: Brulhart, bgstack15 -Date: 2021-06-12 10:54:15 -0400 -Message: remove assertion for libcurl version >1.71 -Version: FreeFileSync 11.16 -Message: We have to omit checking for certain definitions. -On Fedora 33, file /usr/include/curl/curl.h from libcurl-devel 7.71 stops with CURLE_QUIC_CONNECT_ERROR 96 -On Devuan Ceres file /usr/include/x86_64-linux-gnu/curl/curl.h from libcurl 4-openssl-dev stops with CURLE_PROXY 97 -For Devuan Ceres libcurl4-openssl-dev 7.74.0-1.3+b1 uses CURLE_TELNET_OPTION_SYNTAX and not CURLE_SETOPT_OPTION_SYNTAX which replaced the first at version 7.78.0 per https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions -diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp ---- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 -+++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 -@@ -635,7 +635,7 @@ - curlRelPath += compFmt; - } - -- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67)); -+ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 71 )); - /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382 - 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332 - => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an -diff -x '*.orig' -x '*.rej' -aur 11.16-0/libcurl/curl_wrap.cpp 11.16-1/libcurl/curl_wrap.cpp ---- 11.16-0/libcurl/curl_wrap.cpp 2022-01-04 08:52:19.603430247 -0500 -+++ 11.16-1/libcurl/curl_wrap.cpp 2022-01-04 09:18:42.877140030 -0500 -@@ -330,7 +330,7 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); -+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); -@@ -378,11 +378,8 @@ - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); - ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); -- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); - ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); - } -- static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); - - return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); - } diff --git a/freefilesync/debian/patches/ffs_devuan.patch b/freefilesync/debian/patches/ffs_devuan.patch index a835ccb..0be089d 100644 --- a/freefilesync/debian/patches/ffs_devuan.patch +++ b/freefilesync/debian/patches/ffs_devuan.patch @@ -1,8 +1,8 @@ Author: bgstack15 Source: Original research -Last-Modified: 2023-07-24 -Last-Version: 12.5 -Message: Main patch to compile on Devuan. +Last-Modified: 2024-02-09 +Last-Version: 13.3 +Message: Main patch to compile on Devuan. Updated with some improvements from bastif (Fab Stz) --- a/FreeFileSync/Source/ffs_paths.cpp +++ b/FreeFileSync/Source/ffs_paths.cpp @@ -54,7 +54,7 @@ Zstring fff::getInstallDirPath() @@ -23,20 +23,43 @@ Message: Main patch to compile on Devuan. CXXFLAGS += -std=c++23 -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 \ - -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread +- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -+LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -lz ++LDFLAGS += `wx-config --libs std, aui, richtext --debug=no` -pthread CXXFLAGS += `pkg-config --cflags openssl` +@@ -28,6 +28,12 @@ CXXFLAGS += `pkg-config --cflags libsel + LDFLAGS += `pkg-config --libs libselinux` + endif + ++ifeq ($(DPKG_VENDOR),) ++#DPKG_VENDOR = $(shell dpkg-vendor --query vendor) ++DPKG_VENDOR = "Devuan" ++CPPFLAGS += -DAPP_NAME_SUFFIX='L" for ${DPKG_VENDOR}"' ++endif ++ + cppFiles= + cppFiles+=application.cpp + cppFiles+=base_tools.cpp +@@ -124,7 +130,7 @@ all: ../Build/Bin/$(exeName) + + $(tmpPath)/ffs/src/%.o : % + mkdir -p $(dir $@) +- $(CXX) $(CXXFLAGS) -c $< -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + + clean: + rm -rf $(tmpPath) --- a/FreeFileSync/Source/ui/small_dlgs.cpp +++ b/FreeFileSync/Source/ui/small_dlgs.cpp @@ -90,6 +90,8 @@ AboutDlg::AboutDlg(wxWindow* parent) : A build += LTR_MARK; //fix Arabic build += utfTo(cpuArchName); -+ build += L" for Devuan"; ++ build += APP_NAME_SUFFIX; + build += SPACED_BULLET; build += utfTo(formatTime(formatDateTag, getCompileTime())); @@ -71,10 +94,20 @@ Message: Main patch to compile on Devuan. CXXFLAGS += -std=c++23 -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 \ - -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread +- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -DNDEBUG `wx-config --cxxflags --debug=no` -pthread -LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -+LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -lz ++LDFLAGS += `wx-config --libs std, aui, richtext --debug=no` -pthread #Gtk - support "no button border" CXXFLAGS += `pkg-config --cflags gtk+-2.0` +@@ -60,7 +60,7 @@ all: ../../Build/Bin/$(exeName) + + $(tmpPath)/ffs/src/rts/%.o : % + mkdir -p $(dir $@) +- $(CXX) $(CXXFLAGS) -c $< -o $@ ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ + + clean: + rm -rf $(tmpPath) diff --git a/freefilesync/debian/patches/ffs_devuan_gtk3.patch b/freefilesync/debian/patches/ffs_devuan_gtk3.patch index c78eb28..8de9a44 100644 --- a/freefilesync/debian/patches/ffs_devuan_gtk3.patch +++ b/freefilesync/debian/patches/ffs_devuan_gtk3.patch @@ -20,8 +20,8 @@ Message: Main patch to compile on Devuan using GTK3. SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) --- a/FreeFileSync/Source/RealTimeSync/Makefile +++ b/FreeFileSync/Source/RealTimeSync/Makefile -@@ -8,9 +8,10 @@ CXXFLAGS += -std=c++2b -pipe -DWXINTL_NO - LDFLAGS += -s -no-pie `wx-config --libs std, aui, richtext --debug=no` -pthread -lz +@@ -8,9 +8,10 @@ CXXFLAGS += -std=c++23 -pipe -DWXINTL_NO + LDFLAGS += `wx-config --libs std, aui, richtext --debug=no` -pthread #Gtk - support "no button border" -CXXFLAGS += `pkg-config --cflags gtk+-2.0` diff --git a/freefilesync/debian/patches/ffs_libssh2.patch b/freefilesync/debian/patches/ffs_libssh2.patch deleted file mode 100644 index 08eb013..0000000 --- a/freefilesync/debian/patches/ffs_libssh2.patch +++ /dev/null @@ -1,22 +0,0 @@ -Source: https://aur.archlinux.org/cgit/aur.git/commit/?h=freefilesync&id=7e1524db8e0243ff9d7b7dcba64a3a5228295725 -Author: Simon Brulhart -Message: libssh2 v1.8.0 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl. -Method: - - sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp' - -Source: -Author: B Stack -Message: libssh2 v1.8.0 does not yet implement these two error messages. I do not know why distros are not serving libssh2 v1.9.0 which wa released June 20, 2019. -Date: 2019-09-17T13:41:23Z ---- a/libssh2/libssh2_wrap.h -+++ b/libssh2/libssh2_wrap.h -@@ -174,8 +174,6 @@ std::wstring formatSshStatusCode(int sc) - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); - ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_RANDGEN); -- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_MISSING_USERAUTH_BANNER); -- ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ALGO_UNSUPPORTED); - - default: - return replaceCpy(L"SSH status %x", L"%x", numberTo(sc)); diff --git a/freefilesync/debian/patches/ffs_no_wx311.patch b/freefilesync/debian/patches/ffs_no_wx311.patch deleted file mode 100644 index e74da90..0000000 --- a/freefilesync/debian/patches/ffs_no_wx311.patch +++ /dev/null @@ -1,138 +0,0 @@ -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.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())); - } -- m_listBoxGdriveUsers->Append(gdriveAccounts); -+ for (const wxString& item : gdriveAccounts) // reverted to pre-wx 3.1.1 logic -+ m_listBoxGdriveUsers->Append(item); - - //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); - - setImage(*m_bitmapActivation, loadImage("internet")); -- m_textCtrlOfflineActivationKey->ForceUpper(); - - setTextWithUrls(*m_richTextLastError, lastErrorMsg); - setTextWithUrls(*m_richTextManualActivationUrl, manualActivationUrl); -diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp ---- 10.3-0/wx+/grid.cpp 2018-08-07 05:03:34.000000000 -0400 -+++ 10.3-2/wx+/grid.cpp 2018-08-08 19:24:56.849445102 -0400 -@@ -1176,7 +1176,9 @@ - { - if (overlapPix != 0) - { -- const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] -+ // Fedora 28 does not have wxGTK 3.1.1 yet. This probably breaks HiDPI usage -+ //const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] -+ const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec] - toScroll += scrollSpeed * deltaSecs; - } - else -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); //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 -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(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! ---- 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_openssl.patch b/freefilesync/debian/patches/ffs_openssl.patch deleted file mode 100644 index 7097d33..0000000 --- a/freefilesync/debian/patches/ffs_openssl.patch +++ /dev/null @@ -1,52 +0,0 @@ -Summary: Compile for libss-dev 1.1.1m -Author: bgstack15 -Date: 2022-01-04 -Version: 11.16 -Message: Compile on Devuan Ceres with libssl-dev_1.1.1m-1 -diff -aur 11.13/zen/open_ssl.cpp 11.14/zen/open_ssl.cpp ---- 11.16-0/zen/open_ssl.cpp 2022-01-04 10:04:34.135914294 -0500 -+++ 11.16-1/zen/open_ssl.cpp 2022-01-04 10:29:12.544451067 -0500 -@@ -201,7 +201,7 @@ - - //================================================================================ - --std::string keyToStream(const EVP_PKEY* evp, RsaStreamType streamType, bool publicKey) //throw SysError -+std::string keyToStream(EVP_PKEY* evp, RsaStreamType streamType, bool publicKey) //throw SysError - { - //assert(::EVP_PKEY_get_base_id(evp) == EVP_PKEY_RSA); - -@@ -210,7 +210,7 @@ - case RsaStreamType::pkix: - { - //fix OpenSSL API inconsistencies: -- auto PEM_write_bio_PrivateKey2 = [](BIO* bio, const EVP_PKEY* key) -+ auto PEM_write_bio_PrivateKey2 = [](BIO* bio, EVP_PKEY* key) - { - return ::PEM_write_bio_PrivateKey(bio, //BIO* bp - key, //const EVP_PKEY* x -@@ -269,7 +269,7 @@ - return {reinterpret_cast(keyBuf), keyLen}; - #else - //fix OpenSSL API inconsistencies: -- auto PEM_write_bio_RSAPrivateKey2 = [](BIO* bio, const RSA* rsa) -+ auto PEM_write_bio_RSAPrivateKey2 = [](BIO* bio, RSA* rsa) - { - return ::PEM_write_bio_RSAPrivateKey(bio, //BIO* bp - rsa, //const RSA* x -@@ -279,14 +279,14 @@ - nullptr, //pem_password_cb* cb - nullptr); //void* u - }; -- auto PEM_write_bio_RSAPublicKey2 = [](BIO* bio, const RSA* rsa) { return ::PEM_write_bio_RSAPublicKey(bio, rsa); }; -+ auto PEM_write_bio_RSAPublicKey2 = [](BIO* bio, RSA* rsa) { return ::PEM_write_bio_RSAPublicKey(bio, rsa); }; - - BIO* bio = ::BIO_new(BIO_s_mem()); - if (!bio) - throw SysError(formatLastOpenSSLError("BIO_new")); - ZEN_ON_SCOPE_EXIT(::BIO_free_all(bio)); - -- const RSA* rsa = ::EVP_PKEY_get0_RSA(evp); //unowned reference! -+ RSA* rsa = ::EVP_PKEY_get0_RSA(evp); //unowned reference! - if (!rsa) - throw SysError(formatLastOpenSSLError("EVP_PKEY_get0_RSA")); - diff --git a/freefilesync/debian/patches/libcurl_improve_supported_error_codes.patch b/freefilesync/debian/patches/libcurl_improve_supported_error_codes.patch new file mode 100644 index 0000000..50d5942 --- /dev/null +++ b/freefilesync/debian/patches/libcurl_improve_supported_error_codes.patch @@ -0,0 +1,116 @@ +Description: extend the versions of libcurl that can be used to build ffs + . + Minimal version supported by this patch is libcurl >= 7.66 + . + FreeFileSync makes an 'assert' that it supports all error codes of the curl + version that it links to. Since FreeFileSync code is shipped to build + with a specific version of curl, there is a hard coded assertion. + . + To avoid a build failure when curl is not in line with the one used upstream + we make conditional checks on the curl version to determine which assertion + should be made. + . + While this works fine to build with any old version of curl > 7.66, there + will be a build fairure as soon as a new error code appears in a newer version + of curl. In that case it is required to add it here. + . + Error codes can be found in the 'enum' named 'CURLcode' at + https://github.com/curl/curl/blob/master/include/curl/curl.h + . +Author: Brulhart +Author: bgstack15 +Author: Fab Stz +Origin: multiple sources +Forwarded: https://freefilesync.org/forum/viewtopic.php?t=9687 +Last-Update: 2024-02-05 + +--- a/libcurl/curl_wrap.cpp ++++ b/libcurl/curl_wrap.cpp +@@ -350,7 +350,11 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); ++#if LIBCURL_VERSION_NUM >= 0x074E00 // 7.78.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); ++#else ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); ++#endif + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); +@@ -363,7 +367,11 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING); ++#if LIBCURL_VERSION_NUM >= 0x075200 // 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62); ++#else ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); ++#endif + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND); +@@ -376,8 +384,16 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_UNKNOWNID); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER); ++#if LIBCURL_VERSION_NUM >= 0x075500 // 7.85.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE75); ++#else ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x075200 // 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76); ++#else ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); ++#endif + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH); +@@ -395,15 +411,46 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RECURSIVE_API_CALL); ++#if LIBCURL_VERSION_NUM >= 0x074200 // 7.66.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x074400 // 7.68.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x074500 // 7.69.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x074900 // 7.73.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x074D00 // 7.77.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x075400 // 7.84.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNRECOVERABLE_POLL); ++#endif ++#if LIBCURL_VERSION_NUM >= 0x080600 // 8.6.0 ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_LARGE); ++#endif + ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); + } ++#if LIBCURL_VERSION_NUM >= 0x080600 // 8.6.0 ++ static_assert(CURL_LAST == CURLE_TOO_LARGE + 1); ++#elif LIBCURL_VERSION_NUM >= 0x075400 // 7.84.0 + static_assert(CURL_LAST == CURLE_UNRECOVERABLE_POLL + 1); ++#elif LIBCURL_VERSION_NUM >= 0x074D00 // 7.77.0 ++ static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); ++#elif LIBCURL_VERSION_NUM >= 0x074900 // 7.73.0 ++ static_assert(CURL_LAST == CURLE_PROXY + 1); ++#elif LIBCURL_VERSION_NUM >= 0x074500 // 7.69.0 ++ static_assert(CURL_LAST == CURLE_QUIC_CONNECT_ERROR + 1); ++#elif LIBCURL_VERSION_NUM >= 0x074400 // 7.68.0 ++ static_assert(CURL_LAST == CURLE_HTTP3 + 1); ++#elif LIBCURL_VERSION_NUM >= 0x074200 // 7.66.0 ++ static_assert(CURL_LAST == CURLE_AUTH_ERROR + 1); ++#else ++ static_assert(CURL_LAST == CURLE_RECURSIVE_API_CALL + 1); ++#endif + + return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); + } diff --git a/freefilesync/debian/patches/libssh2_relax_dep.patch b/freefilesync/debian/patches/libssh2_relax_dep.patch new file mode 100644 index 0000000..3d1249a --- /dev/null +++ b/freefilesync/debian/patches/libssh2_relax_dep.patch @@ -0,0 +1,27 @@ +Description: Allow one to build with older version of libssh2 + Don't fail on missing constants when building with older versions of libssh2 +Author: Fab Stz +Origin: self +Forwarded: not-needed +Last-Update: 2023-06-20 + +--- a/libssh2/libssh2_wrap.h ++++ b/libssh2/libssh2_wrap.h +@@ -171,11 +171,17 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS); ++#if LIBSSH2_VERSION_NUM >= 0x010900 // 1.9.0 + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED); ++#endif ++#if LIBSSH2_VERSION_NUM >= 0x010A00 // 1.10.0 + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_RANDGEN); ++#endif ++#if LIBSSH2_VERSION_NUM >= 0x010B00 // 1.11.0 + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_MISSING_USERAUTH_BANNER); + ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ALGO_UNSUPPORTED); ++#endif + + default: + return replaceCpy(L"SSH status %x", L"%x", numberTo(sc)); diff --git a/freefilesync/debian/patches/makefile-improvements.patch b/freefilesync/debian/patches/makefile-improvements.patch new file mode 100644 index 0000000..e27a107 --- /dev/null +++ b/freefilesync/debian/patches/makefile-improvements.patch @@ -0,0 +1,110 @@ +Description: put pkg-config and wx-config into variables + When cross-compiling on debian, the build system dh set the name of the + pkg-config command name to use into PKG_CONFIG variable. + For armhf, it is PKG_CONFIG=arm-linux-gnueabihf-pkg-config + . + Since the pkg-config that is installed during cross-compiling is the one + of the build-arch (amd64), and not the one of the host-arch (armhf), + using `pkg-config` instead of `arm-linux-gnueabihf-pkg-config` would + prevent detection of the libraries. + . + freefilesync (11.23-1) UNRELEASED; urgency=medium + . + * Initial release. (Closes: #925512) + Also, set wx-config version + Useful when there are multiple versions of wx-config installed on the system + +Author: Fab Stz +Author: bgstack15 +Origin: self +Forwarded: by-email-to-author-on-2022-08-11 +Last-Update: 2024-02-09 + +--- a/FreeFileSync/Source/Makefile ++++ b/FreeFileSync/Source/Makefile +@@ -2,39 +2,45 @@ CXX ?= g++ + exeName = FreeFileSync + CXX=g++-12 + ++PKG_CONFIG=pkgconf ++WX_CONFIG=wx-config --version=3.2 ++ + CXXFLAGS += -std=c++23 -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 \ +- -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -DNDEBUG `$(WX_CONFIG) --cxxflags --debug=no` -pthread ++ ++LDFLAGS += `$(WX_CONFIG) --libs std, aui, richtext --debug=no` -pthread + +-LDFLAGS += `wx-config --libs std, aui, richtext --debug=no` -pthread + ++CXXFLAGS += `$(PKG_CONFIG) --cflags zlib` ++LDFLAGS += `$(PKG_CONFIG) --libs zlib` + +-CXXFLAGS += `pkg-config --cflags openssl` +-LDFLAGS += `pkg-config --libs openssl` ++CXXFLAGS += `$(PKG_CONFIG) --cflags openssl` ++LDFLAGS += `$(PKG_CONFIG) --libs openssl` + +-CXXFLAGS += `pkg-config --cflags libcurl` +-LDFLAGS += `pkg-config --libs libcurl` ++CXXFLAGS += `$(PKG_CONFIG) --cflags libcurl` ++LDFLAGS += `$(PKG_CONFIG) --libs libcurl` + +-CXXFLAGS += `pkg-config --cflags libssh2` +-LDFLAGS += `pkg-config --libs libssh2` ++CXXFLAGS += `$(PKG_CONFIG) --cflags libssh2` ++LDFLAGS += `$(PKG_CONFIG) --libs libssh2` + +-CXXFLAGS += `pkg-config --cflags gtk+-3.0` +-LDFLAGS += `pkg-config --libs gtk+-3.0` ++CXXFLAGS += `$(PKG_CONFIG) --cflags gtk+-3.0` ++LDFLAGS += `$(PKG_CONFIG) --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: + CXXFLAGS += -isystem/usr/include/gtk-3.0 + + with_notifications ?= YES + ifeq ($(with_notifications),YES) + # package libglibmm-2.4-dev or glibmm24-devel +-cxxFlags += `pkg-config --cflags giomm-2.4` -Dwith_notifications +-linkFlags += `pkg-config --libs giomm-2.4` ++cxxFlags += `$(PKG_CONFIG) --cflags giomm-2.4` -Dwith_notifications ++linkFlags += `$(PKG_CONFIG) --libs giomm-2.4` + endif + + #support for SELinux (optional) +-SELINUX_EXISTING=$(shell pkg-config --exists libselinux && echo YES) ++SELINUX_EXISTING=$(shell $(PKG_CONFIG) --exists libselinux && echo YES) + ifeq ($(SELINUX_EXISTING),YES) +-CXXFLAGS += `pkg-config --cflags libselinux` -DHAVE_SELINUX +-LDFLAGS += `pkg-config --libs libselinux` ++CXXFLAGS += `$(PKG_CONFIG) --cflags libselinux` -DHAVE_SELINUX ++LDFLAGS += `$(PKG_CONFIG) --libs libselinux` + endif + + ifeq ($(DPKG_VENDOR),) +--- a/FreeFileSync/Source/RealTimeSync/Makefile ++++ b/FreeFileSync/Source/RealTimeSync/Makefile +@@ -2,15 +2,18 @@ CXX ?= g++ + exeName = RealTimeSync + CXX=g++-12 + ++PKG_CONFIG=pkgconf ++WX_CONFIG=wx-config --version=3.2 ++ + CXXFLAGS += -std=c++23 -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 \ +- -DNDEBUG `wx-config --cxxflags --debug=no` -pthread ++ -DNDEBUG `$(WX_CONFIG) --cxxflags --debug=no` -pthread + +-LDFLAGS += `wx-config --libs std, aui, richtext --debug=no` -pthread ++LDFLAGS += `$(WX_CONFIG) --libs std, aui, richtext --debug=no` -pthread + + #Gtk - support "no button border" +-CXXFLAGS += `pkg-config --cflags gtk+-3.0` +-LDFLAGS += `pkg-config --libs gtk+-3.0` ++CXXFLAGS += `$(PKG_CONFIG) --cflags gtk+-3.0` ++LDFLAGS += `$(PKG_CONFIG) --libs gtk+-3.0` + #treat as system headers so that warnings are hidden: + CXXFLAGS += -isystem/usr/include/gtk-3.0 + diff --git a/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch deleted file mode 100644 index 20ccedb..0000000 --- a/freefilesync/debian/patches/revert_zenju_aggressive_upstreamisms.patch +++ /dev/null @@ -1,399 +0,0 @@ -Description: Some of these can be traced back to version 10.23 which was the last to not use - Had to revert gui_status_handler.cpp and .h entirely to version 11.0 to avoid the wx 3.1.4-isms here. - . - Now have to revert wxWidgets 3.1.4 upstreamisms - cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxASCII_STR' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxASCII_STR' ) ; ) - cd 11.1-0 ; git diff HEAD~1 -- $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) > ~/foo1 ; ( cd ../11.1-2 ; vi ~/foo1 $( grep -l -rIE 'wxDD_SHOW_HIDDEN' ) ; ) -Date: 2022-09-07 -Version: 11.26 -Author: bgstack15 ---- a/wx+/choice_enum.h -+++ b/wx+/choice_enum.h -@@ -7,7 +7,6 @@ - #ifndef CHOICE_ENUM_H_132413545345687 - #define CHOICE_ENUM_H_132413545345687 - --#include - #include - #include - -@@ -47,8 +46,6 @@ struct EnumDescrList - - using DescrList = std::vector>>; - DescrList descrList; -- -- std::unordered_map> labelsSetLast; - }; - template void setEnumVal(const EnumDescrList& mapping, wxChoice& ctrl, Enum value); - template Enum getEnumVal(const EnumDescrList& mapping, const wxChoice& ctrl); -@@ -71,32 +68,24 @@ template void updateTooltip - template - void setEnumVal(EnumDescrList& mapping, wxChoice& ctrl, Enum value) - { -- auto& labelsSetLast = mapping.labelsSetLast[&ctrl]; -- -- std::vector labels; -- for (const auto& [val, texts] : mapping.descrList) -- labels.push_back(texts.first); -+ ctrl.Clear(); - -- if (labels != labelsSetLast) -+ int selectedPos = 0; -+ for (auto it = mapping.descrList.begin(); it != mapping.descrList.end(); ++it) - { -- ctrl.Set(labels); //expensive as fuck! => only call when absolutely needed! -- labelsSetLast = std::move(labels); -+ 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 -@@ -115,17 +104,11 @@ Enum getEnumVal(const EnumDescrList void updateTooltipEnumVal(const EnumDescrList& mapping, wxChoice& ctrl) - { -- const int selectedPos = ctrl.GetSelection(); -+ const Enum currentValue = getEnumVal(mapping, ctrl); - -- if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) -- { -- 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); - } - } - ---- a/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp -+++ b/FreeFileSync/Source/RealTimeSync/folder_selector2.cpp -@@ -165,7 +165,7 @@ void FolderSelector2::onSelectDir(wxComm - } - - Zstring newFolderPath; -- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -+ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderPath)); - if (folderSelector.ShowModal() != wxID_OK) - return; - newFolderPath = utfTo(folderSelector.GetPath()); ---- a/FreeFileSync/Source/ui/command_box.h -+++ b/FreeFileSync/Source/ui/command_box.h -@@ -28,7 +28,7 @@ public: - const wxString choices[] = nullptr, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); -+ const wxString& name = wxComboBoxNameStr); - - void setHistory(const std::vector& history, size_t historyMax) { history_ = history; historyMax_ = historyMax; } - std::vector getHistory() const { return history_; } ---- a/FreeFileSync/Source/ui/folder_history_box.h -+++ b/FreeFileSync/Source/ui/folder_history_box.h -@@ -68,7 +68,7 @@ public: - const wxString choices[] = nullptr, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxComboBoxNameStr)); -+ const wxString& name = wxComboBoxNameStr); - - void setHistory(std::shared_ptr sharedHistory) { sharedHistory_ = std::move(sharedHistory); } - std::shared_ptr getHistory() { return sharedHistory_; } ---- a/FreeFileSync/Source/ui/folder_selector.cpp -+++ b/FreeFileSync/Source/ui/folder_selector.cpp -@@ -239,7 +239,7 @@ void FolderSelector::onSelectFolder(wxCo - - Zstring shellItemPath; - //default size? Windows: not implemented, Linux(GTK2): not implemented, macOS: not implemented => wxWidgets, what is this shit!? -- wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative), wxDD_DEFAULT_STYLE | wxDD_SHOW_HIDDEN); -+ wxDirDialog folderSelector(parent_, _("Select a folder"), utfTo(defaultFolderNative)); - //GTK2: "Show hidden" is also available as a context menu option in the folder picker! - //It looks like wxDD_SHOW_HIDDEN only sets the default when opening for the first time!? - if (folderSelector.ShowModal() != wxID_OK) ---- a/wx+/bitmap_button.h -+++ b/wx+/bitmap_button.h -@@ -28,7 +28,7 @@ public: - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) - { - SetLabel(label); -@@ -104,7 +104,6 @@ inline - wxBitmap renderSelectedButton(const wxSize& sz) - { - wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- bmp.SetScaleFactor(getDisplayScaleFactor()); - { - wxMemoryDC dc(bmp); - -@@ -120,7 +119,6 @@ inline - wxBitmap renderPressedButton(const wxSize& sz) - { - wxBitmap bmp(sz); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- bmp.SetScaleFactor(getDisplayScaleFactor()); - { - //draw rectangle border with gradient - const wxColor colFrom = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); ---- a/wx+/dc.h -+++ b/wx+/dc.h -@@ -12,7 +12,7 @@ - #include - #include //for macro: wxALWAYS_NATIVE_DOUBLE_BUFFER - #include --#include -+//#include - #include - - -@@ -92,9 +92,6 @@ constexpr int defaultDpi = 96; //on Wind - inline - int getDPI() - { --#ifndef wxHAS_DPI_INDEPENDENT_PIXELS --#error why is wxHAS_DPI_INDEPENDENT_PIXELS not defined? --#endif - //GTK2 doesn't properly support high DPI: https://freefilesync.org/forum/viewtopic.php?t=6114 - //=> requires general fix at wxWidgets-level - -@@ -130,7 +127,6 @@ wxBitmap toScaledBitmap(const wxImage& i - { - //wxBitmap(const wxImage& image, int depth = -1, double WXUNUSED(scale) = 1.0) => wxWidgets just ignores scale parameter! WTF! - wxBitmap bmpScaled(img); -- bmpScaled.SetScaleFactor(getDisplayScaleFactor()); - return bmpScaled; //when testing use 175% scaling: wxWidgets' scaling logic doesn't kick in for 150% only - } - ---- a/wx+/graph.h -+++ b/wx+/graph.h -@@ -192,7 +192,7 @@ public: - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, -- const wxString& name = wxASCII_STR(wxPanelNameStr)); -+ const wxString& name = wxPanelNameStr); - - class CurveAttributes - { ---- a/wx+/grid.cpp -+++ b/wx+/grid.cpp -@@ -263,7 +263,7 @@ class Grid::SubWindow : public wxWindow - { - public: - SubWindow(Grid& parent) : -- wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxASCII_STR(wxPanelNameStr)), -+ wxWindow(&parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS | wxBORDER_NONE, wxPanelNameStr), - parent_(parent) - { - Bind(wxEVT_PAINT, [this](wxPaintEvent& event) { onPaintEvent(event); }); ---- a/wx+/grid.h -+++ b/wx+/grid.h -@@ -149,7 +149,7 @@ public: - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxNO_BORDER, -- const wxString& name = wxASCII_STR(wxPanelNameStr)); -+ const wxString& name = wxPanelNameStr); - - size_t getRowCount() const; - ---- a/wx+/toggle_button.h -+++ b/wx+/toggle_button.h -@@ -24,7 +24,7 @@ public: - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) {} - - //wxButton constructor -@@ -35,7 +35,7 @@ public: - const wxSize& size = wxDefaultSize, - long style = 0, - const wxValidator& validator = wxDefaultValidator, -- const wxString& name = wxASCII_STR(wxButtonNameStr)) : -+ const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, wxNullBitmap, pos, size, style, validator, name) - { - SetLabel(label); ---- a/FreeFileSync/Source/ui/gui_status_handler.cpp -+++ b/FreeFileSync/Source/ui/gui_status_handler.cpp -@@ -44,8 +44,8 @@ StatusHandlerTemporaryPanel::StatusHandl - mainDlg_.Update(); //don't wait until idle event! - - //register keys -- mainDlg_. Bind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); -- mainDlg_.m_buttonCancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); -+ mainDlg_.Connect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); -+ mainDlg_.m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); - } - - -@@ -129,9 +129,8 @@ StatusHandlerTemporaryPanel::~StatusHand - mainDlg_.auiMgr_.Update(); - - //unregister keys -- [[maybe_unused]] bool ubOk1 = mainDlg_. Unbind(wxEVT_CHAR_HOOK, &StatusHandlerTemporaryPanel::onLocalKeyEvent, this); -- [[maybe_unused]] bool ubOk2 = mainDlg_.m_buttonCancel->Unbind(wxEVT_COMMAND_BUTTON_CLICKED, &StatusHandlerTemporaryPanel::onAbortCompare, this); -- assert(ubOk1 && ubOk2); -+ mainDlg_.Disconnect(wxEVT_CHAR_HOOK, wxKeyEventHandler(StatusHandlerTemporaryPanel::OnKeyPressed), nullptr, this); -+ mainDlg_.m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(StatusHandlerTemporaryPanel::OnAbortCompare), nullptr, this); - - mainDlg_.compareStatus_->teardown(); - -@@ -336,7 +335,7 @@ void StatusHandlerTemporaryPanel::forceU - } - - --void StatusHandlerTemporaryPanel::onLocalKeyEvent(wxKeyEvent& event) -+void StatusHandlerTemporaryPanel::OnKeyPressed(wxKeyEvent& event) - { - const int keyCode = event.GetKeyCode(); - if (keyCode == WXK_ESCAPE) -@@ -346,7 +345,7 @@ void StatusHandlerTemporaryPanel::onLoca - } - - --void StatusHandlerTemporaryPanel::onAbortCompare(wxCommandEvent& event) -+void StatusHandlerTemporaryPanel::OnAbortCompare(wxCommandEvent& event) - { - userRequestAbort(); - } ---- a/FreeFileSync/Source/ui/gui_status_handler.h -+++ b/FreeFileSync/Source/ui/gui_status_handler.h -@@ -46,8 +46,8 @@ public: - Result reportResults(); //noexcept!! - - private: -- void onLocalKeyEvent(wxKeyEvent& event); -- void onAbortCompare(wxCommandEvent& event); //handle abort button click -+ void OnKeyPressed(wxKeyEvent& event); -+ void OnAbortCompare(wxCommandEvent& event); //handle abort button click - void showStatsPanel(); - - MainDialog& mainDlg_; ---- a/wx+/no_flicker.h -+++ b/wx+/no_flicker.h -@@ -72,7 +72,7 @@ void setTextWithUrls(wxRichTextCtrl& ric - ZEN_ON_SCOPE_EXIT(richCtrl.EndSuppressUndo()); - - //fix mouse scroll speed: why the FUCK is this even necessary! -- richCtrl.SetLineHeight(richCtrl.GetCharHeight()); -+ //richCtrl.SetLineHeight(richCtrl.GetCharHeight()); // this is not even documented in wxWidgets 3.1.5! - - //get rid of margins and space between text blocks/"paragraphs" - richCtrl.SetMargins({0, 0}); ---- a/FreeFileSync/Source/ui/progress_indicator.cpp -+++ b/FreeFileSync/Source/ui/progress_indicator.cpp -@@ -878,12 +878,10 @@ dlgSizeBuf_(dlgSize) - auto generateSquareBitmap = [&](const wxColor& fillCol, const wxColor& borderCol) - { - wxBitmap bmpSquare(this->GetCharHeight(), this->GetCharHeight()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- bmpSquare.SetScaleFactor(getDisplayScaleFactor()); - { - wxMemoryDC dc(bmpSquare); - drawInsetRectangle(dc, wxRect(bmpSquare.GetSize()), fastFromDIP(1), borderCol, fillCol); - } -- bmpSquare.SetScaleFactor(static_cast(getDPI()) / defaultDpi); - return bmpSquare; - }; - pnl_.m_bitmapGraphKeyBytes->SetBitmap(generateSquareBitmap(getColorBytes(), getColorBytesRim())); ---- a/wx+/rtl.h -+++ b/wx+/rtl.h -@@ -70,8 +70,6 @@ void drawBitmapRtlMirror(wxDC& dc, const - if (!buffer || buffer->GetSize() != rect.GetSize()) //[!] since we do a mirror, width needs to match exactly! - buffer.emplace(rect.GetSize()); - -- if (buffer->GetScaleFactor() != dc.GetContentScaleFactor()) //needed here? -- buffer->SetScaleFactor(dc.GetContentScaleFactor()); // - - wxMemoryDC memDc(*buffer); //copies scale factor from wxBitmap - memDc.Blit(wxPoint(0, 0), rect.GetSize(), &dc, rect.GetTopLeft()); //blit in: background is mirrored due to memDc, dc having different layout direction! ---- a/FreeFileSync/Source/ui/main_dlg.cpp -+++ b/FreeFileSync/Source/ui/main_dlg.cpp -@@ -3586,7 +3586,6 @@ void MainDialog::onCfgGridContext(GridCo - auto addColorOption = [&](const wxColor& col, const wxString& name) - { - wxBitmap bmpSquare(this->GetCharHeight(), this->GetCharHeight()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- bmpSquare.SetScaleFactor(getDisplayScaleFactor()); - { - wxMemoryDC dc(bmpSquare); - const wxColor borderCol(0xdd, 0xdd, 0xdd); //light grey -@@ -3619,7 +3618,6 @@ void MainDialog::onCfgGridContext(GridCo - - //show color picker - wxBitmap bmpColorPicker(this->GetCharHeight(), this->GetCharHeight()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- bmpColorPicker.SetScaleFactor(getDisplayScaleFactor()); - { - wxMemoryDC dc(bmpColorPicker); - const wxColor borderCol(0xdd, 0xdd, 0xdd); //light grey -@@ -3633,7 +3631,6 @@ void MainDialog::onCfgGridContext(GridCo - { - wxColourData colCfg; - colCfg.SetChooseFull(true); -- colCfg.SetChooseAlpha(false); - colCfg.SetColour(defaultColors[1].first); //tentative - - if (const ConfigView::Details* cfg = cfggrid::getDataView(*m_gridCfgHistory).getItem(selectedRows[0])) -@@ -3650,19 +3647,6 @@ void MainDialog::onCfgGridContext(GridCo - assert(col.Alpha() == 255); - return col; - }; -- wxColourDialog dlg(this, &colCfg); -- dlg.Center(); -- -- dlg.Bind(wxEVT_COLOUR_CHANGED, [&](wxColourDialogEvent& event2) -- { -- //show preview during color selection (Windows-only atm) -- cfggrid::getDataView(*m_gridCfgHistory).setBackColor(cfgFilePaths, fixColorPickerColor(event2.GetColour()), true /*previewOnly*/); -- m_gridCfgHistory->Refresh(); -- }); -- -- if (dlg.ShowModal() == wxID_OK) -- applyBackColor(fixColorPickerColor(dlg.GetColourData().GetColour())); -- else //shut off color preview - { - cfggrid::getDataView(*m_gridCfgHistory).setBackColor(cfgFilePaths, wxNullColour, true /*previewOnly*/); - m_gridCfgHistory->Refresh(); ---- a/wx+/image_tools.cpp -+++ b/wx+/image_tools.cpp -@@ -188,7 +188,6 @@ wxImage zen::createImageFromText(const w - return wxNullImage; - - wxBitmap newBitmap(maxWidth, lineHeight * lineInfo.size()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes -- newBitmap.SetScaleFactor(getDisplayScaleFactor()); - { - dc.SelectObject(newBitmap); //copies scale factor from wxBitmap - ZEN_ON_SCOPE_EXIT(dc.SelectObject(wxNullBitmap)); diff --git a/freefilesync/debian/patches/series b/freefilesync/debian/patches/series index 40f1e25..38ae7f2 100644 --- a/freefilesync/debian/patches/series +++ b/freefilesync/debian/patches/series @@ -2,16 +2,16 @@ ffs_allow_parallel_ops.patch ffs_devuan.patch ffs_devuan_gtk3.patch ffs_no_check_updates.patch -#ffs_no_wx311.patch ffs_sftp.patch -ffs_libssh2.patch -#ffs_curl.patch -#revert_zenju_aggressive_upstreamisms.patch +# libssh2 and libcurl are now directly from bastif +libssh2_relax_dep.patch +libcurl_improve_supported_error_codes.patch ffs_gcc.patch ffs_traditional_view.patch ffs_desktop_notifications.patch -#ffs_openssl.patch ffs_icon_loader.patch ffs_tooltips_no_taskbar.patch revert_buggy_gtk3_change_in_12.1.patch disable_wxuse_Exceptions.patch +# makefile-improvements mostly combines wx-config-version, zlib-dep, pkg-config patches from bastif +makefile-improvements.patch -- cgit