From b3ff962bd738c3635cf82fe37ee2643ad706417d Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Mon, 3 Aug 2020 03:16:10 +0800 Subject: [PATCH] amule: remove upstreamd patch --- .../patches/003_file_name_conversion.patch | 70 ------------------- ...api.patch => 003_update-libupnp-api.patch} | 0 2 files changed, 70 deletions(-) delete mode 100644 package/lean/amule/patches/003_file_name_conversion.patch rename package/lean/amule/patches/{004_update-libupnp-api.patch => 003_update-libupnp-api.patch} (100%) diff --git a/package/lean/amule/patches/003_file_name_conversion.patch b/package/lean/amule/patches/003_file_name_conversion.patch deleted file mode 100644 index 8b4d94707e..0000000000 --- a/package/lean/amule/patches/003_file_name_conversion.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/src/amule.h -+++ b/src/amule.h -@@ -194,6 +194,13 @@ public: - - // derived classes may override those - virtual int InitGui(bool geometry_enable, wxString &geometry_string); -+ // The GTK wxApps sets its file name conversion properly -+ // in wxApp::Initialize(), while wxAppConsole::Initialize() -+ // does not, leaving wxConvFile being set to wxConvLibc. File -+ // name conversion should be set otherwise amuled will abort to -+ // handle non-ASCII file names which monolithic amule can handle. -+ // This function are overrided to perform this. -+ virtual bool Initialize(int& argc_, wxChar **argv_); - - #ifndef ASIO_SOCKETS - // Socket handlers ---- a/src/amuled.cpp -+++ b/src/amuled.cpp -@@ -773,6 +773,41 @@ int CamuleDaemonApp::OnExit() - return CamuleApp::OnExit(); - } - -+bool CamuleDaemonApp::Initialize(int& argc_, wxChar **argv_) -+{ -+ if ( !wxAppConsole::Initialize(argc_, argv_) ) { -+ return false; -+ } -+ -+#ifdef __UNIX__ -+ wxString encName; -+#if wxUSE_INTL -+ // if a non default locale is set, -+ // assume that the user wants his -+ // filenames in this locale too -+ encName = wxLocale::GetSystemEncodingName().Upper(); -+ -+ // But don't consider ASCII in this case. -+ if ( !encName.empty() ) { -+ if ( encName == wxT("US-ASCII") ) { -+ // This means US-ASCII when returned -+ // from GetEncodingFromName(). -+ encName.clear(); -+ } -+ } -+#endif // wxUSE_INTL -+ -+ // in this case, UTF-8 is used by default. -+ if ( encName.empty() ) { -+ encName = wxT("UTF-8"); -+ } -+ -+ static wxConvBrokenFileNames fileconv(encName); -+ wxConvFileName = &fileconv; -+#endif // __UNIX__ -+ -+ return true; -+} - - int CamuleDaemonApp::ShowAlert(wxString msg, wxString title, int flags) - { ---- a/src/libs/common/Path.cpp -+++ b/src/libs/common/Path.cpp -@@ -230,6 +230,7 @@ CPath::CPath(const wxString& filename) - } - - wxCharBuffer fn = filename2char(filename); -+ // add fn.length() for wx 3.x - if (fn.data()) { - // Filename is valid in the current locale. This means that - // it either originated from a (wx)system-call, or from a diff --git a/package/lean/amule/patches/004_update-libupnp-api.patch b/package/lean/amule/patches/003_update-libupnp-api.patch similarity index 100% rename from package/lean/amule/patches/004_update-libupnp-api.patch rename to package/lean/amule/patches/003_update-libupnp-api.patch