The configure script of net-p2p/mldonkey-3.1.0 provides a switch '--enable-upnp-natpmp' to enable upnp support of mldonkey. I don't personally use it but somebody else was interested it. Could you please add an 'upnp' USE flag to net-p2p/mldonkey-3.1.0? net-p2p/mldonkey[upnp] introduces two extra dependencies, as far as I know: net-libs/miniupnpc and net-libs/libnatpmp . Shortly I will attach a patch to the ebuild. I don't have a router myself to test this, so I know it builds correctly, yet it may or may not work correctly. Actually the UPnP support of mldonkey seems quite broken. It does not work with net-libs/miniupnpc-1.6{,r1}, the current stable release of miniupnpc, or net-libs/libnatpmp-20110808-r1, the sole available version of libnatpmp in Portage tree. Two patches are needed to build mldonkey with newer versions of these libraries: The first patch, making mldonkey compatible with newer versions of libnatpmp, could be found here: http://savannah.nongnu.org/patch/?7661 Direct link: http://savannah.nongnu.org/patch/download.php?file_id=24273 Note this patch breaks the compatibility with some older versions of libnatpmp -- but there's no other versions of libnatpmp in Portage tree. The second patch will soon be attached. Reproducible: Always
Created attachment 305429 [details, diff] mldonkey-3.1.0.ebuild.patch Patch to mldonkey-3.1.0.ebuild to add upnp support It assumes the first patch is named "mldonkey-3.1.0-initnatpmp.patch".
Created attachment 305431 [details, diff] mldonkey-3.1.0-miniupnpc-1.6.patch Patch to make mldonkey-3.1.0 compatible with ~net-libs/miniupnpd-1.6 I wrote it myself and I don't know whether it works flawlessly. It compiles fine with both net-libs/miniupnpc-1.5 and net-libs/miniupnpc-1.6-r1 here, though.
Created attachment 305433 [details, diff] mldonkey-3.1.0.ebuild.patch Oops, I made a typo in the name "mldonkey-3.1.0-miniupnpd-1.6.patch", silly me. :-)
commit 4f725ae7444436a03114b4f9cde888afbfb5fb69 Author: Alexis Ballier <aballier@gentoo.org> Date: Thu Feb 9 15:10:50 2017 +0100 net-p2p/mldonkey: Add upnp useflag, mostly by Richard Grenville in bug #408277. thanks!