<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8ac6791758cd1a5035337f90d5087b48db21ee7b">https://github.com/macports/macports-ports/commit/8ac6791758cd1a5035337f90d5087b48db21ee7b</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 8ac6791758cd1a5035337f90d5087b48db21ee7b
</span>Author: Dennis Camera <dennis.camera@riiengineering.ch>
AuthorDate: Sat Mar 25 23:35:59 2023 +0100
<span style='display:block; white-space:pre;color:#404040;'> www/FileZilla: fix build on 10.5.8 ppc
</span>---
www/FileZilla/Portfile | 15 +++-
www/FileZilla/files/patch-cloexec.diff | 88 +++++++++++++++++++++
www/FileZilla/files/patch-dnd.diff | 89 ++++++++++++++++++++++
www/FileZilla/files/patch-paths-1050.diff | 46 +++++++++++
www/FileZilla/files/patch-powermanagement.diff | 66 ++++++++++++++++
.../files/patch-src-engine-version.cpp.diff | 7 ++
.../files/patch-src-interface-toolbar.mm.diff | 22 ++++++
7 files changed, 332 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/Portfile b/www/FileZilla/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 23be007d0d4..edcdfc512a6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/FileZilla/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -47,7 +47,20 @@ worksrcdir filezilla-${version}
</span>
patchfiles patch-src-commonui-buildinfo.cpp.diff \
patch-src-engine-version.cpp.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-src-interface-mainfrm.cpp.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-interface-mainfrm.cpp.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-src-interface-toolbar.mm.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-powermanagement.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-dnd.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-paths-1050.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platform darwin {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # O_CLOEXEC was added in Mac OS X 10.7. Only apply this patch on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # system versions which need it because it could create a race
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # condition in multi-threaded applications.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-cloexec.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
# http://trac.filezilla-project.org/ticket/5473
# http://sourceforge.net/p/tinyxml/patches/51/
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-cloexec.diff b/www/FileZilla/files/patch-cloexec.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..b3308089a82
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-cloexec.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,88 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+O_CLOEXEC was added in Mac OS X 10.7.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Revert to fcntl() to set the CLOEXEC flag for older system versions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/commonui/ipcmutex.cpp.orig 2021-03-19 14:29:09.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/commonui/ipcmutex.cpp 2023-03-25 19:31:11.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -42,7 +42,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fz::scoped_lock lock{private_mutex};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fn = lockfile_path + L"lockfile";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- m_fd = open(fz::to_native(fn).c_str(), O_CREAT | O_RDWR | O_CLOEXEC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ m_fd = open(fz::to_native(fn).c_str(), O_CREAT | O_RDWR, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(m_fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --m_instanceCount;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/engine/logging.cpp.orig 2020-06-18 16:06:46.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/engine/logging.cpp 2023-03-25 19:26:47.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -108,8 +108,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (m_log_fd == INVALID_HANDLE_VALUE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DWORD err = GetLastError();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- m_log_fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (m_log_fd == -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ m_log_fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (m_log_fd != -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(m_log_fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int err = errno;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ l.unlock(); //Avoid recursion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -272,7 +274,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ while ((rc = fcntl(m_log_fd, F_SETLKW, &lock)) == -1 && errno == EINTR);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Ignore any other failures
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd == -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int err = errno;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -283,6 +285,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ log(logmsg::error, _("Could not open log file: %s"), GetSystemErrorDescription(err));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct stat buf2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rc = fstat(fd, &buf2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -302,13 +305,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close(fd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Get the new file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- m_log_fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ m_log_fd = open(m_file.c_str(), O_WRONLY | O_APPEND | O_CREAT, 0644);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (m_log_fd == -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int err = errno;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ l.unlock(); // Avoid recursion
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ log(logmsg::error, _("Could not open log file: %s"), GetSystemErrorDescription(err));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(m_log_fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!rc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Rename didn't fail
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/interface/edithandler.cpp.orig 2022-04-21 05:30:03.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/interface/edithandler.cpp 2023-03-25 19:58:15.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -143,8 +143,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ std::wstring const lockfile = temp + L"fz3temp-lockfile";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (wxFileName::FileExists(lockfile)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifndef __WXMSW__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int fd = open(fz::to_string(lockfile).c_str(), O_RDWR | O_CLOEXEC, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int fd = open(fz::to_string(lockfile).c_str(), O_RDWR, 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(fd, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Try to lock 1 byte region in the lockfile. m_type specifies the byte to lock.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct flock f = {};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ f.l_type = F_WRLCK;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -234,8 +235,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ auto file = fz::to_native(m_localDir) + "fz3temp-lockfile";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- m_lockfile_descriptor = open(file.c_str(), O_CREAT | O_RDWR | O_CLOEXEC, 0600);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ m_lockfile_descriptor = open(file.c_str(), O_CREAT | O_RDWR, 0600);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (m_lockfile_descriptor >= 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ fcntl(m_lockfile_descriptor, F_SETFD, FD_CLOEXEC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Lock 1 byte region in the lockfile.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct flock f = {};
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ f.l_type = F_WRLCK;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-dnd.diff b/www/FileZilla/files/patch-dnd.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..797200e1aef
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-dnd.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,89 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Patch drag & drop handler for old versions of macOS.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Currently this is a hack which simply disables most of the code.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This hack likely doesn't work.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/interface/dropsource_mac.mm.orig 2022-06-01 15:56:30.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/interface/dropsource_mac.mm 2023-03-25 20:24:32.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7,6 +7,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <wx/utils.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <wx/filename.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <AppKit/AppKit.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxDragResult NSFileDragOperationToWxDragResult(NSDragOperation code)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -30,6 +31,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return wxDragNone;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @interface FileDropSourceDelegate : NSObject<NSDraggingSource>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BOOL dragFinished;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -125,7 +127,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @end
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @interface FilePromiseProviderDelegate : NSObject<NSFilePromiseProviderDelegate>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NSOperationQueue * workQueue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -142,7 +146,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self = [super init];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ workQueue = [[NSOperationQueue alloc] init];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ workQueue.qualityOfService = NSQualityOfServiceUserInitiated;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path = nil;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return self;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -185,6 +191,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return workQueue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @end
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxDragResult DropSource::DoFileDragDrop(int flags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -200,8 +207,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NSEvent* theEvent = (NSEvent*)wxTheApp->MacGetCurrentEvent();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxASSERT_MSG(theEvent, "DoDragDrop must be called in response to a mouse down or drag event.");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FileDropSourceDelegate* delegate = [[FileDropSourceDelegate alloc] init];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [delegate setImplementation:this flags:flags];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // add a dummy square as dragged image for the moment,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // TODO: proper drag image for data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -223,6 +232,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NSMutableArray *items = [[NSMutableArray alloc] init];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FilePromiseProviderDelegate * filePromiseDelegate = [[FilePromiseProviderDelegate alloc] init];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NSDraggingItem* draggingItem = [[NSDraggingItem alloc] initWithPasteboardWriter:[filePromiseDelegate pasteboardWriter]];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [draggingItem setDraggingFrame:NSMakeRect(p.x, p.y, 16, 16) contents:image];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -248,6 +258,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [delegate release];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [image release];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [filePromiseDelegate release];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxWindow* mouseUpTarget = wxWindow::GetCapture();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -261,6 +272,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ wxevent.SetEventType(wxEVT_LEFT_UP);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mouseUpTarget->HandleWindowEvent(wxevent);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return result;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return wxDragError;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-paths-1050.diff b/www/FileZilla/files/patch-paths-1050.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..5fc7c47e2f5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-paths-1050.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+NSFileManager URLForDirectory:inDomain:appropriateForURL:create:error: was added in Mac OS X 10.6.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Replace with NSSearchPathForDirectoriesInDomains() to support all versions of Mac OS X.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+NSDownloadsDirectory was added in Mac OS X 10.5, fall back to NSDesktopDirectory on Tiger.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/commonui/fz_paths_osx.mm.orig 2021-10-26 14:12:19.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/commonui/fz_paths_osx.mm 2023-03-25 20:24:46.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,3 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <Foundation/NSPathUtilities.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <Foundation/NSFileManager.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <Foundation/NSURL.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -17,12 +19,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static char const* path = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!path) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- NSURL* url = [[NSFileManager defaultManager] URLForDirectory:NSDownloadsDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (url) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- path = strdup(url.path.UTF8String);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- path = "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ path = "";
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSArray *paths = NSSearchPathForDirectoriesInDomains(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSDownloadsDirectory,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSDesktopDirectory,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSUserDomainMask,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ YES);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSFileManager *fileManager = [NSFileManager defaultManager];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for (int i = 0; i < [paths count]; ++i) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ id searchdir = [paths objectAtIndex:i];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ BOOL isDir;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ([fileManager fileExistsAtPath:searchdir isDirectory:&isDir] && isDir) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ path = strdup([searchdir UTF8String]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ break;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return path;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-powermanagement.diff b/www/FileZilla/files/patch-powermanagement.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e9f5f1fff64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-powermanagement.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,66 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Restore power management for OS X < 10.9.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This code is based on the implementation used in earlier versions of FileZilla.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/interface/power_management.cpp.orig 2020-06-18 16:06:46.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/interface/power_management.cpp 2023-03-25 20:41:35.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -112,7 +112,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __WXMSW__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(__WXMAC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__WXMAC__) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef WITH_LIBDBUS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/interface/power_management_osx.mm.orig 2020-06-04 12:18:02.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/interface/power_management_osx.mm 2023-03-25 20:43:11.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,18 +1,48 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <Foundation/NSProcessInfo.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <cstdlib>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <IOKit/pwr_mgt/IOPMLib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void const* PowerManagmentImpl_SetBusy()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ NSActivityOptions opt = NSActivityUserInitiated | NSActivityIdleSystemSleepDisabled;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ id activity = [[NSProcessInfo processInfo] beginActivityWithOptions:opt reason:@"Preventing idle sleep during transfers and other operations."];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return CFBridgingRetain(activity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IOPMAssertionID assertionID;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IOReturn success = IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &assertionID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (success == kIOReturnSuccess) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IOPMAssertionID* ret = (IOPMAssertionID*)malloc(sizeof(assertionID));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (ret == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *ret = assertionID;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void PowerManagmentImpl_SetIdle(void const* activity)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (activity) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ id<NSObject> activityId = CFBridgingRelease(activity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [[NSProcessInfo processInfo] endActivity:activityId];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (activity) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IOPMAssertionID assertionID = *(IOPMAssertionID*)activity;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ IOPMAssertionRelease(assertionID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ free((void*)activity);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-src-engine-version.cpp.diff b/www/FileZilla/files/patch-src-engine-version.cpp.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index 861152253f6..add9eddeb07 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/FileZilla/files/patch-src-engine-version.cpp.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-src-engine-version.cpp.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,3 +1,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Carbon was deprecated in OS X 10.8 and stopped working in macOS 10.15 when
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+support for 32-bit x86 applications was removed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+For compatibility with new versions of OS X try to extract the system version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+from the kern.osproductversion sysctl, if it exists.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+If it does not, fall back to Carbon's Gestalt().
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> --- src/engine/version.cpp.orig 2021-05-29 05:30:02.000000000 +0200
+++ src/engine/version.cpp 2023-03-17 14:05:16.000000000 +0100
@@ -9,7 +9,12 @@
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/FileZilla/files/patch-src-interface-toolbar.mm.diff b/www/FileZilla/files/patch-src-interface-toolbar.mm.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..eff97526d6b
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/FileZilla/files/patch-src-interface-toolbar.mm.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+__builtin_available() is not supported by GCC.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Wrap in MAC_OS_X_VERSION_MAX_ALLOWED pre-processor conditional, assuming
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+builds on macOS 11+ will only use clang.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- ./src/interface/toolbar.mm.orig 2023-03-25 20:47:43.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ ./src/interface/toolbar.mm 2023-03-25 20:49:51.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,11 +1,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <wx/wx.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <AppKit/NSWindow.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void fix_toolbar_style(wxFrame& frame)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (__builtin_available(macos 11.0, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ WXWindow tlw = frame.MacGetTopLevelWindowRef();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [tlw setToolbarStyle:NSWindowToolbarStyleExpanded];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>