summaryrefslogtreecommitdiff
path: root/net-p2p/amule
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-23 07:00:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-23 07:00:28 +0100
commite23cdda4dbb0c83b9e682ab5e916085a35203da5 (patch)
tree5a4ac448a3b288b731c24d947e0ce52df3cab07b /net-p2p/amule
parent8187a741807f3e9a9e26304973cf18087dcf2560 (diff)
gentoo resync : 23.06.2018
Diffstat (limited to 'net-p2p/amule')
-rw-r--r--net-p2p/amule/Manifest8
-rw-r--r--net-p2p/amule/amule-2.3.2-r2.ebuild104
-rw-r--r--net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch25
-rw-r--r--net-p2p/amule/files/amule-2.3.2-disable-version-check.patch12
-rw-r--r--net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch97
-rw-r--r--net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch159
-rw-r--r--net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch78
-rw-r--r--net-p2p/amule/metadata.xml25
8 files changed, 498 insertions, 10 deletions
diff --git a/net-p2p/amule/Manifest b/net-p2p/amule/Manifest
index 712d48557b32..38ea670f9f64 100644
--- a/net-p2p/amule/Manifest
+++ b/net-p2p/amule/Manifest
@@ -1,8 +1,14 @@
AUX amule-2.2.6-fallocate.diff 687 BLAKE2B c7c7df787b417e58db50c59192eb455c495ecd38f9fd5f547ff3db6cfa642eba323f4ade99c66fe981777479a728afb9e12e1ae494853af8bbb4634448820dcd SHA512 406eb05eecfa7d027f7eaeefa2ead92078d5f7ed0e72f3ce47ac4f1f23b2852577f429f999a009198515e35efacfa6e54283494bb3eaf6332ee6bed9963c65ba
+AUX amule-2.3.2-cryptopp-6.patch 927 BLAKE2B 3be08b8219cebdaf252f21dd4a7e469d0371aa62a5ed9856c13d8772163c8f85cb7f19d9cf383e226276852c7acbb73ffdcc4f46a3e23118491154ddd47ca1da SHA512 fe07cdddf447d327ac517366449ec329d81f49ef327183eac36aca522db244732713837ac8c4d4ca0d92d648bd96dad670597b466e375324204427a381bc2b26
+AUX amule-2.3.2-disable-version-check.patch 419 BLAKE2B e4ca791348ba80eb34cb876fe05c2b85a70e2d704ecb3dd14ec6fc47550d4a677fcdd071906b93c56652c133462d5065b5907564e91c092430e310e2dd8c2523 SHA512 6d98c1a78b16778ad94ef9d70e87fe7ded2228b101bdb961565c3f2a0f2687e55c97bd824e331b53cbd45fbafbfa5803ce4c2f1fa8e245a3ebc97cdd7f282b65
+AUX amule-2.3.2-fix-crash-closing-last-search-tab-1.patch 3620 BLAKE2B f6dbba7491472d1c15f2253ea94cb83681c4f745f6cbe8662d95daaa54f69ff3eee94e02a1d5d5d69cf303c55db5cfef630096750b6bfcc431d48e120cfca91f SHA512 752f2dc7590001d830da2aa211349a2e04601c76ab01620f741e57f8c7a05851e1a4a4cba2ec88167b8c8047b8c3bca1a120003ec85c1155d6b8e71bff05f42c
+AUX amule-2.3.2-fix-crash-closing-last-search-tab-2.patch 5073 BLAKE2B a90260842bbadae7ea2f068a2c4fb94d3024e61ff0eecf340257fbbdb7657a7946aed36b8bdfe3f5a5c06852be55d144909f74cdb01761fb0e167c67ea4c0fc6 SHA512 8227cbb72af28a076e03dec466fb53660985de33fd84ef8856b6d098035015bc4e9c4d5a3da5a320053525d0356f3a73f2fe0b9f1c1eb7991b29bc4e1e93751f
+AUX amule-2.3.2-fix-crash-shared-dir-utf8.patch 2204 BLAKE2B 3266ef16038176af0e3cef9e8a16517a34f78723e725c453e557f88fac3b8b233edb34aa10b3295563a769df3fc9a1c0ef88cf2eaf5b43a5bd2d60f4b4a09757 SHA512 f0ae3e7e8ee4105c4999d248f58ad946db7c163f6f2fa1ee54f97509d82cf43cbadffcd537d728f2dc547cbe83deaa8737e794d42a773707b2fe85d6a671b4e1
AUX amuled.confd 300 BLAKE2B 891cf5d274eb10a23b5b43200d861b5e4361b9c0a11acd020542ff1f0d7d96725b113fb6d74ab34c56d408311582d8524f7bb8f77d1255f3e374abe3b9f34a8b SHA512 88a3fcc64ed4c4729609e3ffef098d4bf30bda0d17b5165fff3417161c18766df79de11c98ee510677291bca7ded33d2a23d3aff0d99781f98173cc189f44901
AUX amuled.initd 1105 BLAKE2B 16525a9c5ad8c158d0d4f1ba316fb493cb438b985a0a4d52672b4067acdfae6dd4897d7c37459515ce4a0e6b0b89665b9feaea6b15e3535c8f46b83ce0c16d05 SHA512 3ec351e84da4e33918747de4ccd9ec86895b60f9d94836fc92112489edcfe14af7a21efb79194b80bb81aa666714bd5a21873c954b36948e31369727e71143b6
AUX amuleweb.confd 720 BLAKE2B 1bcb4349f34c8deef069d156da29ff3dcb642f9b5c15fbef742d0154ff6580142fa2c2c797a3864cd398c980c1e2b2eb41f2c958c6f356f3077e79de47fe7610 SHA512 ba760e45002a80bb55e2729178d0901f885e8d142903f8eb98a31b8544bf6989801dabfa0315e0d1f7d8bfa3df5716cce43bf415f45a4605895dc2907716ca41
AUX amuleweb.initd 1149 BLAKE2B ef29bae12cf72764798eecb6866405525b601ee6ea869b6191954799805f47b75976884ee566ecb03eca907b3b13ff7870541b7682a70d5db058fb1257d6f00d SHA512 4cc944af90ad81f09d74d79dede57d1ff26c1b87649432d14ed294770b04f6ea256c25c194edfdc8f9d0c85929b1c576c31eba9228703e5a21259d83968289b0
DIST aMule-2.3.2.tar.xz 3895300 BLAKE2B cf1bce3a0fcd0c108e369b7aed257f067a4ce3ce2fd4e8509b577ac58f8bc52fbc9aabc5c703bc9111dd06ac011ee1f3756279b093b69bcaada106226493237a SHA512 3064b086f8459b4372ea0c11f239a08167c7beac3dde26889f056f617b480b487bea10c2cae8fdfa1ae99c10fc9e715adc8e01e4b968389861aa47c3ec8c0016
EBUILD amule-2.3.2-r1.ebuild 2264 BLAKE2B ffa5219b33d63414838be657972556be4122717478698053454e3a7da290a5f174e6730e52b3ff05305b7010821a0588ca2ab092d28c9e0daae19e83d0f6043a SHA512 defd04e15bc4d77fe48a78999dac8410228199029011bba8ecf295388354029bf43a1f17741696c65b36acc90dea0e4b5c47ebbcbab5111d4eb95a84949179fc
-MISC metadata.xml 443 BLAKE2B fe1d99ffaa324176572c2598aa153515cff324e69df364d4e7b2cc71af7c82b8573718ac2f3a4b2ae462f2aa844e7ecff97df91715ba76ebd15f001342c61057 SHA512 61b72c6f3bf1aaf4d09045f2ff0d1eb053cc55fe4126da2aa25d45ba7ee7c3db604df823cbf02db2a758e1ee108c4516f0223b4c3dfe88a67d75ae7a2bb44d38
+EBUILD amule-2.3.2-r2.ebuild 2347 BLAKE2B 1686989f65579b96657919d7be1fe5899069c8591397dcb4f88a641fb00f3b480cb57fb1726cd645db891a38ad45606183b0075af3483d7e2f9e352182ebe2a4 SHA512 7b1a024b022b6c83bc51fe73694435dd92a254845548e466dc550a7c12ea5dd77955a389c2bab3e315a0dca5b95342df51e1eb102cf7bda0d024cac15c794efa
+MISC metadata.xml 636 BLAKE2B 3384c1c34c9963570b17793188db257a5c0648390aaa8ca73f4bad50db8b54be9d0fe5d379b873fd0f21bf6ecaeaf5840ca65ad92c72a1449b25035f9b7ee3c3 SHA512 bd93ef13a5d116f81c8a6901e524032a85eab90589067e57e165f643f8f0a75047869801b4485fa47a0bc41008f3b8f1aff1aa8b413c83b4c27610ef6ea58d5f
diff --git a/net-p2p/amule/amule-2.3.2-r2.ebuild b/net-p2p/amule/amule-2.3.2-r2.ebuild
new file mode 100644
index 000000000000..b91ba903777e
--- /dev/null
+++ b/net-p2p/amule/amule-2.3.2-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit wxwidgets user
+
+MY_P="${PN/m/M}-${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="aMule, the all-platform eMule p2p client"
+HOMEPAGE="http://www.amule.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+IUSE="daemon debug geoip nls remote stats upnp +X"
+
+COMMON_DEPEND="
+ dev-libs/boost:=
+ dev-libs/crypto++:=
+ sys-libs/binutils-libs:0=
+ sys-libs/zlib
+ x11-libs/wxGTK:${WX_GTK_VER}[X?]
+ stats? ( media-libs/gd:=[jpeg,png] )
+ geoip? ( dev-libs/geoip )
+ upnp? ( net-libs/libupnp:* )
+ remote? ( media-libs/libpng:0= )
+ !net-p2p/imule"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.2-fix-crash-shared-dir-utf8.patch"
+ "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-1.patch"
+ "${FILESDIR}/${PN}-2.3.2-fix-crash-closing-last-search-tab-2.patch"
+ "${FILESDIR}/${PN}-2.3.2-cryptopp-6.patch"
+ "${FILESDIR}/${PN}-2.3.2-disable-version-check.patch"
+)
+
+pkg_setup() {
+ if use stats && ! use X; then
+ einfo "Note: You would need both the X and stats USE flags"
+ einfo "to compile aMule Statistics GUI."
+ einfo "I will now compile console versions only."
+ fi
+
+ setup-wxwidgets
+}
+
+pkg_preinst() {
+ if use daemon || use remote; then
+ enewgroup p2p
+ enewuser p2p -1 -1 /home/p2p p2p
+ fi
+}
+
+src_configure() {
+ local myconf
+
+ if use X; then
+ use stats && myconf="${myconf}
+ --enable-wxcas
+ --enable-alc"
+ use remote && myconf="${myconf}
+ --enable-amule-gui"
+ else
+ myconf="
+ --disable-monolithic
+ --disable-amule-gui
+ --disable-wxcas
+ --disable-alc"
+ fi
+
+ econf \
+ --with-denoise-level=0 \
+ --with-wx-config="${WX_CONFIG}" \
+ --enable-amulecmd \
+ --with-boost \
+ $(use_enable debug) \
+ $(use_enable daemon amule-daemon) \
+ $(use_enable geoip) \
+ $(use_enable nls) \
+ $(use_enable remote webserver) \
+ $(use_enable stats cas) \
+ $(use_enable stats alcc) \
+ $(use_enable upnp) \
+ ${myconf}
+}
+
+src_install() {
+ default
+
+ if use daemon; then
+ newconfd "${FILESDIR}"/amuled.confd amuled
+ newinitd "${FILESDIR}"/amuled.initd amuled
+ fi
+ if use remote; then
+ newconfd "${FILESDIR}"/amuleweb.confd amuleweb
+ newinitd "${FILESDIR}"/amuleweb.initd amuleweb
+ fi
+}
diff --git a/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch b/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch
new file mode 100644
index 000000000000..d23534475603
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.2-cryptopp-6.patch
@@ -0,0 +1,25 @@
+From 27c13f3e622b8a3eaaa05bb62b0149604bdcc9e8 Mon Sep 17 00:00:00 2001
+From: Tommy Jerry Mairo <tommy.mairo@gmail.com>
+Date: Wed, 21 Mar 2018 19:56:28 +0100
+Subject: [PATCH] Bugfix: API mismatch with crypto++ 6.0.0
+
+---
+ src/ClientCreditsList.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ClientCreditsList.cpp b/src/ClientCreditsList.cpp
+index 3bea9fe2d..69e881fd8 100644
+--- a/src/ClientCreditsList.cpp
++++ b/src/ClientCreditsList.cpp
+@@ -312,7 +312,7 @@ void CClientCreditsList::InitalizeCrypting()
+ // calculate and store public key
+ CryptoPP::RSASSA_PKCS1v15_SHA_Verifier pubkey(*static_cast<CryptoPP::RSASSA_PKCS1v15_SHA_Signer *>(m_pSignkey));
+ CryptoPP::ArraySink asink(m_abyMyPublicKey, 80);
+- pubkey.DEREncode(asink);
++ pubkey.GetMaterial().Save(asink);
+ m_nMyPublicKeyLen = asink.TotalPutLength();
+ asink.MessageEnd();
+ } catch (const CryptoPP::Exception& e) {
+--
+2.16.4
+
diff --git a/net-p2p/amule/files/amule-2.3.2-disable-version-check.patch b/net-p2p/amule/files/amule-2.3.2-disable-version-check.patch
new file mode 100644
index 000000000000..74a0203a993e
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.2-disable-version-check.patch
@@ -0,0 +1,12 @@
+Disable NewVersionCheck by default
+--- a/src/Preferences.cpp
++++ b/src/Preferences.cpp
+@@ -1210,7 +1210,7 @@ void CPreferences::BuildItemList( const
+ /**
+ * Version check
+ **/
+- NewCfgItem(IDC_NEWVERSION, (new Cfg_Bool( wxT("/eMule/NewVersionCheck"), s_NewVersionCheck, true )));
++ NewCfgItem(IDC_NEWVERSION, (new Cfg_Bool( wxT("/eMule/NewVersionCheck"), s_NewVersionCheck, false )));
+
+ /**
+ * Obfuscation
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch
new file mode 100644
index 000000000000..c480165eb983
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-1.patch
@@ -0,0 +1,97 @@
+From 0f0c5c220228aea81142c7c00f73414cdb1b507a Mon Sep 17 00:00:00 2001
+From: gaffa <gaffa@confuseacat.dk>
+Date: Wed, 12 Oct 2016 19:36:21 +0200
+Subject: [PATCH] A workaround for inconsistent behaviour in wxWidgets, where
+ the button release signal is falling through. Instead of calling DeletePage
+ directly an event is added to delete the page after the button release event
+ has been processed by all handlers.
+
+---
+ src/MuleNotebook.cpp | 17 ++++++++++++++++-
+ src/MuleNotebook.h | 13 +++++++++++++
+ 2 files changed, 29 insertions(+), 1 deletion(-)
+
+diff --git a/src/MuleNotebook.cpp b/src/MuleNotebook.cpp
+index ff3ba294e..4ab23ce18 100644
+--- a/src/MuleNotebook.cpp
++++ b/src/MuleNotebook.cpp
+@@ -32,6 +32,7 @@
+
+ DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING)
+ DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED)
++DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE)
+
+ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook)
+ EVT_RIGHT_DOWN(CMuleNotebook::OnRMButton)
+@@ -44,6 +45,7 @@ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook)
+ EVT_LEFT_UP(CMuleNotebook::OnMouseButtonRelease)
+ EVT_MIDDLE_UP(CMuleNotebook::OnMouseButtonRelease)
+ EVT_MOTION(CMuleNotebook::OnMouseMotion)
++ EVT_MULENOTEBOOK_DELETE_PAGE(wxID_ANY, CMuleNotebook::OnDeletePage)
+ END_EVENT_TABLE()
+
+ CMuleNotebook::CMuleNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name )
+@@ -60,6 +62,12 @@ CMuleNotebook::~CMuleNotebook()
+ DeleteAllPages();
+ }
+
++void CMuleNotebook::OnDeletePage(wxBookCtrlEvent& evt)
++{
++ int page = evt.GetSelection();
++ DeletePage(page);
++}
++
+
+ bool CMuleNotebook::DeletePage(int nPage)
+ {
+@@ -216,7 +224,14 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event)
+ if ((tab != -1) && (((flags == wxNB_HITTEST_ONICON) && event.LeftUp()) ||
+ ((flags == wxNB_HITTEST_ONLABEL) && event.MiddleUp()))) {
+ // User did click on a 'x' or middle click on the label
+- DeletePage(tab);
++
++ /* WORKAROUND: Instead of calling DeletePage, we need to wait for the
++ * mouse release signal to reach Gtk. Inconsistent with normal wxEvent
++ * behaviour the button release handler in wxWidgets don't evaluate
++ * the result of the signal handling. */
++ wxNotebookEvent evt( wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, GetId(), tab );
++ evt.SetEventObject(this);
++ AddPendingEvent( evt );
+ } else {
+ // Is not a 'x'. Send this event up.
+ event.Skip();
+diff --git a/src/MuleNotebook.h b/src/MuleNotebook.h
+index dda097d07..ab2809d88 100644
+--- a/src/MuleNotebook.h
++++ b/src/MuleNotebook.h
+@@ -31,7 +31,16 @@
+
+ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, -1)
+ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED, -1)
++DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1)
+
++#define EVT_MULENOTEBOOK_DELETE_PAGE(id, fn) \
++ DECLARE_EVENT_TABLE_ENTRY( \
++ wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, \
++ id, \
++ -1, \
++ (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
++ NULL \
++ ),
+ #define EVT_MULENOTEBOOK_PAGE_CLOSING(id, fn) \
+ DECLARE_EVENT_TABLE_ENTRY( \
+ wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, \
+@@ -107,6 +116,10 @@ public:
+ */
+ void SetPopupHandler( wxWindow* widget );
+
++private:
++ // Internal handler. Workaround for wxWidgets Tab-Crash bug.
++ void OnDeletePage(wxBookCtrlEvent& evt);
++
+ protected:
+ /**
+ * Event handler for left or middle mouse button release (for closing pages)
+--
+2.16.4
+
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch
new file mode 100644
index 000000000000..e47970beb0c8
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.2-fix-crash-closing-last-search-tab-2.patch
@@ -0,0 +1,159 @@
+From 4c94c2d9f3be8b9068966f15aebc29b8c9b706ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?D=C3=A9vai=20Tam=C3=A1s?= <gonosztopi@amule.org>
+Date: Mon, 17 Oct 2016 22:14:26 +0200
+Subject: [PATCH] Apply the workaround only if needed
+
+This way it'll be easy for us to remove the workaround once wxWidgets fixes
+the bug.
+---
+ docs/Changelog | 4 ++++
+ src/MuleNotebook.cpp | 19 ++++++++++++++-----
+ src/MuleNotebook.h | 8 ++++++++
+ 3 files changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/docs/Changelog b/docs/Changelog
+index 7dbff70b2..e9176dd51 100644
+--- a/docs/Changelog
++++ b/docs/Changelog
+@@ -2,6 +2,10 @@ Version 2.4.0 - The river knows.
+ ----------
+ 201?-??-??
+
++ gaffatape:
++ * Workaround for bug in wxWidgets causing aMule to crash on
++ closing the last search tab
++
+ GonoszTopi:
+ * Fix restoring toolbar orientation on 'Cancel'
+
+diff --git a/src/MuleNotebook.cpp b/src/MuleNotebook.cpp
+index 4ab23ce18..5d3ad0453 100644
+--- a/src/MuleNotebook.cpp
++++ b/src/MuleNotebook.cpp
+@@ -32,7 +32,10 @@
+
+ DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING)
+ DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED)
++
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ DEFINE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE)
++#endif
+
+ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook)
+ EVT_RIGHT_DOWN(CMuleNotebook::OnRMButton)
+@@ -45,9 +48,12 @@ BEGIN_EVENT_TABLE(CMuleNotebook, wxNotebook)
+ EVT_LEFT_UP(CMuleNotebook::OnMouseButtonRelease)
+ EVT_MIDDLE_UP(CMuleNotebook::OnMouseButtonRelease)
+ EVT_MOTION(CMuleNotebook::OnMouseMotion)
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ EVT_MULENOTEBOOK_DELETE_PAGE(wxID_ANY, CMuleNotebook::OnDeletePage)
++#endif
+ END_EVENT_TABLE()
+
++
+ CMuleNotebook::CMuleNotebook( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name )
+ : wxNotebook(parent, id, pos, size, style, name)
+ {
+@@ -62,11 +68,14 @@ CMuleNotebook::~CMuleNotebook()
+ DeleteAllPages();
+ }
+
++
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ void CMuleNotebook::OnDeletePage(wxBookCtrlEvent& evt)
+ {
+ int page = evt.GetSelection();
+ DeletePage(page);
+ }
++#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND
+
+
+ bool CMuleNotebook::DeletePage(int nPage)
+@@ -208,7 +217,6 @@ void CMuleNotebook::OnPopupCloseOthers(wxCommandEvent& WXUNUSED(evt))
+
+ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event)
+ {
+-
+ if (GetImageList() == NULL) {
+ // This Mulenotebook has no images on tabs, so nothing to do.
+ event.Skip();
+@@ -224,7 +232,7 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event)
+ if ((tab != -1) && (((flags == wxNB_HITTEST_ONICON) && event.LeftUp()) ||
+ ((flags == wxNB_HITTEST_ONLABEL) && event.MiddleUp()))) {
+ // User did click on a 'x' or middle click on the label
+-
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ /* WORKAROUND: Instead of calling DeletePage, we need to wait for the
+ * mouse release signal to reach Gtk. Inconsistent with normal wxEvent
+ * behaviour the button release handler in wxWidgets don't evaluate
+@@ -232,16 +240,18 @@ void CMuleNotebook::OnMouseButtonRelease(wxMouseEvent &event)
+ wxNotebookEvent evt( wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, GetId(), tab );
+ evt.SetEventObject(this);
+ AddPendingEvent( evt );
++#else
++ DeletePage(tab);
++#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND
+ } else {
+ // Is not a 'x'. Send this event up.
+ event.Skip();
+ }
+-
+ }
+
++
+ void CMuleNotebook::OnMouseMotion(wxMouseEvent &event)
+ {
+-
+ if (GetImageList() == NULL) {
+ // This Mulenotebook has no images on tabs, so nothing to do.
+ event.Skip();
+@@ -263,7 +273,6 @@ void CMuleNotebook::OnMouseMotion(wxMouseEvent &event)
+ // Is not a 'x'. Send this event up.
+ event.Skip();
+ }
+-
+ }
+
+ // File_checked_for_headers
+diff --git a/src/MuleNotebook.h b/src/MuleNotebook.h
+index ab2809d88..14f61ee68 100644
+--- a/src/MuleNotebook.h
++++ b/src/MuleNotebook.h
+@@ -28,9 +28,13 @@
+
+ #include <wx/notebook.h>
+
++#define MULE_NEEDS_DELETEPAGE_WORKAROUND wxCHECK_VERSION(3,0,2)
++
+
+ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, -1)
+ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_ALL_PAGES_CLOSED, -1)
++
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1)
+
+ #define EVT_MULENOTEBOOK_DELETE_PAGE(id, fn) \
+@@ -41,6 +45,8 @@ DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_MULENOTEBOOK_DELETE_PAGE, -1)
+ (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
+ NULL \
+ ),
++#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND
++
+ #define EVT_MULENOTEBOOK_PAGE_CLOSING(id, fn) \
+ DECLARE_EVENT_TABLE_ENTRY( \
+ wxEVT_COMMAND_MULENOTEBOOK_PAGE_CLOSING, \
+@@ -116,9 +122,11 @@ public:
+ */
+ void SetPopupHandler( wxWindow* widget );
+
++#if MULE_NEEDS_DELETEPAGE_WORKAROUND
+ private:
+ // Internal handler. Workaround for wxWidgets Tab-Crash bug.
+ void OnDeletePage(wxBookCtrlEvent& evt);
++#endif // MULE_NEEDS_DELETEPAGE_WORKAROUND
+
+ protected:
+ /**
+--
+2.16.4
+
diff --git a/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch b/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch
new file mode 100644
index 000000000000..aa92ff6c81ee
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.2-fix-crash-shared-dir-utf8.patch
@@ -0,0 +1,78 @@
+From 17816ed02f59bab9c27310e7f24c73266b0a3003 Mon Sep 17 00:00:00 2001
+From: persmule <persmule@gmail.com>
+Date: Wed, 5 Oct 2016 13:47:46 +0800
+Subject: [PATCH] Add a routine to set file name conversion for amuled which
+ based on wxAppConsole
+
+---
+ src/amule.h | 7 +++++++
+ src/amuled.cpp | 35 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 42 insertions(+)
+
+diff --git a/src/amule.h b/src/amule.h
+index f25702f60..240c02dd9 100644
+--- a/src/amule.h
++++ b/src/amule.h
+@@ -553,6 +553,13 @@ private:
+ int OnExit();
+
+ 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_);
+
+ #ifdef AMULED_APPTRAITS
+ struct sigaction m_oldSignalChildAction;
+diff --git a/src/amuled.cpp b/src/amuled.cpp
+index 486da5973..86e1ff8b8 100644
+--- a/src/amuled.cpp
++++ b/src/amuled.cpp
+@@ -704,6 +704,41 @@ int CamuleDaemonApp::InitGui(bool ,wxString &)
+ return 0;
+ }
+
++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::OnExit()
+ {
+--
+2.16.4
+
diff --git a/net-p2p/amule/metadata.xml b/net-p2p/amule/metadata.xml
index 2a3a65502073..836b2cdc312b 100644
--- a/net-p2p/amule/metadata.xml
+++ b/net-p2p/amule/metadata.xml
@@ -1,13 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
- <use>
- <flag name="daemon">Enable amule daemon</flag>
- <flag name="remote">Enable remote controlling of the client</flag>
- <flag name="stats">Enable statistic reporting</flag>
- </use>
- <upstream>
- <remote-id type="sourceforge">amule</remote-id>
- </upstream>
+ <maintainer type="person">
+ <email>alexander@tsoy.me</email>
+ <name>Alexander Tsoy</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">amule-project/amule</remote-id>
+ </upstream>
+ <use>
+ <flag name="daemon">Enable amule daemon</flag>
+ <flag name="remote">Enable remote controlling of the client</flag>
+ <flag name="stats">Enable statistic reporting</flag>
+ </use>
</pkgmetadata>