mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-14 11:20:12 +00:00
freefilesync: 14.11 -> 14.12 (#562220)
This commit is contained in:
@@ -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();
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
33
pkgs/by-name/fr/freefilesync/string_traits.patch
Normal file
33
pkgs/by-name/fr/freefilesync/string_traits.patch
Normal file
@@ -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 S, StringType st>
|
||||
class GetCharTypeImpl;
|
||||
|
||||
+template <class S, class Char> //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<S>().c_str())) == sizeof(Yes);
|
||||
+};
|
||||
|
||||
template <class S>
|
||||
class GetCharTypeImpl<S, StringType::class_>
|
||||
@@ -57,7 +69,8 @@ class GetCharTypeImpl<S, StringType::class_>
|
||||
static void conversionType(...);
|
||||
|
||||
public:
|
||||
- using Type = decltype(conversionType(std::declval<S>().c_str()));
|
||||
+ using Type = std::conditional_t<HasConversion<S, wchar_t>::value, wchar_t,
|
||||
+ /**/ std::conditional_t<HasConversion<S, char >::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*"
|
||||
Reference in New Issue
Block a user