From 6ac1dc2211c320aac10a3aab182c01d729a692ec Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 11 Sep 2026 11:31:44 +0200 Subject: [PATCH] freefilesync: 14.11 -> 14.12 --- ...xWidgets_uncaught_exception_handling.patch | 28 ++++++++++++++++ pkgs/by-name/fr/freefilesync/package.nix | 21 +++++------- .../fr/freefilesync/string_traits.patch | 33 +++++++++++++++++++ 3 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 pkgs/by-name/fr/freefilesync/Disable_wxWidgets_uncaught_exception_handling.patch create mode 100644 pkgs/by-name/fr/freefilesync/string_traits.patch diff --git a/pkgs/by-name/fr/freefilesync/Disable_wxWidgets_uncaught_exception_handling.patch b/pkgs/by-name/fr/freefilesync/Disable_wxWidgets_uncaught_exception_handling.patch new file mode 100644 index 000000000000..b3ed4a9f60b0 --- /dev/null +++ b/pkgs/by-name/fr/freefilesync/Disable_wxWidgets_uncaught_exception_handling.patch @@ -0,0 +1,28 @@ +diff --git a/FreeFileSync/Source/RealTimeSync/application.cpp b/FreeFileSync/Source/RealTimeSync/application.cpp +index 45fb191..ccd2598 100644 +--- a/FreeFileSync/Source/RealTimeSync/application.cpp ++++ b/FreeFileSync/Source/RealTimeSync/application.cpp +@@ -215,9 +215,6 @@ wxLayoutDirection Application::GetLayoutDirection() const { return languageLayou + + int Application::OnRun() + { +-#if wxUSE_EXCEPTIONS +-#error why is wxWidgets uncaught exception handling enabled!? +-#endif + + //exception => Windows: let it crash and create mini dump!!! Linux/macOS: std::exception::what() logged to console + [[maybe_unused]] const int rc = wxApp::OnRun(); +diff --git a/FreeFileSync/Source/application.cpp b/FreeFileSync/Source/application.cpp +index f0233ab..02169f4 100644 +--- a/FreeFileSync/Source/application.cpp ++++ b/FreeFileSync/Source/application.cpp +@@ -232,9 +232,6 @@ wxLayoutDirection Application::GetLayoutDirection() const { return languageLayou + + int Application::OnRun() + { +-#if wxUSE_EXCEPTIONS +-#error why is wxWidgets uncaught exception handling enabled!? +-#endif + //exception? => Windows: let it crash and create mini dump!!! Linux/macOS: std::exception::what() logged to console + + [[maybe_unused]] const int rc = wxApp::OnRun(); diff --git a/pkgs/by-name/fr/freefilesync/package.nix b/pkgs/by-name/fr/freefilesync/package.nix index 70301f458889..4f63fd0d7c9f 100644 --- a/pkgs/by-name/fr/freefilesync/package.nix +++ b/pkgs/by-name/fr/freefilesync/package.nix @@ -20,7 +20,7 @@ }: let - wxwidgets_3_3_1 = wxwidgets_3_3.overrideAttrs ( + wxwidgets_3_3_2 = wxwidgets_3_3.overrideAttrs ( finalAttrs: previousAttrs: { version = "3.3.2"; src = fetchFromGitHub { @@ -38,7 +38,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "freefilesync"; - version = "14.11"; + version = "14.12"; src = fetchurl { url = "https://freefilesync.org/download/FreeFileSync_${finalAttrs.version}_Source.zip"; @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { rm -f "$out" tryDownload "$url" "$out" ''; - hash = "sha256-fn6lKM6QFIsTQ1YcpuNXCa9oK96hUx8hDJhVSjRmGcM"; + hash = "sha256-PfSPmEIzRRJXgIIzrwsN0CXCAE662UX4YRayYRFMOk0="; }; sourceRoot = "."; @@ -59,14 +59,10 @@ stdenv.mkDerivation (finalAttrs: { (replaceVars ./Makefile.patch { gtk3-dev = lib.getDev gtk3; }) - # Fix build with vanilla wxWidgets - (fetchDebianPatch { - pname = "freefilesync"; - version = "13.7"; - debianRevision = "1"; - patch = "Disable_wxWidgets_uncaught_exception_handling.patch"; - hash = "sha256-Fem7eDDKSqPFU/t12Jco8OmYC8FM9JgB4/QVy/ouvbI="; - }) + # Fix build with vanilla wxWidgets (rebased from Debian patch) + ./Disable_wxWidgets_uncaught_exception_handling.patch + # ../../zen/string_traits.h:60:41: error: call of overloaded 'conversionType(wxCStrData)' is ambiguous + ./string_traits.patch ]; postPatch = '' @@ -87,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { libidn2 libssh2 openssl - wxwidgets_3_3_1 + wxwidgets_3_3_2 ]; env.NIX_CFLAGS_COMPILE = toString [ @@ -95,6 +91,7 @@ stdenv.mkDerivation (finalAttrs: { "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_54" "-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_54" # Define libssh2 constants + "-DLIBSSH2_ERROR_STORE_OVERFLOW=-55" "-DMAX_SFTP_READ_SIZE=30000" "-DMAX_SFTP_OUTGOING_SIZE=30000" ]; diff --git a/pkgs/by-name/fr/freefilesync/string_traits.patch b/pkgs/by-name/fr/freefilesync/string_traits.patch new file mode 100644 index 000000000000..cc7c77ae06cf --- /dev/null +++ b/pkgs/by-name/fr/freefilesync/string_traits.patch @@ -0,0 +1,33 @@ +diff --git a/zen/string_traits.h b/zen/string_traits.h +index 12d9c6c..4e8d503 100644 +--- a/zen/string_traits.h ++++ b/zen/string_traits.h +@@ -45,6 +45,18 @@ enum class StringType + template + class GetCharTypeImpl; + ++template //test if result of S::c_str() can convert to const Char* ++class HasConversion ++{ ++ using Yes = char[1]; ++ using No = char[2]; ++ ++ static Yes& hasConversion(const Char*); ++ static No& hasConversion(...); ++ ++public: ++ static constexpr bool value = sizeof(hasConversion(std::declval().c_str())) == sizeof(Yes); ++}; + + template + class GetCharTypeImpl +@@ -57,7 +69,8 @@ class GetCharTypeImpl + static void conversionType(...); + + public: +- using Type = decltype(conversionType(std::declval().c_str())); ++ using Type = std::conditional_t::value, wchar_t, ++ /**/ std::conditional_t::value, char, void>>; + //using Type = typename S::value_type; + /*DON'T use S::value_type: + 1. support Glib::ustring: value_type is "unsigned int" but c_str() returns "const char*"