summaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/airdcpp-webclient/Manifest9
-rw-r--r--net-p2p/airdcpp-webclient/airdcpp-webclient-2.1.0.ebuild68
-rw-r--r--net-p2p/airdcpp-webclient/airdcpp-webclient-2.2.0.ebuild65
-rw-r--r--net-p2p/airdcpp-webclient/files/airdcpp-webclient-2.1.0-disable-automagic.patch40
-rw-r--r--net-p2p/airdcpp-webclient/files/airdcppd.confd8
-rw-r--r--net-p2p/airdcpp-webclient/files/airdcppd.initd21
-rw-r--r--net-p2p/airdcpp-webclient/metadata.xml24
-rw-r--r--net-p2p/amule/Manifest10
-rw-r--r--net-p2p/amule/amule-2.3.2-r1.ebuild104
-rw-r--r--net-p2p/amule/files/amule-2.2.6-fallocate.diff23
-rw-r--r--net-p2p/amule/files/amuled.confd12
-rw-r--r--net-p2p/amule/files/amuled.initd50
-rw-r--r--net-p2p/amule/files/amuleweb.confd27
-rw-r--r--net-p2p/amule/files/amuleweb.initd49
-rw-r--r--net-p2p/amule/metadata.xml13
-rw-r--r--net-p2p/automatic/Manifest7
-rw-r--r--net-p2p/automatic/automatic-0.8.3.ebuild64
-rw-r--r--net-p2p/automatic/files/automatic.confd8
-rw-r--r--net-p2p/automatic/files/automatic.initd36
-rw-r--r--net-p2p/automatic/files/automatic.logrotate8
-rw-r--r--net-p2p/automatic/metadata.xml23
-rw-r--r--net-p2p/bitcoin-cli/Manifest13
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.13.0.ebuild32
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.13.1.ebuild32
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.13.2.ebuild32
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild24
-rw-r--r--net-p2p/bitcoin-cli/metadata.xml19
-rw-r--r--net-p2p/bitcoin-qt/Manifest14
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.13.0.ebuild129
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.13.1-r1.ebuild130
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild132
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild106
-rw-r--r--net-p2p/bitcoin-qt/files/0.13.2-libressl.patch48
-rw-r--r--net-p2p/bitcoin-qt/metadata.xml28
-rw-r--r--net-p2p/bitcoind/Manifest16
-rw-r--r--net-p2p/bitcoind/bitcoind-0.13.0.ebuild68
-rw-r--r--net-p2p/bitcoind/bitcoind-0.13.1.ebuild68
-rw-r--r--net-p2p/bitcoind/bitcoind-0.13.2.ebuild68
-rw-r--r--net-p2p/bitcoind/bitcoind-9999.ebuild65
-rw-r--r--net-p2p/bitcoind/files/bitcoin.conf8
-rw-r--r--net-p2p/bitcoind/files/bitcoind.logrotate-r18
-rw-r--r--net-p2p/bitcoind/files/bitcoind.service30
-rw-r--r--net-p2p/bitcoind/metadata.xml24
-rw-r--r--net-p2p/bitflu/Manifest11
-rw-r--r--net-p2p/bitflu/bitflu-1.50.ebuild74
-rw-r--r--net-p2p/bitflu/bitflu-1.51.ebuild74
-rw-r--r--net-p2p/bitflu/bitflu-1.52.ebuild74
-rw-r--r--net-p2p/bitflu/files/bitflu.config45
-rw-r--r--net-p2p/bitflu/files/bitflu.initd46
-rw-r--r--net-p2p/bitflu/metadata.xml13
-rw-r--r--net-p2p/bittornado/Manifest10
-rw-r--r--net-p2p/bittornado/bittornado-0.3.18-r4.ebuild56
-rw-r--r--net-p2p/bittornado/bittornado-0.4.1_p20160925-r1.ebuild48
-rw-r--r--net-p2p/bittornado/files/bittornado-0.3.18-wxversion.patch90
-rw-r--r--net-p2p/bittornado/files/bttrack.conf17
-rw-r--r--net-p2p/bittornado/files/bttrack.rc22
-rw-r--r--net-p2p/bittornado/metadata.xml10
-rw-r--r--net-p2p/classified-ads/Manifest6
-rw-r--r--net-p2p/classified-ads/classified-ads-0.11.ebuild82
-rw-r--r--net-p2p/classified-ads/metadata.xml39
-rw-r--r--net-p2p/createtorrent/Manifest5
-rw-r--r--net-p2p/createtorrent/createtorrent-1.1.4.ebuild28
-rw-r--r--net-p2p/createtorrent/metadata.xml5
-rw-r--r--net-p2p/ctcs/Manifest5
-rw-r--r--net-p2p/ctcs/ctcs-1.4.1.ebuild19
-rw-r--r--net-p2p/ctcs/metadata.xml5
-rw-r--r--net-p2p/ctorrent/Manifest9
-rw-r--r--net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild27
-rw-r--r--net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild28
-rw-r--r--net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch38
-rw-r--r--net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch17
-rw-r--r--net-p2p/ctorrent/files/ctorrent-CVE-2009-1759.patch364
-rw-r--r--net-p2p/ctorrent/metadata.xml8
-rw-r--r--net-p2p/datacoin-hp/Manifest10
-rw-r--r--net-p2p/datacoin-hp/datacoin-hp-9999.ebuild122
-rw-r--r--net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch179
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.conf5
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.confd9
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.initd28
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.service30
-rw-r--r--net-p2p/datacoin-hp/files/datacoind.logrotate7
-rw-r--r--net-p2p/datacoin-hp/metadata.xml19
-rw-r--r--net-p2p/dbhub/Manifest8
-rw-r--r--net-p2p/dbhub/dbhub-0.451-r1.ebuild38
-rw-r--r--net-p2p/dbhub/files/dbhub-fix-buffer-overflows.patch53
-rw-r--r--net-p2p/dbhub/files/dbhub-gentoo.patch25
-rw-r--r--net-p2p/dbhub/files/dbhub-no-dynaloader.patch12
-rw-r--r--net-p2p/dbhub/metadata.xml11
-rw-r--r--net-p2p/deluge/Manifest21
-rw-r--r--net-p2p/deluge/deluge-1.3.15.ebuild143
-rw-r--r--net-p2p/deluge/deluge-1.3.9999.ebuild141
-rw-r--r--net-p2p/deluge/deluge-9999.ebuild140
-rw-r--r--net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch22
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch42
-rw-r--r--net-p2p/deluge/files/deluge-web.conf6
-rw-r--r--net-p2p/deluge/files/deluge-web.init53
-rw-r--r--net-p2p/deluge/files/deluge-web.service11
-rw-r--r--net-p2p/deluge/files/deluge-web.service-211
-rw-r--r--net-p2p/deluge/files/deluge-web.service.conf4
-rw-r--r--net-p2p/deluge/files/deluged.conf9
-rw-r--r--net-p2p/deluge/files/deluged.conf-27
-rw-r--r--net-p2p/deluge/files/deluged.init71
-rw-r--r--net-p2p/deluge/files/deluged.init-253
-rw-r--r--net-p2p/deluge/files/deluged.service13
-rw-r--r--net-p2p/deluge/files/deluged.service-211
-rw-r--r--net-p2p/deluge/files/deluged.service.conf5
-rw-r--r--net-p2p/deluge/metadata.xml26
-rw-r--r--net-p2p/dogecoin-qt/Manifest5
-rw-r--r--net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild144
-rw-r--r--net-p2p/dogecoin-qt/metadata.xml14
-rw-r--r--net-p2p/ed2k_hash/Manifest7
-rw-r--r--net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild35
-rw-r--r--net-p2p/ed2k_hash/ed2k_hash-0.4.0-r2.ebuild37
-rw-r--r--net-p2p/ed2k_hash/files/ed2k_64bit.patch12
-rw-r--r--net-p2p/ed2k_hash/metadata.xml8
-rw-r--r--net-p2p/eiskaltdcpp/Manifest11
-rw-r--r--net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild149
-rw-r--r--net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild161
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch123
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch31
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch29
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch138
-rw-r--r--net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch23
-rw-r--r--net-p2p/eiskaltdcpp/metadata.xml22
-rw-r--r--net-p2p/fms/Manifest7
-rw-r--r--net-p2p/fms/files/fms37
-rw-r--r--net-p2p/fms/files/fms-use-system-libs3.patch41
-rw-r--r--net-p2p/fms/fms-0.3.79.ebuild71
-rw-r--r--net-p2p/fms/metadata.xml11
-rw-r--r--net-p2p/freenet/Manifest17
-rw-r--r--net-p2p/freenet/files/0.7.5_p1321-ext.patch22
-rw-r--r--net-p2p/freenet/files/0.7.5_p1475-remove-git.patch24
-rw-r--r--net-p2p/freenet/files/freenet18
-rw-r--r--net-p2p/freenet/files/freenet-0.7.5_p1474-wrapper.conf27
-rw-r--r--net-p2p/freenet/files/freenet.service13
-rw-r--r--net-p2p/freenet/files/run.sh-20090501585
-rw-r--r--net-p2p/freenet/freenet-0.7.5_p1475-r2.ebuild161
-rw-r--r--net-p2p/freenet/freenet-0.7.5_p1478-r1.ebuild158
-rw-r--r--net-p2p/freenet/freenet-0.7.5_p1478.ebuild158
-rw-r--r--net-p2p/freenet/metadata.xml11
-rw-r--r--net-p2p/gnut/Manifest6
-rw-r--r--net-p2p/gnut/gnut-0.4.28-r1.ebuild27
-rw-r--r--net-p2p/gnut/metadata.xml5
-rw-r--r--net-p2p/go-ethereum/Manifest4
-rw-r--r--net-p2p/go-ethereum/go-ethereum-1.5.5.ebuild32
-rw-r--r--net-p2p/go-ethereum/metadata.xml19
-rw-r--r--net-p2p/go-ipfs-bin/Manifest14
-rw-r--r--net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.1.ebuild25
-rw-r--r--net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.10.ebuild25
-rw-r--r--net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.11.ebuild25
-rw-r--r--net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.2.ebuild25
-rw-r--r--net-p2p/go-ipfs-bin/metadata.xml19
-rw-r--r--net-p2p/gtk-gnutella/Manifest8
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.1.11-r1.ebuild88
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.1.11.ebuild87
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.1.12.ebuild88
-rw-r--r--net-p2p/gtk-gnutella/metadata.xml10
-rw-r--r--net-p2p/gtorrentviewer/Manifest8
-rw-r--r--net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-curl-headers.patch12
-rw-r--r--net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-desktop.patch16
-rw-r--r--net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-underlinking.patch14
-rw-r--r--net-p2p/gtorrentviewer/gtorrentviewer-0.2b.ebuild45
-rw-r--r--net-p2p/gtorrentviewer/metadata.xml8
-rw-r--r--net-p2p/kmldonkey/Manifest5
-rw-r--r--net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild34
-rw-r--r--net-p2p/kmldonkey/metadata.xml8
-rw-r--r--net-p2p/ktorrent/Manifest5
-rw-r--r--net-p2p/ktorrent/ktorrent-5.1.0.ebuild103
-rw-r--r--net-p2p/ktorrent/metadata.xml25
-rw-r--r--net-p2p/litecoind/Manifest14
-rw-r--r--net-p2p/litecoind/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/litecoind/files/litecoin.conf8
-rw-r--r--net-p2p/litecoind/files/litecoin.confd10
-rw-r--r--net-p2p/litecoind/files/litecoin.initd-r128
-rw-r--r--net-p2p/litecoind/files/litecoin.service30
-rw-r--r--net-p2p/litecoind/files/litecoind-0.10.2.2-fix-gnustack.patch17
-rw-r--r--net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch12
-rw-r--r--net-p2p/litecoind/files/litecoind-0.10.4.0-gcc6.patch47
-rw-r--r--net-p2p/litecoind/files/litecoind.logrotate7
-rw-r--r--net-p2p/litecoind/litecoind-0.10.4.0.ebuild103
-rw-r--r--net-p2p/litecoind/metadata.xml12
-rw-r--r--net-p2p/metadata.xml34
-rw-r--r--net-p2p/mktorrent-borg/Manifest5
-rw-r--r--net-p2p/mktorrent-borg/metadata.xml5
-rw-r--r--net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild28
-rw-r--r--net-p2p/mktorrent/Manifest5
-rw-r--r--net-p2p/mktorrent/metadata.xml8
-rw-r--r--net-p2p/mktorrent/mktorrent-1.0-r1.ebuild33
-rw-r--r--net-p2p/mldonkey/Manifest12
-rw-r--r--net-p2p/mldonkey/files/mldonkey.confd-2.839
-rw-r--r--net-p2p/mldonkey/files/mldonkey.initd121
-rw-r--r--net-p2p/mldonkey/files/ocaml-4.03.patch145
-rw-r--r--net-p2p/mldonkey/files/ocaml4.patch12
-rw-r--r--net-p2p/mldonkey/metadata.xml20
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild174
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild176
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.6.ebuild172
-rw-r--r--net-p2p/multibit/Manifest7
-rw-r--r--net-p2p/multibit/files/auto-install.xml12
-rw-r--r--net-p2p/multibit/files/multibit3
-rw-r--r--net-p2p/multibit/metadata.xml8
-rw-r--r--net-p2p/multibit/multibit-0.5.18.ebuild35
-rw-r--r--net-p2p/myster/Manifest5
-rw-r--r--net-p2p/myster/metadata.xml8
-rw-r--r--net-p2p/myster/myster-8.0-r1.ebuild26
-rw-r--r--net-p2p/ncdc/Manifest8
-rw-r--r--net-p2p/ncdc/metadata.xml17
-rw-r--r--net-p2p/ncdc/ncdc-1.19.1.ebuild39
-rw-r--r--net-p2p/ncdc/ncdc-1.20.ebuild35
-rw-r--r--net-p2p/ncdc/ncdc-9999.ebuild40
-rw-r--r--net-p2p/nicotine+/Manifest5
-rw-r--r--net-p2p/nicotine+/metadata.xml12
-rw-r--r--net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild50
-rw-r--r--net-p2p/opendchub/Manifest7
-rw-r--r--net-p2p/opendchub/files/opendchub-0.8.2-telnet.patch11
-rw-r--r--net-p2p/opendchub/files/opendchub_setup.sh20
-rw-r--r--net-p2p/opendchub/metadata.xml8
-rw-r--r--net-p2p/opendchub/opendchub-0.8.2.ebuild49
-rw-r--r--net-p2p/ppcoind/Manifest14
-rw-r--r--net-p2p/ppcoind/files/ppcoin.conf8
-rw-r--r--net-p2p/ppcoind/files/ppcoin.confd10
-rw-r--r--net-p2p/ppcoind/files/ppcoin.initd104
-rw-r--r--net-p2p/ppcoind/files/ppcoin.initd-r128
-rw-r--r--net-p2p/ppcoind/files/ppcoin.service30
-rw-r--r--net-p2p/ppcoind/files/ppcoind-0.4.0-boost_chrono.patch10
-rw-r--r--net-p2p/ppcoind/files/ppcoind-0.4.0-gcc6.patch11
-rw-r--r--net-p2p/ppcoind/files/ppcoind.logrotate7
-rw-r--r--net-p2p/ppcoind/metadata.xml11
-rw-r--r--net-p2p/ppcoind/ppcoind-0.4.0-r1.ebuild116
-rw-r--r--net-p2p/ppcoind/ppcoind-0.4.0.ebuild118
-rw-r--r--net-p2p/primecoin-qt/Manifest6
-rw-r--r--net-p2p/primecoin-qt/files/primecoin-sys_leveldb.patch176
-rw-r--r--net-p2p/primecoin-qt/metadata.xml11
-rw-r--r--net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild143
-rw-r--r--net-p2p/primecoind/Manifest12
-rw-r--r--net-p2p/primecoind/files/primecoin-sys_leveldb.patch176
-rw-r--r--net-p2p/primecoind/files/primecoin.conf8
-rw-r--r--net-p2p/primecoind/files/primecoin.confd10
-rw-r--r--net-p2p/primecoind/files/primecoin.initd104
-rw-r--r--net-p2p/primecoind/files/primecoin.initd-r128
-rw-r--r--net-p2p/primecoind/files/primecoin.service30
-rw-r--r--net-p2p/primecoind/files/primecoind.logrotate7
-rw-r--r--net-p2p/primecoind/metadata.xml11
-rw-r--r--net-p2p/primecoind/primecoind-0.1.2-r1.ebuild122
-rw-r--r--net-p2p/pybitmessage/Manifest8
-rw-r--r--net-p2p/pybitmessage/files/noninteractive-build.patch18
-rw-r--r--net-p2p/pybitmessage/metadata.xml29
-rw-r--r--net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild73
-rw-r--r--net-p2p/pybitmessage/pybitmessage-0.6.2-r2.ebuild79
-rw-r--r--net-p2p/qbittorrent/Manifest9
-rw-r--r--net-p2p/qbittorrent/metadata.xml19
-rw-r--r--net-p2p/qbittorrent/qbittorrent-3.3.10.ebuild55
-rw-r--r--net-p2p/qbittorrent/qbittorrent-3.3.12.ebuild58
-rw-r--r--net-p2p/qbittorrent/qbittorrent-9999.ebuild54
-rw-r--r--net-p2p/retroshare/Manifest9
-rw-r--r--net-p2p/retroshare/files/retroshare-0.6.3-fix-comment.patch19
-rw-r--r--net-p2p/retroshare/metadata.xml29
-rw-r--r--net-p2p/retroshare/retroshare-0.6.2.ebuild149
-rw-r--r--net-p2p/retroshare/retroshare-0.6.3.ebuild159
-rw-r--r--net-p2p/retroshare/retroshare-0.6.9999.ebuild150
-rw-r--r--net-p2p/rtorrent/Manifest13
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch10
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch37
-rw-r--r--net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch28
-rw-r--r--net-p2p/rtorrent/files/rtorrent.1560
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.conf1
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.init32
-rw-r--r--net-p2p/rtorrent/files/rtorrentd_at.service15
-rw-r--r--net-p2p/rtorrent/metadata.xml20
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild63
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.6.ebuild62
-rw-r--r--net-p2p/saku/Manifest7
-rw-r--r--net-p2p/saku/files/saku25
-rw-r--r--net-p2p/saku/files/saku.ini27
-rw-r--r--net-p2p/saku/metadata.xml10
-rw-r--r--net-p2p/saku/saku-3.11.0-r2.ebuild45
-rw-r--r--net-p2p/smet2html/Manifest5
-rw-r--r--net-p2p/smet2html/metadata.xml8
-rw-r--r--net-p2p/smet2html/smet2html-0.1.ebuild29
-rw-r--r--net-p2p/soulseek-qt/Manifest6
-rw-r--r--net-p2p/soulseek-qt/metadata.xml8
-rw-r--r--net-p2p/soulseek-qt/soulseek-qt-20160117.ebuild33
-rw-r--r--net-p2p/syncthing/Manifest12
-rw-r--r--net-p2p/syncthing/files/strelaysrv.confd3
-rw-r--r--net-p2p/syncthing/files/strelaysrv.initd30
-rw-r--r--net-p2p/syncthing/files/strelaysrv.logrotate6
-rw-r--r--net-p2p/syncthing/files/syncthing.confd24
-rw-r--r--net-p2p/syncthing/files/syncthing.initd34
-rw-r--r--net-p2p/syncthing/files/syncthing.logrotate6
-rw-r--r--net-p2p/syncthing/metadata.xml21
-rw-r--r--net-p2p/syncthing/syncthing-0.14.35.ebuild123
-rw-r--r--net-p2p/syncthing/syncthing-0.14.38.ebuild123
-rw-r--r--net-p2p/syrep/Manifest5
-rw-r--r--net-p2p/syrep/metadata.xml5
-rw-r--r--net-p2p/syrep/syrep-0.9.ebuild40
-rw-r--r--net-p2p/torrentinfo/Manifest7
-rw-r--r--net-p2p/torrentinfo/files/torrentinfo-1.8.6-fix-tests.patch23
-rw-r--r--net-p2p/torrentinfo/metadata.xml20
-rw-r--r--net-p2p/torrentinfo/torrentinfo-1.8.6-r1.ebuild27
-rw-r--r--net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild23
-rw-r--r--net-p2p/transmission-remote-cli/Manifest5
-rw-r--r--net-p2p/transmission-remote-cli/metadata.xml19
-rw-r--r--net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.1.ebuild33
-rw-r--r--net-p2p/transmission-remote-gtk/Manifest5
-rw-r--r--net-p2p/transmission-remote-gtk/metadata.xml11
-rw-r--r--net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.3.1.ebuild55
-rw-r--r--net-p2p/transmission/Manifest11
-rw-r--r--net-p2p/transmission/files/libsystemd.patch11
-rw-r--r--net-p2p/transmission/files/transmission-2.92-handshake.patch33
-rw-r--r--net-p2p/transmission/files/transmission-daemon.confd.415
-rw-r--r--net-p2p/transmission/files/transmission-daemon.initd.1049
-rw-r--r--net-p2p/transmission/files/transmission-daemon.service.conf2
-rw-r--r--net-p2p/transmission/metadata.xml13
-rw-r--r--net-p2p/transmission/transmission-2.92-r2.ebuild164
-rw-r--r--net-p2p/transmission/transmission-9999.ebuild151
-rw-r--r--net-p2p/tribler/Manifest9
-rw-r--r--net-p2p/tribler/files/tribler-6.2.0-fix-desktop.patch12
-rw-r--r--net-p2p/tribler/files/tribler-log2homedir.patch12
-rw-r--r--net-p2p/tribler/metadata.xml18
-rw-r--r--net-p2p/tribler/tribler-6.3.3-r1.ebuild67
-rw-r--r--net-p2p/tvrss/Manifest5
-rw-r--r--net-p2p/tvrss/metadata.xml8
-rw-r--r--net-p2p/tvrss/tvrss-1.8_beta.ebuild26
-rw-r--r--net-p2p/vuze-coreplugins/Manifest17
-rw-r--r--net-p2p/vuze-coreplugins/metadata.xml15
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild62
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild51
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-5.7.2.0.ebuild51
-rw-r--r--net-p2p/vuze/Manifest23
-rw-r--r--net-p2p/vuze/files/build.xml68
-rw-r--r--net-p2p/vuze/files/vuze-4.1.0.0-pre75
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch60
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch33
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch45
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-java5.patch11
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch10
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch110
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch42
-rw-r--r--net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch51
-rw-r--r--net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch26
-rw-r--r--net-p2p/vuze/files/vuze-5.7.2.0-disable-osx.patch71
-rw-r--r--net-p2p/vuze/files/vuze.desktop9
-rw-r--r--net-p2p/vuze/metadata.xml15
-rw-r--r--net-p2p/vuze/vuze-4.8.1.2-r1.ebuild143
-rw-r--r--net-p2p/vuze/vuze-5.6.0.0.ebuild144
-rw-r--r--net-p2p/vuze/vuze-5.7.2.0.ebuild144
-rw-r--r--net-p2p/xnap/Manifest5
-rw-r--r--net-p2p/xnap/metadata.xml13
-rw-r--r--net-p2p/xnap/xnap-2.5-r3.ebuild30
349 files changed, 15061 insertions, 0 deletions
diff --git a/net-p2p/airdcpp-webclient/Manifest b/net-p2p/airdcpp-webclient/Manifest
new file mode 100644
index 000000000000..78bb4cd7b01a
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/Manifest
@@ -0,0 +1,9 @@
+AUX airdcpp-webclient-2.1.0-disable-automagic.patch 1106 SHA256 d9e1013899759a8ff2511d6384b54ca56a6a6a018f2420cfebec91b232cfdb4b SHA512 9e16724429869d03138142188b3105e6cd360a6e99595329702fbe5724ce98a951c5c6ae1649df205eeb6203fd99a97957bc82da842234791223690296bbdaac WHIRLPOOL 7814d4b68cf2fba75e6de5e5b50b41a592e7ef7d2fa7d07ac5195d956b35609ef0eacb6dbbd0cf471cc0938fb9efc004f6174efb62a31465e078d023104502d1
+AUX airdcppd.confd 198 SHA256 69890132eb0d7479f76a79903568022bfe4d816d79ec4b79f26ef2c0d45afa72 SHA512 025ec93c208173771fe697574c9161b9af8d740eab0b1290c8d3857961dc3635339bdb9c18b97fdde6fa7dc8924f4453b9c609ca57e61f1cad9ff47683fb613e WHIRLPOOL 918159b29016e9a654ec72b2c3f3dd583ae2faf728318c6e65dcd5ef68cd259545cdff351396aaa57ab0610b6eb00180d2b9bc8265249f9cccbce4c69b31c569
+AUX airdcppd.initd 585 SHA256 82e2a41dd546e609c09b4961bef29751401a7b7349f10de770b83875c1151ecc SHA512 054974808c2e457a36d9b916b60ec0fce68fdfff6b0d1055a03729911d29f3c40ea746d7200880f91e49775c142c57ba3b029ab6389986a31510d780dbcea4b9 WHIRLPOOL 56b8a53c41cc6d55c06a959ed6f6771c1ca832023ee9a2719869c5ac0029ead0b51521d44f824aa591ab78782106163886ab5ece291b08e6837693ff7b881a37
+DIST airdcpp-webclient-2.1.0.tar.gz 844435 SHA256 a8d8a33e3974d23009359709da0bee85e8983e3ea1fe78f21a867078f93b81fa SHA512 755555d30183e772ad5d2e38a813f548e3322ca034b759200f289a834ae21b64f56102f57a13832a837e8a11324efe74a860e941a0f28a02d1f843aed92a328f WHIRLPOOL 5a0a61bcf0ad1de1706786fc2080aeba0ae634386957876a20d1ca638d3fc8b724f5c866d59588f4958a6010fc192d474f1cfe7ff04d4403106ba631b800739b
+DIST airdcpp-webclient-2.2.0.tar.gz 844968 SHA256 77cde1acd8730370e87e3546f9895bb993a459ad8f70e1713803ec3ba0a849cb SHA512 a7fc608109ee5823f844bd575d9355d0cbb4094c89e5dcba522018685d969974e82d3dea56bd334591a424010e0b43858f227e2bb66d738c0151c1456175800d WHIRLPOOL 040076d1fd2d7973ccaa6dd0935c0f2b1828c6e4d3bff6de362fd53656d54bf9a9c5733c23fbee35fd6ece897fd5a2ca2b277ceeda51b03c66277f2c81759eb3
+EBUILD airdcpp-webclient-2.1.0.ebuild 1545 SHA256 549d84527e6b153ef95f46da1b87fa9096d70cdadeaea0d7b2f5f4646b59a080 SHA512 19611bc2fd11c3b5fae5ad5000be6109040cd018a81bd9226079f0144eed66df94f14d931e3dcafc6c751d401c20be8cd6a65cba373dd884839267e4667a8e49 WHIRLPOOL 84e699aaad06c8728a7631ea23e2605aedddb15bee62d58458905961c49845209b1041315524ad5b1d032a5e9f22a7e6527b63b887e8ecd70ca3144096a7af49
+EBUILD airdcpp-webclient-2.2.0.ebuild 1431 SHA256 5c52f29d0a3179df26b04b81999017f6e0a86b95581941237c74c0f53ed81425 SHA512 40fd30c487e3ac0eb2cc80ed3fc40bdda23adb9be229499a47b4abb12e2cff73fd95ab1cc2e920ae8f867d6f3b55cbd441ecee3396bd465b0dbfc0678ad1e902 WHIRLPOOL 00a09f942af4450bb63a4feb233902a9436fce84f8fc10d10ffbe90052700c5507d72cd56ddfc2b8ee210be7da73f4d37229bf77bf6e82b2c0d1b8fed6291779
+MISC ChangeLog 5774 SHA256 413c74dd7918bb53d1912dd52e6573d4d5cc434e7f4c90a1449d9caa4591498b SHA512 a1cec201ee12d72078c8c74d1430ae7042defb53807d2136deb157db7c970c9be1cdde945b412153dc991af11bfba46d972cd4b94b8ed33018280e016702f63b WHIRLPOOL d4b0d8dccd5dab5fe087197b7a3f7ef3cc0bb44eae8794f72abd680e93a6dbd1a72b597bc49f20f5303d58996857d6dde122b44f9986305e29d866f7df2ceffc
+MISC metadata.xml 928 SHA256 1e43915c6ee247c2f6042a67e85e40a26ee440a6bd357c6f4055fa08132ca5b6 SHA512 ceccd70826faff18052a1cfe3cdcef1a253ed1227565fa94e865fba8c0a5b8a03535844a3b78d98f6bc26e8a9f29202f0bf1e19fa833d4356ace1e6b26e3936e WHIRLPOOL 60fac94dc950612f19a1693460127a8b60357c4fb12fd91ba2dcceb5f06eec33088e83a96daf51b265acc36631c785e957d5809baf2a387f62692bd4e63f7286
diff --git a/net-p2p/airdcpp-webclient/airdcpp-webclient-2.1.0.ebuild b/net-p2p/airdcpp-webclient/airdcpp-webclient-2.1.0.ebuild
new file mode 100644
index 000000000000..cee109040c4f
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/airdcpp-webclient-2.1.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy{,3} )
+
+inherit cmake-utils python-any-r1 user
+
+DESCRIPTION="Cross-platform Direct Connect client"
+HOMEPAGE="https://airdcpp-web.github.io/"
+SRC_URI="https://github.com/airdcpp-web/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="nat-pmp +tbb +webui"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-cpp/websocketpp
+ dev-libs/boost:=
+ dev-libs/geoip
+ dev-libs/leveldb:=
+ dev-libs/openssl:0=[-bindist]
+ net-libs/miniupnpc:=
+ sys-libs/zlib
+ virtual/libiconv
+ nat-pmp? ( net-libs/libnatpmp:= )
+ tbb? ( dev-cpp/tbb:= )
+"
+DEPEND="
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ ${RDEPEND}
+"
+PDEPEND="webui? ( www-apps/airdcpp-webui )"
+
+# https://github.com/airdcpp-web/airdcpp-webclient/pull/248
+PATCHES=( "${FILESDIR}/${P}-disable-automagic.patch" )
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ enewgroup airdcppd
+ enewuser airdcppd -1 -1 /var/lib/airdcppd airdcppd
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_WEB_UI=OFF
+ -DENABLE_NATPMP=$(usex nat-pmp)
+ -DENABLE_TBB=$(usex tbb)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newconfd "${FILESDIR}/airdcppd.confd" airdcppd
+ newinitd "${FILESDIR}/airdcppd.initd" airdcppd
+ keepdir /var/lib/airdcppd
+ fowners airdcppd:airdcppd /var/lib/airdcppd
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "Run 'airdcppd --configure' to set up ports and authentication"
+ fi
+}
diff --git a/net-p2p/airdcpp-webclient/airdcpp-webclient-2.2.0.ebuild b/net-p2p/airdcpp-webclient/airdcpp-webclient-2.2.0.ebuild
new file mode 100644
index 000000000000..fd8f46fe630b
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/airdcpp-webclient-2.2.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy{,3} )
+
+inherit cmake-utils python-any-r1 user
+
+DESCRIPTION="Cross-platform Direct Connect client"
+HOMEPAGE="https://airdcpp-web.github.io/"
+SRC_URI="https://github.com/airdcpp-web/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="nat-pmp +tbb +webui"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-cpp/websocketpp
+ dev-libs/boost:=
+ dev-libs/geoip
+ dev-libs/leveldb:=
+ dev-libs/openssl:0=[-bindist]
+ net-libs/miniupnpc:=
+ sys-libs/zlib:=
+ virtual/libiconv
+ nat-pmp? ( net-libs/libnatpmp:= )
+ tbb? ( dev-cpp/tbb:= )
+"
+DEPEND="
+ virtual/pkgconfig
+ ${PYTHON_DEPS}
+ ${RDEPEND}
+"
+PDEPEND="webui? ( www-apps/airdcpp-webui )"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ enewgroup airdcppd
+ enewuser airdcppd -1 -1 /var/lib/airdcppd airdcppd
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_WEB_UI=OFF
+ -DENABLE_NATPMP=$(usex nat-pmp)
+ -DENABLE_TBB=$(usex tbb)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newconfd "${FILESDIR}/airdcppd.confd" airdcppd
+ newinitd "${FILESDIR}/airdcppd.initd" airdcppd
+ keepdir /var/lib/airdcppd
+ fowners airdcppd:airdcppd /var/lib/airdcppd
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "Run 'airdcppd --configure' to set up ports and authentication"
+ fi
+}
diff --git a/net-p2p/airdcpp-webclient/files/airdcpp-webclient-2.1.0-disable-automagic.patch b/net-p2p/airdcpp-webclient/files/airdcpp-webclient-2.1.0-disable-automagic.patch
new file mode 100644
index 000000000000..4e8360e69677
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/files/airdcpp-webclient-2.1.0-disable-automagic.patch
@@ -0,0 +1,40 @@
+commit 8ca829a832db304769ac0d107471ab23d4ce3cce
+Author: Louis Sautier <sautier.louis@gmail.com>
+Date: Wed Jun 21 23:10:03 2017 +0200
+
+ Add options to disable libnatpnp and tbb support
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4d8a49c7..826fce3b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -47,6 +47,10 @@ endif()
+
+
+ # OPTIONS
++OPTION(ENABLE_NATPMP "Enable support for the NAT-PMP protocol via libnatpmp"
++ ON)
++OPTION(ENABLE_TBB "Enable support of the TBB library to improve performance"
++ ON)
+
+ # 1.x had a different default value
+ unset(INSTALL_RUNTIME_PATH CACHE)
+@@ -99,12 +103,16 @@ find_package (OpenSSL REQUIRED)
+ find_package (Threads REQUIRED)
+ find_package (Iconv REQUIRED)
+ find_package (Miniupnpc REQUIRED)
+-find_package (LibNatpmp)
++if(ENABLE_NATPMP)
++ find_package (LibNatpmp)
++endif()
+ find_package (Git)
+ find_package (LevelDB REQUIRED)
+ find_package (websocketpp REQUIRED)
+ find_package (Backtrace)
+-find_package (TBB)
++if(ENABLE_TBB)
++ find_package (TBB)
++endif()
+
+ if (NOT BUILD_SHARED_LIBS)
+ # Shared LevelDB libraries are linked against Snappy already
diff --git a/net-p2p/airdcpp-webclient/files/airdcppd.confd b/net-p2p/airdcpp-webclient/files/airdcppd.confd
new file mode 100644
index 000000000000..af140cb6d3bf
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/files/airdcppd.confd
@@ -0,0 +1,8 @@
+# /etc/conf.d/airdcppd: config file for /etc/init.d/airdcppd
+
+# User and group as which to run
+#AIRDCPPD_USER="airdcppd"
+#AIRDCPPD_GROUP="airdcppd"
+
+# umask used to create files
+#AIRDCPPD_UMASK=007
diff --git a/net-p2p/airdcpp-webclient/files/airdcppd.initd b/net-p2p/airdcpp-webclient/files/airdcppd.initd
new file mode 100644
index 000000000000..1cad833d8ae2
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/files/airdcppd.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+AIRDCPPD_USER="${AIRDCPPD_USER:-${RC_SVCNAME}}"
+AIRDCPPD_GROUP="${AIRDCPPD_GROUP:-${RC_SVCNAME}}"
+AIRDCPPD_UMASK="${SYNCTHING_UMASK:-007}"
+AIRDCPPD_HOME="$(getent passwd "${AIRDCPPD_USER}" | cut -d: -f6)"
+
+command="/usr/bin/airdcppd"
+pidfile="${AIRDCPPD_HOME}/.airdc++/${RC_SVCNAME}.pid"
+command_args="-d"
+start_stop_daemon_args="\
+ --user ${AIRDCPPD_USER} \
+ --group ${AIRDCPPD_GROUP} \
+ --umask ${AIRDCPPD_UMASK} \
+"
+
+depend() {
+ need localmount net
+}
diff --git a/net-p2p/airdcpp-webclient/metadata.xml b/net-p2p/airdcpp-webclient/metadata.xml
new file mode 100644
index 000000000000..ca7220f262bf
--- /dev/null
+++ b/net-p2p/airdcpp-webclient/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sautier.louis@gmail.com</email>
+ <name>Louis Sautier</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">airdcpp-web/airdcpp-webclient</remote-id>
+ <bugs-to>https://github.com/airdcpp-web/airdcpp-webclient/issues</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ AirDC++ Web Client is a cross-platform peer-to-peer file sharing client which allows sharing files with groups of people.
+ </longdescription>
+ <use>
+ <flag name="nat-pmp">Enable support for the NAT-PMP protocol</flag>
+ <flag name="tbb">Enable support of the TBB library to improve performance</flag>
+ <flag name="webui">Enable the Web UI</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/amule/Manifest b/net-p2p/amule/Manifest
new file mode 100644
index 000000000000..1faee4933c16
--- /dev/null
+++ b/net-p2p/amule/Manifest
@@ -0,0 +1,10 @@
+AUX amule-2.2.6-fallocate.diff 687 SHA256 a6d6755f1ecd6af4527df4826a363ed2518155021df395f08074ce0c4998ad41 SHA512 406eb05eecfa7d027f7eaeefa2ead92078d5f7ed0e72f3ce47ac4f1f23b2852577f429f999a009198515e35efacfa6e54283494bb3eaf6332ee6bed9963c65ba WHIRLPOOL 907f21c6dcd9c0b5b69df106d6cb77542d13ae35a29b23bd66a7c8dd6bc257a6032ed2cfb0cc98188b2a5d4ed06f92d2a7b4a009d6e45fa5dac35e010ba45233
+AUX amuled.confd 300 SHA256 6a0a6fbf055e865d2440ad1888b02fb4b9cf93f65f5fa503820dc87e8af4e159 SHA512 88a3fcc64ed4c4729609e3ffef098d4bf30bda0d17b5165fff3417161c18766df79de11c98ee510677291bca7ded33d2a23d3aff0d99781f98173cc189f44901 WHIRLPOOL b1ec7bbaad46645c40dba98fa6dab9e0e406a4e7ef1f6fac41488c35670704104a70cfc0ee5ea8d285ca7cb58adc53f821e89672df6489021b07bd558fd19760
+AUX amuled.initd 1105 SHA256 5db7be2ee1e1f8f86790f1d459d102889e67055451027775416285ccae164cb1 SHA512 3ec351e84da4e33918747de4ccd9ec86895b60f9d94836fc92112489edcfe14af7a21efb79194b80bb81aa666714bd5a21873c954b36948e31369727e71143b6 WHIRLPOOL 51503f64a58639d2d5dee6753df9682acf1926abd6ad33a1ea5f59e4b72184d5984ba81ed8fad03c4a2ff2e09d9354cea33c76d82735c0ab4290430fccfd6acd
+AUX amuleweb.confd 720 SHA256 5bc1be891f5f5d33f5d8fb8d174bb31ee2432242773d93f46082ec8f391fbb2a SHA512 ba760e45002a80bb55e2729178d0901f885e8d142903f8eb98a31b8544bf6989801dabfa0315e0d1f7d8bfa3df5716cce43bf415f45a4605895dc2907716ca41 WHIRLPOOL fce55348d1ba0f2c5730675bfcb71146b5f73842c9bad20139ac497288f0a4318e158e3bf236915d5823e55ebe72471408a9c2900bd31e30f8543adeba4b2550
+AUX amuleweb.initd 1149 SHA256 108c44e1fa1b71ab0277886bfc76fb4d0d4fb98f901fdb4daa6c9dc2a250721a SHA512 4cc944af90ad81f09d74d79dede57d1ff26c1b87649432d14ed294770b04f6ea256c25c194edfdc8f9d0c85929b1c576c31eba9228703e5a21259d83968289b0 WHIRLPOOL 96540ba412aba3dd6803b3e78710c01b98eb9313fc0a242c3b9c24c46ca5998b88593f191b08dd63c3f7da5569c73fe62ccf6d4806a3004ccd943895235c4096
+DIST aMule-2.3.2.tar.xz 3895300 SHA256 f64720fdc8c6cfa06bdcd4ca3922d30a0ddddba9c897f5bec7605009c7683928 SHA512 3064b086f8459b4372ea0c11f239a08167c7beac3dde26889f056f617b480b487bea10c2cae8fdfa1ae99c10fc9e715adc8e01e4b968389861aa47c3ec8c0016 WHIRLPOOL 2907069f705dcb438fb78e049d9a417d42401bff659924c7ed66451b22c6dd35baf52e8100ca81e06c24cd1418ba586e16746bcb4e27314c15fd29407b4e3298
+EBUILD amule-2.3.2-r1.ebuild 2264 SHA256 f83c7cf73a23e70fdbe4c51d4612e9b2bc3074aedddb5b9dc381965ea314081f SHA512 defd04e15bc4d77fe48a78999dac8410228199029011bba8ecf295388354029bf43a1f17741696c65b36acc90dea0e4b5c47ebbcbab5111d4eb95a84949179fc WHIRLPOOL 3bb3a9d033cb97e5e16b208d99c2de9539defd4a30579e5577959c82704ab4c41fafc682632fac8ed6aac2f2d33d1709b17caaa01d47c37d17bf6170164132d3
+MISC ChangeLog 4241 SHA256 476558c61d11b3a702b773b6646ffff1d9807f6ddc494f2f0521e4c596febf78 SHA512 df434d5688e664753f3d22980bc9d588b478e5919c66ca4e4f00c4247cbe885a8a074c69beb2c0db9042fae5bc877dd2ec2a71788d7da481c68d22f873917543 WHIRLPOOL 2301d7dcb2004e88d6746cd2e1d0000fcc1f8ad07b140a89520296ed617893ba27f4fe9ed810e0057f810655207fa6098e037efc7433ebcc2f8e15bcd7d76670
+MISC ChangeLog-2015 24046 SHA256 83dab8e8503aea4a2c7aefa2ff8d1e6124644508a2c7f8e070a8a6e91a6194c4 SHA512 ac16cfcc1e3a6bf22ac876d72a146b1faec92529a936f0988f45ae2071b7d47f6ca75731edecbc5c8aa037d89c8467b8d426be3c7ef9b16d9a8ca5067f934964 WHIRLPOOL d521d3485f76f83aeeba9474da445ce7d01d3232e7707776baf1530d91baceab86bf29a9ea0ce5272ebd6c67a145f7565b72897ce1f6c266cdddf5a8523f9f6f
+MISC metadata.xml 443 SHA256 6e3d721d7e6236390b48832c060f36edc79045878af1cb115f64aa1fba51af2d SHA512 61b72c6f3bf1aaf4d09045f2ff0d1eb053cc55fe4126da2aa25d45ba7ee7c3db604df823cbf02db2a758e1ee108c4516f0223b4c3dfe88a67d75ae7a2bb44d38 WHIRLPOOL 361b5c0b8d47b88ef731b5e5562226b3a89e4faa9ed10b71ee04b86a19db0161dabd2b501280e4a60d4efb1a681e2b34a4ebcd2b4cf79885bd6d95bb70d2b979
diff --git a/net-p2p/amule/amule-2.3.2-r1.ebuild b/net-p2p/amule/amule-2.3.2-r1.ebuild
new file mode 100644
index 000000000000..51bb5d2472b5
--- /dev/null
+++ b/net-p2p/amule/amule-2.3.2-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 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 unicode upnp +X"
+
+COMMON_DEPEND="
+ 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=
+ unicode? ( media-libs/gd:= ) )
+ !net-p2p/imule"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-2.2.6-fallocate.diff" )
+
+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
+}
+
+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
+ einfo "wxGTK with X support will be used"
+ need-wxwidgets unicode
+ else
+ einfo "wxGTK without X support will be used"
+ need-wxwidgets base-unicode
+ fi
+
+ 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 \
+ --without-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.2.6-fallocate.diff b/net-p2p/amule/files/amule-2.2.6-fallocate.diff
new file mode 100644
index 000000000000..8d1485a67786
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.2.6-fallocate.diff
@@ -0,0 +1,23 @@
+Disable fallocate #562992
+
+This is only a workaround to fix FTBFS, the configure check is wrong and needs to be fixed:
+http://www.amule.org/abugs/view.php?id=1572
+
+--- a/src/ThreadTasks.cpp
++++ b/src/ThreadTasks.cpp
+@@ -506,6 +506,15 @@ void CCompletionTask::OnExit()
+ #include <stdlib.h>
+ #include <errno.h>
+
++// #562992
++#if defined(__alpha__) || defined(__hppa__)
++#undef HAVE_FALLOCATE
++#endif
++
++#if defined(__hppa__)
++#undef HAVE_SYS_FALLOCATE
++#endif
++
+ CAllocateFileTask::CAllocateFileTask(CPartFile *file, bool pause)
+ // GetPrintable is used to improve the readability of the log.
+ : CThreadTask(wxT("Allocating"), file->GetFullName().RemoveExt().GetPrintable(), ETP_High),
diff --git a/net-p2p/amule/files/amuled.confd b/net-p2p/amule/files/amuled.confd
new file mode 100644
index 000000000000..f8888bf2a2ba
--- /dev/null
+++ b/net-p2p/amule/files/amuled.confd
@@ -0,0 +1,12 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# owner of amuled process (must be existing)
+AMULEUSER="p2p"
+
+# home directory for amuled (must be existing)
+AMULEHOME="/home/p2p"
+
+# log file (/dev/null for nowhere)
+LOG=/var/log/amuled.log
+
diff --git a/net-p2p/amule/files/amuled.initd b/net-p2p/amule/files/amuled.initd
new file mode 100644
index 000000000000..7a1f87e31576
--- /dev/null
+++ b/net-p2p/amule/files/amuled.initd
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ if ! test -f "${AMULEHOME}/.aMule/amule.conf"; then
+ eerror "You must start and configure amuled before launch it. Sorry."
+ return 1
+ fi
+
+ if pgrep -u ${AMULEUSER} amuled >/dev/null; then
+ eerror "An instance of aMule webserver is already running"
+ return 1
+ fi
+ if [ -e /var/run/amuled.pid ]; then
+ rm /var/run/amuled.pid
+ fi
+
+ ebegin "Starting aMule Daemon"
+ start-stop-daemon --start \
+ --quiet --background \
+ --make-pidfile --pidfile /var/run/amuled.pid \
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuled >${LOG}
+
+ sleep 2
+ if ! pgrep -u ${AMULEUSER} amuled > /dev/null; then
+ eerror "aMule daemon can't be started! Check logfile: ${LOG}"
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping aMule daemon -- please wait"
+ start-stop-daemon --stop --pidfile /var/run/amuled.pid 2>&1 >/dev/null
+ eend $?
+}
+
+restart() {
+ svc_stop
+ while `pgrep -u ${AMULEUSER} amuled >/dev/null`; do
+ sleep 1
+ done
+ svc_start
+}
diff --git a/net-p2p/amule/files/amuleweb.confd b/net-p2p/amule/files/amuleweb.confd
new file mode 100644
index 000000000000..29a3ea624750
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# owner of amuleweb process (must be existing)
+AMULEUSER="p2p"
+
+# home directory for amuleweb (from where to read configuration) (must be existing)
+AMULEHOME="/home/p2p"
+
+# log file (/dev/null for nowhere)
+LOG=/var/log/amuleweb.log
+
+# aMule password (note: not your webserver password, but the external
+# connection one)
+AMULEPWD="secret"
+
+# Full (admin) access password for webserver
+WEBPWD="secret2"
+
+# aMule host (this could be a remote host or usually localhost)
+AMULEHOST="localhost"
+
+# aMule external connection port
+AMULEPORT="4712"
+
+# aMuleweb template (default, php-default, chicane)
+TEMPLATE="default"
diff --git a/net-p2p/amule/files/amuleweb.initd b/net-p2p/amule/files/amuleweb.initd
new file mode 100644
index 000000000000..bf00fcde5d4a
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.initd
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use amuled
+}
+
+start() {
+ if ! test -f "${AMULEHOME}/.aMule/amule.conf"; then
+ eerror "You must start and configure amuleweb before launch it. Sorry."
+ return 1
+ fi
+
+ if pgrep -u ${AMULEUSER} amuleweb >/dev/null; then
+ eerror "An instance of aMule webserver is already running"
+ return 1
+ fi
+
+ if [ -e /var/run/amuleweb.pid ]; then
+ rm /var/run/amuleweb.pid
+ fi
+
+ OPTIONS="-h ${AMULEHOST} -p ${AMULEPORT} -P ${AMULEPWD} -A ${WEBPWD} -t ${TEMPLATE} -q"
+
+ ebegin "Starting aMule WebServer"
+ start-stop-daemon --start \
+ --quiet --background \
+ --make-pidfile --pidfile /var/run/amuleweb.pid \
+ --env HOME="${AMULEHOME}" \
+ --user ${AMULEUSER} \
+ --exec /usr/bin/amuleweb -- ${OPTIONS} 2>&1 >${LOG}
+
+ sleep 1
+ if ! pgrep -u ${AMULEUSER} amuleweb > /dev/null; then
+ eerror "aMule daemon can't be started! Check logfile: ${LOG}"
+ eend 1
+ return 1
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping aMule WebServer"
+ start-stop-daemon --stop --pidfile /var/run/amuleweb.pid 2>&1 >/dev/null
+ eend $?
+}
+
diff --git a/net-p2p/amule/metadata.xml b/net-p2p/amule/metadata.xml
new file mode 100644
index 000000000000..2a3a65502073
--- /dev/null
+++ b/net-p2p/amule/metadata.xml
@@ -0,0 +1,13 @@
+<?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>
+</pkgmetadata>
diff --git a/net-p2p/automatic/Manifest b/net-p2p/automatic/Manifest
new file mode 100644
index 000000000000..a06246dce0f2
--- /dev/null
+++ b/net-p2p/automatic/Manifest
@@ -0,0 +1,7 @@
+AUX automatic.confd 216 SHA256 fc1979292469946ed62ec860f0c12c219cae691eb292b709c75493baec2757a6 SHA512 1e8e9920575f7e2ea45270498bed774c32b9c1078fb179c3de3ef62e3d95e1667c3b9b7600333218a2dcddc317478698fee01d95208e76b9034762f7683b88a5 WHIRLPOOL c8a11778a8dde8f2abf6a8c7fb0a3c13a7eebc90b8b98ad7a2d80036ce58e63f4edc319adba7520a08b1062eca2de511a695f0f0138f97e1f3b280f29986ddd1
+AUX automatic.initd 764 SHA256 7a88a7515946bd3254516ee99eb7d86643574e32f15b89d6aab846adf91cd02b SHA512 892fc15a51c3306db4edb9081df560e32af78ef35d6f982e47a6b272a5facf71f4503b5a885a753e3b99af607e09a81b8fba560b56df752e88431a0a31538f9b WHIRLPOOL 5bae4f7c6d9bad042d0a6b6e41f12e0b27be5421ed8e1542fb6f013101738fdcb7bd0de01c8c8ffa0f33df5167eec09673132882c9e492f1495a543c65e52185
+AUX automatic.logrotate 94 SHA256 68f9b3cd67105809519e031b4b8e25f25bfa9e046572e807abb43181ac924ae9 SHA512 91353a49d18eaac4ad65b5733a333bb173233d45622e8d421bb6ed2b3c0e8443b22f951f90a8f8964d13921debb6289a4c911ca40a8484a648f210a206589771 WHIRLPOOL 7837683ee9d7392e1a647af9e4179e64df45e48a54f5c71220bb121f279575e2c488e51db9c996d5c32c8186519fdd9cd28e1e1ee8463f63a656e23dd9897c0a
+DIST automatic-0.8.3.tar.gz 102181 SHA256 1b5c5c65989d12dc7dcdd031dd7d0c1efad80062d615f63836ac86bd010908b8 SHA512 34061065d53ab362c9bfab9b66aebf7090b7079e5988b1984398410ab07ca2bdfdf3c65dd90bb076b6189120877784294484803d4ce5fa813d3bc13207aeebdd WHIRLPOOL 1c5703919b9009887c2b51428839b5e90fae493e6b5216e1e5aa199448c65ed71086c9e5308b874c8021a0a26aa01e41ea87cfa83d9e9f5bed56c144b5354939
+EBUILD automatic-0.8.3.ebuild 1625 SHA256 c9ec6ebe4214d5f7b6bdcb01c18fe7bca28bdaf5cdead7c03f2bb03329333d72 SHA512 3b5f8123160274ec07c4e12d57ba6a182e4340ab4a2ce2bd39d05d7e93a5acad8aa3dbc5bad6a866a206eeb7724393845a28f9c02ea1635c7bfbaef33f343a94 WHIRLPOOL 32bbfc8e25ba3f099067aca725f743b340b38be5bb8933bfb148d9f1477b55291b9ca82f21bb58ce51e99127c787923ac07017b4e669bb242afbf633cd202233
+MISC ChangeLog 896 SHA256 2eefcc53865dc13233e68f1e2b6d866757a3b6a8ca3568938f79d055f9cf566e SHA512 7ad0cad3c0261654430459d3a3bbb3e649dfbad4d9ff7bb3b3d69821f551b7df47f361a64fd30861b4787054ed87f2e0d33bb4e5020c21d55746abe4902a3cc8 WHIRLPOOL 93c4b914019a9fca81b17d0135e349d3403600cb0f0802d6aa5c7773bc507e806ab0ffb2864071b0568f2760ef673d99c7a992c3b7b9d3026a9560c9f07c14c2
+MISC metadata.xml 917 SHA256 1e06ed0de7b23a7c0c4b9237e06ea73fa079ce0b68a91edd4924d4b8125f1ad2 SHA512 d4d710fc933d81b9b3099bd3ba1054406ee028c43ee600db936312521eb2f148dbb40b1b8cf78c00949072138a61e09445c1fb1e024a1580f4c626473e2605de WHIRLPOOL b6d18a3d6928f0a2565b62deb7e2cef7bae64d84791cd6faff9ee2cfeaae4ab42736ef27952c1133ddbb1f746914fe80518a19cf2d46a07dcbc772f80cec6154
diff --git a/net-p2p/automatic/automatic-0.8.3.ebuild b/net-p2p/automatic/automatic-0.8.3.ebuild
new file mode 100644
index 000000000000..3eb191d1c6b1
--- /dev/null
+++ b/net-p2p/automatic/automatic-0.8.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools user
+
+DESCRIPTION="RSS downloader for Tranmission"
+HOMEPAGE="https://github.com/1100101/Automatic"
+SRC_URI="https://github.com/1100101/Automatic/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+S="${WORKDIR}/${P^}"
+
+RDEPEND="dev-libs/libxml2:2
+ dev-libs/libpcre:3
+ net-misc/curl"
+DEPEND="${RDEPEND}
+ app-admin/logrotate"
+
+src_prepare() {
+ default
+
+ # https://bugs.gentoo.org/426262
+ mv configure.{in,ac} || die "rename failed"
+
+ # Remove CFLAGS and CXXFLAGS defined by upstream
+ sed -i \
+ -e 's/CFLAGS="-Wdeclaration-after-statement -O3 -funroll-loops"/CFLAGS+=""/' \
+ -e 's/CXXFLAGS="-O3 -funroll-loops"/CXXFLAGS+=""/' \
+ configure.ac || die "sed for CXXFLAGS and CFLAGS failed"
+
+ eautoreconf
+}
+
+src_install() {
+ # Install and copy documentation
+ default
+
+ # Install Gentoo init script and its config
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ # Create automatic related directories
+ keepdir /var/lib/${PN}/
+ keepdir /var/log/${PN}/
+
+ # Install logrotate for automatic
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}.logrotate ${PN}
+}
+
+pkg_postinst() {
+ # Add automatic group and user to system
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+
+ elog ""
+ elog "To run automatic you should move /etc/automatic.conf-sample to /etc/automatic.conf and config it."
+ elog "If things go wrong, increase verbose level in /etc/conf.d/automatic and check log file in /var/log/automatic/"
+ elog ""
+}
diff --git a/net-p2p/automatic/files/automatic.confd b/net-p2p/automatic/files/automatic.confd
new file mode 100644
index 000000000000..5e9ae5d69625
--- /dev/null
+++ b/net-p2p/automatic/files/automatic.confd
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/automatic
+
+# Various options.
+# run `samplicator -h` for valid cmdline options
+OPTS="-v 1 -a -l /var/log/automatic/automatic.log"
+
+# Receiver config file
+CONFIG="-c /etc/automatic.conf"
diff --git a/net-p2p/automatic/files/automatic.initd b/net-p2p/automatic/files/automatic.initd
new file mode 100644
index 000000000000..a5c6189b56b1
--- /dev/null
+++ b/net-p2p/automatic/files/automatic.initd
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+
+NAME=${SVCNAME##*.}
+if [ -n "${NAME}" -a "${SVCNAME}" != "automatic" ]; then
+ PID="/run/automatic.${NAME}.pid"
+ PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g')
+ CONF_DEFAULT="/etc/conf.d/automatic.${NAME}"
+else
+ PID="/run/automatic.pid"
+ PNAME=${RC_SVCNAME}
+ CONF_DEFAULT="/etc/conf.d/automatic"
+fi
+CONF=${CONF:-${CONF_DEFAULT}}
+EXEC=${EXEC:-/usr/bin/automatic}
+
+depend() {
+ need net
+ provide automatic
+}
+
+start() {
+ ebegin "Starting automatic"
+ start-stop-daemon --start --quiet --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG}
+ eend $?
+}
+
+start_post() {
+ pgrep -n $(echo ${PNAME}) > ${PID}
+}
+
+stop() {
+ ebegin "Stopping automatic"
+ start-stop-daemon --stop --quiet --pidfile ${PID}
+ rm -f ${PID}
+ eend $?
+}
diff --git a/net-p2p/automatic/files/automatic.logrotate b/net-p2p/automatic/files/automatic.logrotate
new file mode 100644
index 000000000000..1af9c5c57cbc
--- /dev/null
+++ b/net-p2p/automatic/files/automatic.logrotate
@@ -0,0 +1,8 @@
+/var/log/automatic/*.log {
+ daily
+ missingok
+ rotate 90
+ compress
+ notifempty
+ copytruncate
+}
diff --git a/net-p2p/automatic/metadata.xml b/net-p2p/automatic/metadata.xml
new file mode 100644
index 000000000000..6c232fd6b845
--- /dev/null
+++ b/net-p2p/automatic/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>spiderx@spiderx.dp.ua</email>
+ <name>Vladimir Pavljuchenkov</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+Automatic is a RSS daemon that downloads torrent files
+matching regular expression patterns at certain intervals.
+It is capable of adding downloaded torrents directly to Transmission.
+ </longdescription>
+ <upstream>
+ <changelog>https://github.com/1100101/Automatic/blob/master/ChangeLog</changelog>
+ <bugs-to>https://github.com/1100101/Automatic/issues</bugs-to>
+ <remote-id type="github">1100101/Automatic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/bitcoin-cli/Manifest b/net-p2p/bitcoin-cli/Manifest
new file mode 100644
index 000000000000..4b8a256b6b25
--- /dev/null
+++ b/net-p2p/bitcoin-cli/Manifest
@@ -0,0 +1,13 @@
+DIST bitcoin-0.13.0.knots20160814.patches.tar.xz 128520 SHA256 be92292d55e624ce8494210a51d6228f20d3f7b5ee2faf4185ba326a5f18fd30 SHA512 6a02c8bdfbf4373b6e6cff6ebbfe70e71121caae50e39b68e7e73b3dbe83b5717a03710c4a444ed9b5b9d09aee9494affcf52b86f1b05987d16953324d954ca2 WHIRLPOOL c41dbadc730f1b8df2244dd294c63a1989ebaf4bc2057435eeb0743555345a6158c36b34589427c22eb717af9358096fb6ab3dd851fffc5cafafa76c812b7fd8
+DIST bitcoin-0.13.1.knots20161027.patches.tar.xz 386532 SHA256 b3242fa3bf7959de31aba47b4124e582d0a3d2924a5fe48f91676ef586a5d2f0 SHA512 de4fee50bb6fcf416f4d0d52283ae4b80fd06a544e9312808bec167b471bc1a20d6ded1ebba92cef937b2bd7ebae19c5c1153d6a10dad40cba4fb6c0a98b4fb6 WHIRLPOOL 768d3d1fdfe15d5d36d3d724224e3e33da5292764b3264bba89e3186e03d05cf57e957c071850bacc0fb49c7aae6cfd01bb649ffd82acfa4cfe695ef4b7e3b43
+DIST bitcoin-0.13.2.knots20170102.patches.tar.xz 434012 SHA256 837dbc5a69a25a844681971e3b5bc22c93655e893fc579094556c10bc038488a SHA512 a19b9d469ff03396375c6f97e3e1f7f24243518e4ca46390bc33debbe5c09dffc8ee8fff4d656b385e38ef0c70e46a474170fd377b8cb94d6cdc2ff58114b061 WHIRLPOOL a5eaf1076eae2162d672ad705e8085e7034e163095d0645cd3ee522a11062fba8928a2d2dad94bda28538698f61fe46b3501fe978ff7940237e3f6895eafa6ae
+DIST bitcoin-v0.13.0.tgz 5836862 SHA256 f7dfb156667c366390339773cf86efe3dda9318fd3a6d3c25bb0026b93d772af SHA512 ed49df78cab36ba30c83591724f1a21f7d2c49aa9cd5185ac09b52473aebcb7f406885d593cc7d99ffc87e3607bbeb8a7668a15a892fc6c654d31a5cfe3f53c1 WHIRLPOOL 3d03247795f37afd7a08543986d41df6b03d416993aee603637b5bae783bd6cfaf0521e264224e5d8e1b923ea7ce53e47a967ad72ec83a8982a995309aa98b62
+DIST bitcoin-v0.13.1.tgz 5955845 SHA256 8523eb58fcbba68d07ccff0ce3a8878c3de9c9b532949d36dae56969bf3594e0 SHA512 396196fa5325b650c61b966820454712d7e6c3e7a61cb95bacab59a0b6257d113c60105393a2ad1c33623ae81026e15c7356433fd7bafe2888e6b961487259c3 WHIRLPOOL 6795bdd3d57b358c97ffa71f4dbfdae938500c0be190bdaf73829575f34d1a17443e34d71ddb1cae495640b01e8be3de8b8de490cd34ce6fe680c0069e9fd067
+DIST bitcoin-v0.13.2.tgz 6088472 SHA256 f2148eef9ad1a938e2ca053d4ba5712f05245afbcff616e839011ec07324352a SHA512 2c053f1f55a426499e50cbadfccfd7c47be25fd10bb8e3d21fb6f408261c5a0c35f2745891e0eeb0fe953428337e40b6dc730499fcd3ba465315d592352833ca WHIRLPOOL fb25d8cc0360435f1a8c2eb3465911d080eecc9247cb8373ca73bf5bf8a1cce02028e9f0e86102d55049c7a1c164fd04d3e777976c3aa66a21ce5f9ff3d602eb
+EBUILD bitcoin-cli-0.13.0.ebuild 851 SHA256 274f7d1dee996eae98352123bae94f8007151a3c14b5c429fd050b7b59a63d0a SHA512 4a7eabfc87c206479d041fc1025c23bd26d86f0a12e1b0ae0589235b833264a291714259b466c84e8f89e84ffede2a7f26dafcff4693f7d134ea3d3cba4961d7 WHIRLPOOL 82bb4d9a8adc444d5b9bdd62c57c1507f0982e6e3434ed62bc9d96fe3a48d30de8285e2e2d8aa1532d9af16059ef08ffb9fb427a3c36535defc076c3d0bde6de
+EBUILD bitcoin-cli-0.13.1.ebuild 848 SHA256 325ccc5990596fcfcdb49aa639ddec9edc021a12d4112e85a3bf962476489d2a SHA512 5174dc1e5178b000dbf12fa4b14ec90686e6400b243ff1fd453f3930e5efd994356ec2c6d63853174bf168f1e8cfd111e56b00d8756f5de1514560a3a10a067b WHIRLPOOL 51f44b8904888ce7ebecbe5c9f6074aab16e1e9fa68352f0fac242bc8ea16393ed59f31c25c42509fbad6906cc1d9f84f56a9f1fa1196eda6e2f8d69422681f6
+EBUILD bitcoin-cli-0.13.2.ebuild 852 SHA256 f481e5756d3a2f1167811b4566cbdd8ca9808af59c503c66cf54b52d99f4647a SHA512 5abbb63acf981f9fb238a7754868aaf5518e211c7226a43ecb2072b12b202248ff8a77cbfaa635cfeb72b1c08f2e0a1d247fa631ff33f495ca0ed2e4758380e7 WHIRLPOOL 82f28db5c198eb47a1cf4bfa1de59cff321e99a6a4df19be4c8e1bd5117cfa321fffdddeb41eea9b280966237be296a57a95e01a2dd982f3dea2a858c9204086
+EBUILD bitcoin-cli-9999.ebuild 476 SHA256 5ac3fc6e2639a31aeb5f78529a719023f2bc0b83889941576e12e599461a5c4d SHA512 cc4c4837975ec5c90048a9ef6d3c598ee46004138fd57eb43ce06fb6a1acc188110f9208af78707c230a42db6a6bec33b2899ca226bd1e01b58f799182ca81a2 WHIRLPOOL 0e4506dfadc87f14f22aa428fcbce2cb6daf4e48db28620a9276e06974e02ce7a8a03142802894de6c16ad34bee5e7528454e69998049f91e5b158f1f4a3e049
+MISC ChangeLog 5602 SHA256 7266df323f73ca51ca95c38a804ab05dd6e73c8efcccc46f1d6d280a4f7d21d5 SHA512 b06a92ea028321fd9972117ad9d72ff711800b7998a8b0d7f8a9d1f984e8398e61f76cd56a79e77445678415636f0ce5359e3a6255c7256ceddc0737422c623f WHIRLPOOL 1abf93127e7fc22a907c3ca0f2bb8bb39ed2f1d9e159b915c84ee49ded0fe5cb743ded0c632a1045e01276790c02f07e17fb9220f798ce969d308ffd9d8b4fd2
+MISC ChangeLog-2015 1620 SHA256 e899e87b2be7f04bde81c7dd1580d9de9daf9b93ed7810879b7992f52b6b2db3 SHA512 928190b33f0c7e8b07a228ddfdf30790415062e57e54cd5529a3e7512b507a1aec5e3a5a3280ed2265fb166d4d2a11822ccd2a7ecf87b4fe2d4c3efc41f74eef WHIRLPOOL 0a0253a8a90b57062b5f81737c89acb10edfda0a6c1aad6d4610c89b14c3c5603ba3b6f202f7c844772585dfb405d72aa3b57f26127af58d84cc8a6fdae2fbb5
+MISC metadata.xml 615 SHA256 51fbee6b5180d70839cfd889faf33764318750c81e27c10cd49f865d04ae8aac SHA512 040c29a3e1c5221656295920117d05b5d098c445b77efdd39a7e6c3877c663622b98eddbd485e0b6599281ca2a5939035328ffcb7ac1a2cd3d3d1e6324f6b638 WHIRLPOOL dd88fa718e8ec4cb9457db3dce064109f9dfb9a2a824b598cbf5b5eab32e0758de3e92a930320684c684e8c40d29529ac986bb0f8dde218e7bccbefc7e664a30
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.13.0.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.0.ebuild
new file mode 100644
index 000000000000..ed503cc6e949
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="a402396dce64c42ea73535b7dde4a9164d430438"
+BITCOINCORE_LJR_DATE="20160814"
+BITCOINCORE_IUSE="+ljr"
+inherit bash-completion-r1 bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --enable-util-cli
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ doman contrib/debian/manpages/bitcoin-cli.1
+
+ newbashcomp contrib/bitcoind.bash-completion ${PN}
+}
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.13.1.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.1.ebuild
new file mode 100644
index 000000000000..06646283c196
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="03422e564b552c1d3c16ae854f8471f7cb39e25d"
+BITCOINCORE_LJR_DATE="20161027"
+BITCOINCORE_IUSE="+ljr"
+inherit bash-completion-r1 bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --enable-util-cli
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ doman contrib/debian/manpages/bitcoin-cli.1
+
+ newbashcomp contrib/bitcoind.bash-completion ${PN}
+}
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.13.2.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.2.ebuild
new file mode 100644
index 000000000000..2a4bdb7544d1
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.13.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 2010-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="0d719145b018e28d48d35c2646a5962b87c60436"
+BITCOINCORE_LJR_DATE="20170102"
+BITCOINCORE_IUSE="knots"
+inherit bash-completion-r1 bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --enable-util-cli
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ doman contrib/debian/manpages/bitcoin-cli.1
+
+ newbashcomp contrib/bitcoind.bash-completion ${PN}
+}
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild
new file mode 100644
index 000000000000..5ac8fb8bc259
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild
@@ -0,0 +1,24 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_NO_SYSLIBS=1
+BITCOINCORE_IUSE=""
+inherit bitcoincore
+
+DESCRIPTION="Command-line client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+
+src_prepare() {
+ bitcoincore_prepare
+ sed -i 's/bitcoin-tx//' src/Makefile.am || die
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --with-utils
+}
diff --git a/net-p2p/bitcoin-cli/metadata.xml b/net-p2p/bitcoin-cli/metadata.xml
new file mode 100644
index 000000000000..3747c3a5a6e9
--- /dev/null
+++ b/net-p2p/bitcoin-cli/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="knots">Build enhanced Bitcoin Knots version, rather than Bitcoin Core</flag>
+ <flag name="ljr">Enable Luke Dashjr's patches</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">bitcoin/bitcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest
new file mode 100644
index 000000000000..a6dcf3511158
--- /dev/null
+++ b/net-p2p/bitcoin-qt/Manifest
@@ -0,0 +1,14 @@
+AUX 0.13.2-libressl.patch 1761 SHA256 d97e7fc2ef918f9b14852f854040e4ef5747780957946ecc9c4876156cf50cb0 SHA512 88ef81df293bd05dce54aefeda2d0a2c1fd26842ddf26a138760aa365b22637d9d782d41d93967d0a81c6404fd133159d096397c77a2e1ac71787686dc384602 WHIRLPOOL 44efb25a600bfcddd947250c4965a58f8bb3664065d0f4322b897bdf2cf197e346c8728957dfc3f076a1d7eea0ae54082aacfe26109e007626999ed9a494e703
+DIST bitcoin-0.13.0.knots20160814.patches.tar.xz 128520 SHA256 be92292d55e624ce8494210a51d6228f20d3f7b5ee2faf4185ba326a5f18fd30 SHA512 6a02c8bdfbf4373b6e6cff6ebbfe70e71121caae50e39b68e7e73b3dbe83b5717a03710c4a444ed9b5b9d09aee9494affcf52b86f1b05987d16953324d954ca2 WHIRLPOOL c41dbadc730f1b8df2244dd294c63a1989ebaf4bc2057435eeb0743555345a6158c36b34589427c22eb717af9358096fb6ab3dd851fffc5cafafa76c812b7fd8
+DIST bitcoin-0.13.1.knots20161027.patches.tar.xz 386532 SHA256 b3242fa3bf7959de31aba47b4124e582d0a3d2924a5fe48f91676ef586a5d2f0 SHA512 de4fee50bb6fcf416f4d0d52283ae4b80fd06a544e9312808bec167b471bc1a20d6ded1ebba92cef937b2bd7ebae19c5c1153d6a10dad40cba4fb6c0a98b4fb6 WHIRLPOOL 768d3d1fdfe15d5d36d3d724224e3e33da5292764b3264bba89e3186e03d05cf57e957c071850bacc0fb49c7aae6cfd01bb649ffd82acfa4cfe695ef4b7e3b43
+DIST bitcoin-0.13.2.knots20170102.patches.tar.xz 434012 SHA256 837dbc5a69a25a844681971e3b5bc22c93655e893fc579094556c10bc038488a SHA512 a19b9d469ff03396375c6f97e3e1f7f24243518e4ca46390bc33debbe5c09dffc8ee8fff4d656b385e38ef0c70e46a474170fd377b8cb94d6cdc2ff58114b061 WHIRLPOOL a5eaf1076eae2162d672ad705e8085e7034e163095d0645cd3ee522a11062fba8928a2d2dad94bda28538698f61fe46b3501fe978ff7940237e3f6895eafa6ae
+DIST bitcoin-v0.13.0.tgz 5836862 SHA256 f7dfb156667c366390339773cf86efe3dda9318fd3a6d3c25bb0026b93d772af SHA512 ed49df78cab36ba30c83591724f1a21f7d2c49aa9cd5185ac09b52473aebcb7f406885d593cc7d99ffc87e3607bbeb8a7668a15a892fc6c654d31a5cfe3f53c1 WHIRLPOOL 3d03247795f37afd7a08543986d41df6b03d416993aee603637b5bae783bd6cfaf0521e264224e5d8e1b923ea7ce53e47a967ad72ec83a8982a995309aa98b62
+DIST bitcoin-v0.13.1.tgz 5955845 SHA256 8523eb58fcbba68d07ccff0ce3a8878c3de9c9b532949d36dae56969bf3594e0 SHA512 396196fa5325b650c61b966820454712d7e6c3e7a61cb95bacab59a0b6257d113c60105393a2ad1c33623ae81026e15c7356433fd7bafe2888e6b961487259c3 WHIRLPOOL 6795bdd3d57b358c97ffa71f4dbfdae938500c0be190bdaf73829575f34d1a17443e34d71ddb1cae495640b01e8be3de8b8de490cd34ce6fe680c0069e9fd067
+DIST bitcoin-v0.13.2.tgz 6088472 SHA256 f2148eef9ad1a938e2ca053d4ba5712f05245afbcff616e839011ec07324352a SHA512 2c053f1f55a426499e50cbadfccfd7c47be25fd10bb8e3d21fb6f408261c5a0c35f2745891e0eeb0fe953428337e40b6dc730499fcd3ba465315d592352833ca WHIRLPOOL fb25d8cc0360435f1a8c2eb3465911d080eecc9247cb8373ca73bf5bf8a1cce02028e9f0e86102d55049c7a1c164fd04d3e777976c3aa66a21ce5f9ff3d602eb
+EBUILD bitcoin-qt-0.13.0.ebuild 3357 SHA256 b3f4c96e13094c52ecf1986e6812a49736e43aeb13a8ab50786e4cf8ebaaf47b SHA512 e497fedd35c0f5fd8658b0d66e02eb7ef465a5243c41623094905e63f58e2d3c553313602242d67a9b3c1810f588c6aae7cdc0aafa98ee7a48248e1f960c7b1b WHIRLPOOL ad11fc3de3c93e9da3f662fd9e0303b8d68884b5969bed1241fe06309e7a02d1a61810374c7fe4561d2236d393962831dae5cd7d3334c49376417f2840b9ab99
+EBUILD bitcoin-qt-0.13.1-r1.ebuild 3439 SHA256 f177f9306707507d3b4f3010a05e54412d7f3059d499472d527d38a70d5d0191 SHA512 3532a46a44b4cd323968b1ca3984c752b89ea4f728003ccd709218bcc55a8f9aa9efdfcda2de8dd82f5047833aa9c4bffa182f8b56f0af85802da6dea5085b1b WHIRLPOOL 63f2e7eedd35d0940fc92b34caf6cfcea8caa98c81b9c100a6198bd88e9619f81a6b1d77f5ce4258d5832b9f1b87f61f74949a6e677962447dd8e2a1a38d5b7f
+EBUILD bitcoin-qt-0.13.2.ebuild 3513 SHA256 782076cd0cab1d5f6b1dc4f0a0cedc7f26c75f8c315f1d3a802ab63379e56573 SHA512 067c72153669280b7d62f908cc911df53e86e14c165fd3a3af5a93f3e496cf2f334e534bffa1e07be9af466db1b5e82bb8a5c892fd9317e88228205e5a22f5bf WHIRLPOOL 7d43bb149773472c140a48047fafb43369ce62d19f096ff7f24d5dadeb0c7464ef79aa53e821004703fac86063477b41500422c8d265a5f5edcaa17e5ea0f2b0
+EBUILD bitcoin-qt-9999.ebuild 2667 SHA256 8b451488e46a9766bfc4d5ca3f06eb00040c65dd3315043ce2097494d32de378 SHA512 8ffecdcf0425ac4339235a2f90068128e8415583bf6ba903d86af36bee48a268f6cc952229c17be120f303c57c8f9b12208112d2a0533917fd5b6fc58905744f WHIRLPOOL e7e4139d9101c4e97363fef15e5856b415bc416cd7268b5c218233c4dfd8af4c4c524cc616ddb09e6cca86644e3e309b8a21b03d4f5d011ebe6eea99919aa596
+MISC ChangeLog 6613 SHA256 3294e8079a9951ab33c0553dd072e85e9fccecbf0079904a59c6aaa7f67c674e SHA512 eed6626efdc690b7e99502ec13e758248eae39eb2186dc0ebb6f21532e1c9b81c892391352b521b930b86605e9d890f0bb421fd2a268fdc34c6c8dde94025987 WHIRLPOOL b6e178c2e89f58701caee654fefd9751631bddf4bd4cf66f4a6c46fce97b63031c4a9b5fe7895a9932302e6684c08db0e61ce1b40d42772457a0ebc8ef071ead
+MISC ChangeLog-2015 22255 SHA256 ebfcacc863c72dead32277c3d80191762a836439f3cf7829ee50ed5f1a6408e6 SHA512 158750c693b2f3fe316d8831a04b04dcc3e46f6a587777ea4d831742fe061ff26e7ace9496f7bab688429f054f9ff9e7cdd8dace8efbd388db5eb14b81800b89 WHIRLPOOL 7f8a8f0bc56bc2b77b9d1bace29fed3c84667db3e59f90423d503812ed3064d0df01771608e09951c64b83f07e65c098f77803a4e7967c92fa4f4eb07eb157f3
+MISC metadata.xml 1422 SHA256 1a88a95f571d52b9f2e529f50aacdcc850813a2eb10bac651c6c83bbadec000f SHA512 7a42aaaedd65478095e92a93a55e1f121d161cb60ebbd74c3288df89eefd81f307664da5d35469f0937d8e1afd238968d4489a144e357ae78f2a155c837dc2b6 WHIRLPOOL 2d069b4837d629e239134fc1ec5110d93c2a9c8b025daf20ec37eeb27f287518abcfe1a275fa261a9200d13717a5a1e5754e976fbbe83c1303bef3ad67e265fe
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.13.0.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.0.ebuild
new file mode 100644
index 000000000000..ed34111769a0
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="a402396dce64c42ea73535b7dde4a9164d430438"
+BITCOINCORE_LJR_DATE="20160814"
+BITCOINCORE_IUSE="dbus kde +libevent ljr +qrcode qt4 qt5 +http test +tor upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+LANGS="af af_ZA ar be_BY bg bg_BG ca ca@valencia ca_ES cs cs_CZ cy da de el el_GR en en_GB eo es es_AR es_CL es_CO es_DO es_ES es_MX es_UY es_VE et eu_ES fa fa_IR fi fr fr_CA fr_FR gl he hi_IN hr hu id_ID it it_IT ja ka kk_KZ ko_KR ku_IQ ky la lt lv_LV mk_MK mn ms_MY nb nl pam pl pt_BR pt_PT ro ro_RO ru ru_RU sk sl_SI sq sr sr@latin sv ta th_TH tr tr_TR uk ur_PK uz@Cyrl vi vi_VN zh zh_CN zh_HK zh_TW"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bitcoincore eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ qt4? ( dev-qt/qtcore:4[ssl] dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+ ljr? (
+ gnome-base/librsvg
+ media-gfx/imagemagick[png]
+ )
+"
+REQUIRED_USE="^^ ( qt4 qt5 )
+ http? ( libevent ) tor? ( libevent ) libevent? ( http tor )
+ !libevent? ( ljr )
+ libressl? ( ljr )
+"
+
+for lang in ${KNOTS_LANGS}; do
+ REQUIRED_USE="${REQUIRED_USE} linguas_${lang}? ( ljr )"
+done
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang= lan ts x
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ if has $lan $KNOTS_LANGS && ! use ljr; then
+ # Expected
+ continue
+ fi
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in src/qt/locale/*.ts
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts" || die
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ --with-gui=$(usex qt5 qt5 qt4)
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /usr/share/pixmaps
+ if use ljr; then
+ newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
+ else
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+ fi
+ make_desktop_entry "${PN} %u" "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ use zeromq && dodoc doc/zmq.md
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.protocol
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.13.1-r1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.1-r1.ebuild
new file mode 100644
index 000000000000..c0c9c56efacb
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.1-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="03422e564b552c1d3c16ae854f8471f7cb39e25d"
+BITCOINCORE_LJR_DATE="20161027"
+BITCOINCORE_IUSE="dbus kde +libevent ljr +qrcode qt5 +http test +tor upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+LANGS="af af_ZA ar be_BY bg bg_BG ca ca@valencia ca_ES cs cs_CZ cy da de el el_GR en en_GB eo es es_AR es_CL es_CO es_DO es_ES es_MX es_UY es_VE et eu_ES fa fa_IR fi fr fr_CA fr_FR gl he hi_IN hr hu id_ID it it_IT ja ka kk_KZ ko_KR ku_IQ ky la lt lv_LV mk_MK mn ms_MY nb ne nl nl_NL pam pl pt_BR pt_PT ro ro_RO ru ru_RU sk sl_SI sq sr sr@latin sv ta th_TH tr tr_TR uk ur_PK uz@Cyrl vi vi_VN zh zh_CN zh_HK zh_TW"
+KNOTS_LANGS="nl_NL"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bitcoincore eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ !qt5? ( dev-qt/qtcore:4[ssl] dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ dbus? (
+ !qt5? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+ ljr? (
+ gnome-base/librsvg
+ media-gfx/imagemagick[png]
+ )
+"
+REQUIRED_USE="
+ http? ( libevent ) tor? ( libevent ) libevent? ( http tor )
+ !libevent? ( ljr )
+"
+
+for lang in ${KNOTS_LANGS}; do
+ REQUIRED_USE="${REQUIRED_USE} linguas_${lang}? ( ljr )"
+done
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang= lan ts x
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ if has $lan $KNOTS_LANGS && ! use ljr; then
+ # Expected
+ continue
+ fi
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in src/qt/locale/*.ts
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts" || die
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ --with-gui=$(usex qt5 qt5 qt4)
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /usr/share/pixmaps
+ if use ljr; then
+ newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
+ else
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+ fi
+ make_desktop_entry "${PN} %u" "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ use zeromq && dodoc doc/zmq.md
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.protocol
+ dosym "../kde4/services/bitcoin-qt.protocol" "/usr/share/kservices5/bitcoin-qt.protocol"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild
new file mode 100644
index 000000000000..a298b4b62ce0
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.13.2.ebuild
@@ -0,0 +1,132 @@
+# Copyright 2010-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="0d719145b018e28d48d35c2646a5962b87c60436"
+BITCOINCORE_LJR_DATE="20170102"
+BITCOINCORE_IUSE="dbus kde +libevent knots +qrcode qt5 +http test +tor upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+LANGS="af af_ZA ar be_BY bg bg_BG ca ca@valencia ca_ES cs cs_CZ cy da de el el_GR en en_GB eo es es_AR es_CL es_CO es_DO es_ES es_MX es_UY es_VE et et_EE eu_ES fa fa_IR fi fr fr_CA fr_FR gl he hi_IN hr hu id_ID it it_IT ja ka kk_KZ ko_KR ku_IQ ky la lt lv_LV mk_MK mn ms_MY nb ne nl nl_NL pam pl pt_BR pt_PT ro ro_RO ru ru_RU sk sl_SI sq sr sr@latin sv ta th_TH tr tr_TR uk ur_PK uz@Cyrl vi vi_VN zh zh_CN zh_HK zh_TW"
+KNOTS_LANGS="et_EE nl_NL"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bitcoincore eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ !qt5? ( dev-qt/qtcore:4[ssl] dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ dbus? (
+ !qt5? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+ knots? (
+ gnome-base/librsvg
+ media-gfx/imagemagick[png]
+ )
+"
+REQUIRED_USE="
+ http? ( libevent ) tor? ( libevent ) libevent? ( http tor )
+ !libevent? ( knots )
+"
+
+for lang in ${KNOTS_LANGS}; do
+ REQUIRED_USE="${REQUIRED_USE} linguas_${lang}? ( knots )"
+done
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang= lan ts x
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ if has $lan $KNOTS_LANGS && ! use knots; then
+ # Expected
+ continue
+ fi
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in src/qt/locale/*.ts
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts" || die
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ epatch "${FILESDIR}/0.13.2-libressl.patch"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ --with-gui=$(usex qt5 qt5 qt4)
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /usr/share/pixmaps
+ if use knots; then
+ newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
+ else
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+ fi
+ make_desktop_entry "${PN} %u" "Bitcoin Core" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ use zeromq && dodoc doc/zmq.md
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.protocol
+ dosym "../kde4/services/bitcoin-qt.protocol" "/usr/share/kservices5/bitcoin-qt.protocol"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild
new file mode 100644
index 000000000000..c9deeca59a03
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_IUSE="dbus kde +qrcode qt4 qt5 test upnp +wallet zeromq"
+LANGS="af_ZA ar be_BY bg bg_BG bs ca ca@valencia ca_ES cs cs_CZ cy da de el el_GR en en_GB eo es es_CL es_DO es_ES es_MX es_UY es_VE et eu_ES fa fa_IR fi fr fr_CA fr_FR gl he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mk_MK mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru ru_RU sk sl_SI sq sr sv th_TH tr tr_TR uk ur_PK uz@Cyrl vi vi_VN zh zh_CN zh_TW"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bitcoincore eutils fdo-mime gnome2-utils kde4-functions qt4-r2 git-2
+
+DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ qt4? ( dev-qt/qtcore:4[ssl] dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+REQUIRED_USE="^^ ( qt4 qt5 )"
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang= lan ts x
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in src/qt/locale/*.ts
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts" || die
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ --with-gui=$(usex qt5 qt5 qt4)
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /usr/share/pixmaps
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+ make_desktop_entry "${PN} %u" "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ use zeromq && dodoc doc/zmq.md
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.protocol
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch b/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch
new file mode 100644
index 000000000000..415adcc59eae
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.13.2-libressl.patch
@@ -0,0 +1,48 @@
+commit 0388afe69dd85ca9549727ee105ba7017169b464 (HEAD -> EVP_MD_CTX_new, personal-github/EVP_MD_CTX_new)
+Author: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Wed Jan 4 17:07:42 2017 +0000
+
+ Let autoconf detect presence of EVP_MD_CTX_new
+
+ Fixes LibreSSL compatibility
+
+diff --git a/configure.ac b/configure.ac
+index ced258e..02af0d6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -832,6 +832,13 @@ else
+ fi
+ fi
+
++save_CXXFLAGS="${CXXFLAGS}"
++CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}"
++AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
++#include <openssl/x509_vfy.h>
++])
++CXXFLAGS="${save_CXXFLAGS}"
++
+ dnl univalue check
+
+ need_bundled_univalue=yes
+diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
+index 82be4d8..0d4907b 100644
+--- a/src/qt/paymentrequestplus.cpp
++++ b/src/qt/paymentrequestplus.cpp
+@@ -159,7 +159,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
+ std::string data_to_verify; // Everything but the signature
+ rcopy.SerializeToString(&data_to_verify);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX *ctx = EVP_MD_CTX_new();
+ if (!ctx) throw SSLVerifyError("Error allocating OpenSSL context.");
+ #else
+@@ -174,7 +174,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
+ !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
+ throw SSLVerifyError("Bad signature, invalid payment request.");
+ }
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
++#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX_free(ctx);
+ #endif
+
diff --git a/net-p2p/bitcoin-qt/metadata.xml b/net-p2p/bitcoin-qt/metadata.xml
new file mode 100644
index 000000000000..a396da394df7
--- /dev/null
+++ b/net-p2p/bitcoin-qt/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="bitcoin_policy_rbf">Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order</flag>
+ <flag name="bitcoin_policy_spamfilter">Enhanced spam filter policy: Notorious spammers will not be assisted by your node</flag>
+ <flag name="http">Enable support for the JSON-RPC and REST HTTP server (builtin net-p2p/bitcoind)</flag>
+ <flag name="knots">Build enhanced Bitcoin Knots version, rather than Bitcoin Core</flag>
+ <flag name="libevent">Use dev-libs/libevent</flag>
+ <flag name="ljr">Enable Luke Dashjr's patches</flag>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ <flag name="tor">Enable automatic configuration of a Tor hidden service</flag>
+ <flag name="upnp">Enable Universal Plug and Play</flag>
+ <flag name="wallet">Enable wallet support</flag>
+ <flag name="zeromq">Report blocks and transactions via zeromq</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">bitcoin/bitcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
new file mode 100644
index 000000000000..4f17716b87de
--- /dev/null
+++ b/net-p2p/bitcoind/Manifest
@@ -0,0 +1,16 @@
+AUX bitcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
+AUX bitcoind.logrotate-r1 121 SHA256 71b195013cd2fe3091eb03a3b8c18d1f021fa91a2e2c02cc3d50384545580b84 SHA512 a4783a310ea6b77f607bcc45d86d25ffd72794983bd1854b77eb057e86377e067f666ca38073c8efcb06256e1202918c77c8e09382cd8462832dee769017dde1 WHIRLPOOL c2879092a8a60d5e485d0540426c1b2bed0d2d4c230540f7716c193393d68792e75ba39f261ac94e24ccfb9f35a806a8b301c131059f32fce3c55d579d840318
+AUX bitcoind.service 869 SHA256 c24332570f8ac155847372a4f9019a47a2e3c8c15435584dac4153b8eb300bc7 SHA512 d0e23b98bc9109e7e4d8a6459f73d1f9a06a3da71593613e22c5d0f31a8ad7473242b07690c6f22f35358ed869ffa7160d0daa65937462442bfc9028794321ea WHIRLPOOL 7992f776ac36277ce83898920ed5a8abc6b031f1d88214150c362c6f5befc869eb9901bd346da74da9fb56bda500fe9d3d9ff8dd46f1b3f257691cb106754a93
+DIST bitcoin-0.13.0.knots20160814.patches.tar.xz 128520 SHA256 be92292d55e624ce8494210a51d6228f20d3f7b5ee2faf4185ba326a5f18fd30 SHA512 6a02c8bdfbf4373b6e6cff6ebbfe70e71121caae50e39b68e7e73b3dbe83b5717a03710c4a444ed9b5b9d09aee9494affcf52b86f1b05987d16953324d954ca2 WHIRLPOOL c41dbadc730f1b8df2244dd294c63a1989ebaf4bc2057435eeb0743555345a6158c36b34589427c22eb717af9358096fb6ab3dd851fffc5cafafa76c812b7fd8
+DIST bitcoin-0.13.1.knots20161027.patches.tar.xz 386532 SHA256 b3242fa3bf7959de31aba47b4124e582d0a3d2924a5fe48f91676ef586a5d2f0 SHA512 de4fee50bb6fcf416f4d0d52283ae4b80fd06a544e9312808bec167b471bc1a20d6ded1ebba92cef937b2bd7ebae19c5c1153d6a10dad40cba4fb6c0a98b4fb6 WHIRLPOOL 768d3d1fdfe15d5d36d3d724224e3e33da5292764b3264bba89e3186e03d05cf57e957c071850bacc0fb49c7aae6cfd01bb649ffd82acfa4cfe695ef4b7e3b43
+DIST bitcoin-0.13.2.knots20170102.patches.tar.xz 434012 SHA256 837dbc5a69a25a844681971e3b5bc22c93655e893fc579094556c10bc038488a SHA512 a19b9d469ff03396375c6f97e3e1f7f24243518e4ca46390bc33debbe5c09dffc8ee8fff4d656b385e38ef0c70e46a474170fd377b8cb94d6cdc2ff58114b061 WHIRLPOOL a5eaf1076eae2162d672ad705e8085e7034e163095d0645cd3ee522a11062fba8928a2d2dad94bda28538698f61fe46b3501fe978ff7940237e3f6895eafa6ae
+DIST bitcoin-v0.13.0.tgz 5836862 SHA256 f7dfb156667c366390339773cf86efe3dda9318fd3a6d3c25bb0026b93d772af SHA512 ed49df78cab36ba30c83591724f1a21f7d2c49aa9cd5185ac09b52473aebcb7f406885d593cc7d99ffc87e3607bbeb8a7668a15a892fc6c654d31a5cfe3f53c1 WHIRLPOOL 3d03247795f37afd7a08543986d41df6b03d416993aee603637b5bae783bd6cfaf0521e264224e5d8e1b923ea7ce53e47a967ad72ec83a8982a995309aa98b62
+DIST bitcoin-v0.13.1.tgz 5955845 SHA256 8523eb58fcbba68d07ccff0ce3a8878c3de9c9b532949d36dae56969bf3594e0 SHA512 396196fa5325b650c61b966820454712d7e6c3e7a61cb95bacab59a0b6257d113c60105393a2ad1c33623ae81026e15c7356433fd7bafe2888e6b961487259c3 WHIRLPOOL 6795bdd3d57b358c97ffa71f4dbfdae938500c0be190bdaf73829575f34d1a17443e34d71ddb1cae495640b01e8be3de8b8de490cd34ce6fe680c0069e9fd067
+DIST bitcoin-v0.13.2.tgz 6088472 SHA256 f2148eef9ad1a938e2ca053d4ba5712f05245afbcff616e839011ec07324352a SHA512 2c053f1f55a426499e50cbadfccfd7c47be25fd10bb8e3d21fb6f408261c5a0c35f2745891e0eeb0fe953428337e40b6dc730499fcd3ba465315d592352833ca WHIRLPOOL fb25d8cc0360435f1a8c2eb3465911d080eecc9247cb8373ca73bf5bf8a1cce02028e9f0e86102d55049c7a1c164fd04d3e777976c3aa66a21ce5f9ff3d602eb
+EBUILD bitcoind-0.13.0.ebuild 1922 SHA256 97d88edb0cb784e3e0aba0e537e022a93e3b797fc617d801f7783ae54daae9f6 SHA512 231f04e06fe2a9820f66147ba971c96901f506bb74878006c36bb5f459a41387fbd5df328f36c447235af8f81a28e62ab6280a4eeea88bf7261c57d3f2660549 WHIRLPOOL 0c8a988b3b8d417821e3818b736cdd79ef077b9ecaf02c0893cbd42de2dbdb72e77911f78929b3f33a868a88aa8c1e29c65ec9901a6fb967315570f1de6fd989
+EBUILD bitcoind-0.13.1.ebuild 1919 SHA256 9800a679635051483c98016827d05dd5ba7787a194d4ca3dd13d8156edf8b5d4 SHA512 da9c7226dcc905263be4f82330217e8680e5917b7d15620d89ecd0e13e6328fa4d5c8a282950e9824d3c0c6d6e1677c5baaf3c87515aa7c6515afa2d4e921098 WHIRLPOOL 1f8052c0d73da10835d3bf0e099d0eb08fa562c9f2f30d3736770b7b7e363f9a3610544c8061d12f6b595f0770e4522b737c1f1a44b9974c5ffec92d9b1e3bd2
+EBUILD bitcoind-0.13.2.ebuild 1924 SHA256 ab7ded2bbc16242491a7cee92cc0ecc94febb6bfa3671cee8642a1232f64bd3f SHA512 cfdff039da31701c29cdefc2f66c47a3715468c4e5da90d2bfb30bca8d4ec778b498b671df2a28820f4017a32e0f5d8f4d5b78174c0e7bcf92cfbbbc48d5238b WHIRLPOOL cc30cdfee0dc6c2302144f342cbf07452ea82fd570d6c3841b8985ddbaedf7659d59d51c14a18dc34f03a748f0f240ef6bfebf701a2aeacbd8146200f53f68e0
+EBUILD bitcoind-9999.ebuild 1725 SHA256 6883f472072d65c413b7d032e85d2335c638f3c76195ba7844ddeb8a814c536c SHA512 29aeb113c439794d2b5f3854cb473136ec2389da0ffd4ea67a01a31f515a6bfde924c252913c003c0123babcf362fe2cb287387ad4823e27c0a28e15c7dfb064 WHIRLPOOL 2bcbf8f43cb2ed8ca86ccabede515b31364c6009b031d21b3db312339b391169e6cf257a4615fd1016f934a2cd6b4627d5311f57192cdee15a01bfa6a7a61701
+MISC ChangeLog 6094 SHA256 4712861e8c6c205614fae27d172cf4e5d0cc63545d4ecc13aee02e999dfbd43c SHA512 04311e6ae9a53f71882a4f570f75a5d6514dd140a7d22662be88305bcb0a9ff8e53a497cbbf018cbc1e0889a70b77cfbba61e6dec0fd739fedcdf5881426be8a WHIRLPOOL eb6025dce09abfdeae02204fbca05480ffd36bbce63e5299b9a557214ba2ddf7f0abf5d4a5ff0dd738fd166852364b97b9cd604cfc0804abf35947b65e6f50f6
+MISC ChangeLog-2015 24033 SHA256 0f86788a06aa91f42dbf9afc7df804636514719a127a43f4b951c0656aa4ccf6 SHA512 93c1e7a250f88da646913bd03fbdde15c7d837488dbed9647cbc79b7455a64bd6fe856c308276a4ecb300912c20ec68ce5ffa227674bee2fd12ace0cd0fb3712 WHIRLPOOL 95f9a698543c76cc001744e0e4367ba46da7897ea8b6a97af346f6ba31e4eda6be0e824af8350024d32e04b68b0d151712f57a1109b6f983d469ee39573c7e81
+MISC metadata.xml 1099 SHA256 ff761e1edb9cfa0210c3b3785754156c93bd1d0a9a3d40b817ab8b805d5d2f02 SHA512 84c60530afee3534c3057b259ef54767442765023ec1fb1d20430b6f07bd07947f40a582897a1c09d57f1290fb97955c3b188993f12fbe5421a39cb62015608a WHIRLPOOL ca1a9c44cb3b128de3e307013ed48c90816e1696e9f8ff6317c4f72b5a9666e4832ce022c69e9ace63565458cc019be61fb2cec3358590f0c4ab4b5e3d5d82c9
diff --git a/net-p2p/bitcoind/bitcoind-0.13.0.ebuild b/net-p2p/bitcoind/bitcoind-0.13.0.ebuild
new file mode 100644
index 000000000000..926511e91838
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.13.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="a402396dce64c42ea73535b7dde4a9164d430438"
+BITCOINCORE_LJR_DATE="20160814"
+BITCOINCORE_IUSE="examples ljr test upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bash-completion-r1 bitcoincore user systemd
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --with-daemon
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "contrib/init/bitcoind.openrcconf" ${PN}
+ newinitd "contrib/init/bitcoind.openrc" ${PN}
+ systemd_dounit "${FILESDIR}/bitcoind.service"
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ use zeromq && dodoc doc/zmq.md
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{qos,spendfrom,tidy_datadir.sh}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.13.1.ebuild b/net-p2p/bitcoind/bitcoind-0.13.1.ebuild
new file mode 100644
index 000000000000..e7c3d4fe92e8
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.13.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="03422e564b552c1d3c16ae854f8471f7cb39e25d"
+BITCOINCORE_LJR_DATE="20161027"
+BITCOINCORE_IUSE="examples ljr test upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bash-completion-r1 bitcoincore user systemd
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 ~mips ~ppc x86 ~amd64-linux ~x86-linux"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --with-daemon
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "contrib/init/bitcoind.openrcconf" ${PN}
+ newinitd "contrib/init/bitcoind.openrc" ${PN}
+ systemd_dounit "${FILESDIR}/bitcoind.service"
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ use zeromq && dodoc doc/zmq.md
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{qos,spendfrom,tidy_datadir.sh}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.13.2.ebuild b/net-p2p/bitcoind/bitcoind-0.13.2.ebuild
new file mode 100644
index 000000000000..1c1405f7fcdf
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.13.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2010-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="0d719145b018e28d48d35c2646a5962b87c60436"
+BITCOINCORE_LJR_DATE="20170102"
+BITCOINCORE_IUSE="examples knots test upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bash-completion-r1 bitcoincore user systemd
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --with-daemon
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "contrib/init/bitcoind.openrcconf" ${PN}
+ newinitd "contrib/init/bitcoind.openrc" ${PN}
+ systemd_dounit "${FILESDIR}/bitcoind.service"
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ use zeromq && dodoc doc/zmq.md
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{qos,spendfrom,tidy_datadir.sh}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+}
diff --git a/net-p2p/bitcoind/bitcoind-9999.ebuild b/net-p2p/bitcoind/bitcoind-9999.ebuild
new file mode 100644
index 000000000000..39e3f463c34d
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-9999.ebuild
@@ -0,0 +1,65 @@
+# Copyright 2010-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_IUSE="examples test upnp +wallet zeromq"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bash-completion-r1 bitcoincore user systemd
+
+DESCRIPTION="Original Bitcoin crypto-currency wallet for automated services"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind bitcoind\) bitcoin-cli$/\1/' contrib/${PN}.bash-completion || die
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --with-daemon
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /etc/bitcoin
+ newins "${FILESDIR}/bitcoin.conf" bitcoin.conf
+ fowners bitcoin:bitcoin /etc/bitcoin/bitcoin.conf
+ fperms 600 /etc/bitcoin/bitcoin.conf
+
+ newconfd "contrib/init/bitcoind.openrcconf" ${PN}
+ newinitd "contrib/init/bitcoind.openrc" ${PN}
+ systemd_dounit "${FILESDIR}/bitcoind.service"
+
+ keepdir /var/lib/bitcoin/.bitcoin
+ fperms 700 /var/lib/bitcoin
+ fowners bitcoin:bitcoin /var/lib/bitcoin/
+ fowners bitcoin:bitcoin /var/lib/bitcoin/.bitcoin
+ dosym /etc/bitcoin/bitcoin.conf /var/lib/bitcoin/.bitcoin/bitcoin.conf
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ use zeromq && dodoc doc/zmq.md
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{pyminer,qos,spendfrom,tidy_datadir.sh}
+ use zeromq && dodoc -r contrib/zmq
+ fi
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+}
diff --git a/net-p2p/bitcoind/files/bitcoin.conf b/net-p2p/bitcoind/files/bitcoin.conf
new file mode 100644
index 000000000000..c6a55f3d9133
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-p2p/bitcoind/files/bitcoind.logrotate-r1 b/net-p2p/bitcoind/files/bitcoind.logrotate-r1
new file mode 100644
index 000000000000..f9a4702720ab
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoind.logrotate-r1
@@ -0,0 +1,8 @@
+/var/lib/bitcoin/.bitcoin/debug.log {
+ missingok
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP bitcoind
+ endscript
+}
diff --git a/net-p2p/bitcoind/files/bitcoind.service b/net-p2p/bitcoind/files/bitcoind.service
new file mode 100644
index 000000000000..97747009294d
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoind.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/bitcoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/bitcoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="BITCOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/bitcoin/bitcoin.conf
+
+[Unit]
+Description=Bitcoin Daemon
+After=network.target
+
+[Service]
+User=bitcoin
+Environment=BITCOIN_OPTS=
+ExecStart=/usr/bin/bitcoind -daemon=0 $BITCOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/bitcoind/metadata.xml b/net-p2p/bitcoind/metadata.xml
new file mode 100644
index 000000000000..57acfffa65ef
--- /dev/null
+++ b/net-p2p/bitcoind/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="bitcoin_policy_rbf">Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order</flag>
+ <flag name="bitcoin_policy_spamfilter">Enhanced spam filter policy: Notorious spammers will not be assisted by your node</flag>
+ <flag name="knots">Build enhanced Bitcoin Knots version, rather than Bitcoin Core</flag>
+ <flag name="ljr">Enable Luke Dashjr's patches</flag>
+ <flag name="upnp">Enable Universal Plug and Play</flag>
+ <flag name="wallet">Enable wallet support</flag>
+ <flag name="zeromq">Report blocks and transactions via zeromq</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">bitcoin/bitcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/bitflu/Manifest b/net-p2p/bitflu/Manifest
new file mode 100644
index 000000000000..3e5647a50b1d
--- /dev/null
+++ b/net-p2p/bitflu/Manifest
@@ -0,0 +1,11 @@
+AUX bitflu.config 1685 SHA256 5b35f229b96a1ab91764b9735b65c43dfee2dbe67e6df76bdd9c9e86f0478db2 SHA512 c0ed5b1f27f871b80cbfc9148bdc1d9d73a03361587bb2e69df77062335110d841f3e4debdaf16cf8e2d3e2fdd91581f89d09ae58b11608541d57528aec2fa69 WHIRLPOOL 3bc79931ef2ffa52bfe14a50779f18a5abb9bd6ab15f109e23501abd740fd1da0e901d3e4b4c8313d7e47a7105ae1f5df82bc187abc2f33a441e80e5c0950a9e
+AUX bitflu.initd 887 SHA256 deb5c682eeea42e7e04a375d33dfd386a62802bd1093033a2ebc1eb81324240c SHA512 46a11d59198eb428418fe018cd5e95149e385b3c4b642106cb294ecf6ff8576ba3a5de038ec6a71bb7de894680f55b5a38931d101e5d5ee589c0764c9de609ba WHIRLPOOL e5b93712a80e4b0e58925664f065744d05c1056fc8c701b605ef3c2f8ed21b238b9ac61e432e9d6226082f547a2bff5463e2f81598e3af06e2fdc4fc8de66256
+DIST bitflu-1.50.tgz 161614 SHA256 2ab4756467161105e7756c964a9006d17702104c6996a39e7a17d1bc69d00f07 SHA512 58b79b5b0b2c83ec1526b6edbfdc36d46a932634c28a14ed0520f45a4aaac3a6f5d355bb83b996a4e97b6f985ee59fa2169eb2bff5fa4cf8a5b8403a68ad49bb WHIRLPOOL e925c554a89d819bccd8d96c9d78e7faa8e64196d2bf46016c08aaf953e1970bd8e34b7c4e82c39f1410849e85236a4e1dcb2e8594b7ab8b1e493b8612dcb45c
+DIST bitflu-1.51.tgz 161963 SHA256 7b7c360e9818892bec21cc9cf6ef2ea95e0affff8ca6afb58fa18f788d998dd5 SHA512 60520a1017ca9acf38c74da6daf693258335dbb717dc647d2da0319b025ed216df33e79ec3934579b2b931a66cae2db31e6039e035ea8a529a0773df37d19afe WHIRLPOOL 8ff2220d232ac0b079920bd449a9024d59f807802b9d68456fdba43a91484a4980f0aa90e00164ace65a7066b7d582df2ececd2535061fbb3f3c650353e88201
+DIST bitflu-1.52.tgz 162308 SHA256 3df39ffc285204bd15eab4a5bc1bf2767c0003b7ed1b96f22e4772f228436787 SHA512 fff6d253b57e43a2e5a917e508a864304c19d5c12e965abb74905bee1ecea10f79a3f3b7d7d0c8112bedabe2d42288171397bd03136a1f37c439039971659ebe WHIRLPOOL 878e7090c6759c8533cf94bc1685bf2ef4cb2735a4dcf607890afb4c2090396efe1e91936695286e878f72fb3872b551a16764cd47da19898eeeb861eedf8c88
+EBUILD bitflu-1.50.ebuild 1805 SHA256 c0cd47fa8571566cd2b7041cfb14549e41e958269c3b6a9470d8fe12259ea61c SHA512 a6f3d91549b88936a51e8d2935dc62b70c20d989c01dcdcd34fc043249b52d8411b7339d135be7fa5dd94d6d279232ccd01399fe42fe422ac800a6750e067e17 WHIRLPOOL 265f616fc77d1a2d027eb409d1eebbedd240b42e498a2c35e2875378ebd27123fef4cdeeccd8c7f7a579b03efb1af6cfaceb42c5812100ab255890b8555721be
+EBUILD bitflu-1.51.ebuild 1807 SHA256 f0e72150398024f13716d8b8153a26339c2fbecddfd875036118012602b2a9aa SHA512 5b7365761f07d92511da3b04369ccbdc880eefb37e5a2fe36c4e8d5b6423d91b7c029c8cc39bdaccd741ac08fd2e17b2ad6d0bdd6c02ebee2c4c74442e1df908 WHIRLPOOL bc893c90437e5852285ab606f4a371dbd99743e6837ca551726e37e88a5c6d6b4767a069940a80d8b182c2e8f04009a6441c5f2783ede4a1e22ed7e4272eb3dc
+EBUILD bitflu-1.52.ebuild 1807 SHA256 f0e72150398024f13716d8b8153a26339c2fbecddfd875036118012602b2a9aa SHA512 5b7365761f07d92511da3b04369ccbdc880eefb37e5a2fe36c4e8d5b6423d91b7c029c8cc39bdaccd741ac08fd2e17b2ad6d0bdd6c02ebee2c4c74442e1df908 WHIRLPOOL bc893c90437e5852285ab606f4a371dbd99743e6837ca551726e37e88a5c6d6b4767a069940a80d8b182c2e8f04009a6441c5f2783ede4a1e22ed7e4272eb3dc
+MISC ChangeLog 2440 SHA256 58de5e940c5e437dd302575d9eb304f1cef0d4d834e5abd9df2d416ac12cfaeb SHA512 f1eb2dee61d26401e062926459b49fccf6b8e7476e8047fa30206664140324248a484e80e3d4db780c6f0286250b99298c8a47be6537963fd6b93e43a8b4218a WHIRLPOOL b339e82896ae9aca465a60bed409272941006743e2513b6a54bd31bd55e717a940865ce1e12983a098df5f47d655d4a58590c8cac474e39f49c48c3c948278c6
+MISC ChangeLog-2015 3355 SHA256 eccd71dbd807864718e95ec258251543438320189adf67f6b4472a73bf7275fe SHA512 141dd10904e71f18c197daf624a0bbd14138ff523514836c399e185a2748ddf2a3e9b5a7fc9b727a424ab977266f8a00a8b49916f2ca440cda719e19787e9b04 WHIRLPOOL 982b1a7064b066db8d6e897632383c78ada09478ce142925905adabfe7e4e33168e042edc609a595f399c1aa6dd5d15bbd03b305072556592febfd0cd7c13c1e
+MISC metadata.xml 466 SHA256 88ffd2bb5f56638beb279631156f95505dbb96a3a003a5f7c5c0569c489258f7 SHA512 09b471a3ce2088c69698afaedb48b37cdd305f94eea72e402965b090b29d691bde743da8c6891ba6fa880a2b4e37f3c9ea7e3012cf7c68493dac34726417335b WHIRLPOOL c218e97fdd61e0350c05c9ee72a746cf215bf742d2e03cdd41723fa41b8004cc4cdc800c80db4707bdcaf69e874e237d8a6c20f1dbc795ff9f914147b19fe57d
diff --git a/net-p2p/bitflu/bitflu-1.50.ebuild b/net-p2p/bitflu/bitflu-1.50.ebuild
new file mode 100644
index 000000000000..a5530f55b62b
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.50.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit user
+
+DESCRIPTION="BitTorrent client, written in Perl and is designed to run as a daemon"
+HOMEPAGE="http://bitflu.workaround.ch"
+SRC_URI="http://bitflu.workaround.ch/bitflu/${P}.tgz"
+
+LICENSE="Artistic-2 GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ dev-perl/Danga-Socket
+ dev-perl/Sys-Syscall"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup bitflu
+ enewuser bitflu -1 -1 /var/lib/bitflu bitflu
+}
+
+src_compile() { :; }
+
+PLUGINS="/usr/lib/bitflu"
+HOMEDIR="/var/lib/bitflu"
+CONFDIR="/etc/bitflu"
+LOGDIR="/var/log/bitflu"
+
+src_install() {
+ # executable daemon
+ dosbin bitflu.pl
+
+ # plugins
+ insinto "${PLUGINS}"
+ doins -r plugins
+
+ # working dir
+ dodir "${HOMEDIR}"
+ fowners bitflu:bitflu "${HOMEDIR}"
+ fperms 775 "${HOMEDIR}"
+
+ # config file
+ insinto "${CONFDIR}"
+ fowners bitflu:bitflu "${CONFDIR}"
+ fperms 775 "${CONFDIR}"
+ doins "${FILESDIR}"/bitflu.config
+ fowners bitflu:bitflu "${CONFDIR}"/bitflu.config
+ fperms 664 "${CONFDIR}"/bitflu.config
+
+ # log file
+ dodir "${LOGDIR}"
+ fowners bitflu:bitflu "${LOGDIR}"
+ fperms 775 "${LOGDIR}"
+
+ # docs
+ dodoc bitflu.config.example ChangeLog.txt CONTRIBUTING README_IPv6.txt \
+ README.txt Documentation/bitflu-internals.txt
+
+ newinitd "${FILESDIR}"/bitflu.initd bitflu
+}
+
+pkg_postinst() {
+ ewarn "Note: At startup, or at the user's request, ${PN} (re)reads its"
+ ewarn "configuration file and overwrites it with its own sanitized"
+ ewarn "version. A backup is created in the configuration directory,"
+ ewarn "/etc/${PN}, but that file will subseqently be overwritten if"
+ ewarn "a further backup is made. You may want to keep your own backup."
+ ewarn "A prestine example with comments may be found in /usr/share/doc/${P}."
+}
diff --git a/net-p2p/bitflu/bitflu-1.51.ebuild b/net-p2p/bitflu/bitflu-1.51.ebuild
new file mode 100644
index 000000000000..2fa8182e044b
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.51.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit user
+
+DESCRIPTION="BitTorrent client, written in Perl and is designed to run as a daemon"
+HOMEPAGE="http://bitflu.workaround.ch"
+SRC_URI="http://bitflu.workaround.ch/bitflu/${P}.tgz"
+
+LICENSE="Artistic-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-perl/Danga-Socket
+ dev-perl/Sys-Syscall"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup bitflu
+ enewuser bitflu -1 -1 /var/lib/bitflu bitflu
+}
+
+src_compile() { :; }
+
+PLUGINS="/usr/lib/bitflu"
+HOMEDIR="/var/lib/bitflu"
+CONFDIR="/etc/bitflu"
+LOGDIR="/var/log/bitflu"
+
+src_install() {
+ # executable daemon
+ dosbin bitflu.pl
+
+ # plugins
+ insinto "${PLUGINS}"
+ doins -r plugins
+
+ # working dir
+ dodir "${HOMEDIR}"
+ fowners bitflu:bitflu "${HOMEDIR}"
+ fperms 775 "${HOMEDIR}"
+
+ # config file
+ insinto "${CONFDIR}"
+ fowners bitflu:bitflu "${CONFDIR}"
+ fperms 775 "${CONFDIR}"
+ doins "${FILESDIR}"/bitflu.config
+ fowners bitflu:bitflu "${CONFDIR}"/bitflu.config
+ fperms 664 "${CONFDIR}"/bitflu.config
+
+ # log file
+ dodir "${LOGDIR}"
+ fowners bitflu:bitflu "${LOGDIR}"
+ fperms 775 "${LOGDIR}"
+
+ # docs
+ dodoc bitflu.config.example ChangeLog.txt CONTRIBUTING README_IPv6.txt \
+ README.txt Documentation/bitflu-internals.txt
+
+ newinitd "${FILESDIR}"/bitflu.initd bitflu
+}
+
+pkg_postinst() {
+ ewarn "Note: At startup, or at the user's request, ${PN} (re)reads its"
+ ewarn "configuration file and overwrites it with its own sanitized"
+ ewarn "version. A backup is created in the configuration directory,"
+ ewarn "/etc/${PN}, but that file will subseqently be overwritten if"
+ ewarn "a further backup is made. You may want to keep your own backup."
+ ewarn "A prestine example with comments may be found in /usr/share/doc/${P}."
+}
diff --git a/net-p2p/bitflu/bitflu-1.52.ebuild b/net-p2p/bitflu/bitflu-1.52.ebuild
new file mode 100644
index 000000000000..2fa8182e044b
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.52.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit user
+
+DESCRIPTION="BitTorrent client, written in Perl and is designed to run as a daemon"
+HOMEPAGE="http://bitflu.workaround.ch"
+SRC_URI="http://bitflu.workaround.ch/bitflu/${P}.tgz"
+
+LICENSE="Artistic-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-perl/Danga-Socket
+ dev-perl/Sys-Syscall"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup bitflu
+ enewuser bitflu -1 -1 /var/lib/bitflu bitflu
+}
+
+src_compile() { :; }
+
+PLUGINS="/usr/lib/bitflu"
+HOMEDIR="/var/lib/bitflu"
+CONFDIR="/etc/bitflu"
+LOGDIR="/var/log/bitflu"
+
+src_install() {
+ # executable daemon
+ dosbin bitflu.pl
+
+ # plugins
+ insinto "${PLUGINS}"
+ doins -r plugins
+
+ # working dir
+ dodir "${HOMEDIR}"
+ fowners bitflu:bitflu "${HOMEDIR}"
+ fperms 775 "${HOMEDIR}"
+
+ # config file
+ insinto "${CONFDIR}"
+ fowners bitflu:bitflu "${CONFDIR}"
+ fperms 775 "${CONFDIR}"
+ doins "${FILESDIR}"/bitflu.config
+ fowners bitflu:bitflu "${CONFDIR}"/bitflu.config
+ fperms 664 "${CONFDIR}"/bitflu.config
+
+ # log file
+ dodir "${LOGDIR}"
+ fowners bitflu:bitflu "${LOGDIR}"
+ fperms 775 "${LOGDIR}"
+
+ # docs
+ dodoc bitflu.config.example ChangeLog.txt CONTRIBUTING README_IPv6.txt \
+ README.txt Documentation/bitflu-internals.txt
+
+ newinitd "${FILESDIR}"/bitflu.initd bitflu
+}
+
+pkg_postinst() {
+ ewarn "Note: At startup, or at the user's request, ${PN} (re)reads its"
+ ewarn "configuration file and overwrites it with its own sanitized"
+ ewarn "version. A backup is created in the configuration directory,"
+ ewarn "/etc/${PN}, but that file will subseqently be overwritten if"
+ ewarn "a further backup is made. You may want to keep your own backup."
+ ewarn "A prestine example with comments may be found in /usr/share/doc/${P}."
+}
diff --git a/net-p2p/bitflu/files/bitflu.config b/net-p2p/bitflu/files/bitflu.config
new file mode 100644
index 000000000000..760a9eb350c7
--- /dev/null
+++ b/net-p2p/bitflu/files/bitflu.config
@@ -0,0 +1,45 @@
+# Written by Bitflu::Configuration@2835 on Thu Jun 30 07:53:38 2011
+autocancel = 1.5
+autocommit = 1
+autoload_dir = /var/lib/bitflu/autoload
+autoload_scan = 300
+chdir =
+checkversion = 1309395241
+completed_downloads = /var/lib/bitflu/seeding
+downspeed = 0
+history = 1
+http_autoloadtorrent = 1
+http_maxthreads = 10
+incomplete_downloads = /var/lib/bitflu/unfinished
+ipv6 = 1
+kademlia_idseed = 0
+logfile = /var/log/bitflu/bitflu.log
+loglevel = 5
+min_free_mb = 0
+pidfile = /var/run/bitflu/bitflu.pid
+plugindir = /usr/lib/bitflu/plugins
+pluginexclude =
+renice = 8
+storage = StorageVFS
+telnet_bind = 127.0.0.1
+telnet_maxhist = 20
+telnet_port = 4001
+telnet_view = type,name=25,hash,peers,pieces,bytes,percent,ratio,up,down,eta,note
+torrent_bind = 0
+torrent_gcpriority = 5
+torrent_importdir = /var/lib/bitflu/import
+torrent_maxpeers = 80
+torrent_maxreq = 6
+torrent_port = 6688
+torrent_totalpeers = 400
+torrent_tracker_autoudp = 1
+torrent_tracker_udpport = 6689
+torrent_trackerblacklist =
+torrent_upslots = 10
+unshared_downloads = /var/lib/bitflu/removed
+upspeed = 35
+vfs_use_fallocate = 0
+webgui_bind = 127.0.0.1
+webgui_port = 4081
+workdir = /var/lib/bitflu
+# EOF #
diff --git a/net-p2p/bitflu/files/bitflu.initd b/net-p2p/bitflu/files/bitflu.initd
new file mode 100644
index 000000000000..c75bdf0a23f9
--- /dev/null
+++ b/net-p2p/bitflu/files/bitflu.initd
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/sbin/bitflu.pl
+PIDDIR=/var/run/bitflu
+PIDFILE=${PIDDIR}/bitflu.pid
+CONFFILE=/etc/bitflu/bitflu.config
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f ${CONFFILE} ]; then
+ eerror "No config file ${CONFFILE}"
+ return 1
+ fi
+
+ if [ ! -d ${PIDDIR} ] && ! mkdir -p ${PIDDIR}; then
+ eerror "Failed to create ${PIDDIR}"
+ return 1
+ fi
+
+ chown bitflu:bitflu ${PIDDIR}
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting bitflu"
+ start-stop-daemon --start --pidfile "${PIDFILE}" --user bitflu:bitflu \
+ --exec "${DAEMON}" -- --config="${CONFFILE}" --daemon -q >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stoping bitflu"
+ start-stop-daemon --stop --pidfile "${PIDFILE}" --exec "${DAEMON}"
+ eend $?
+}
+
+restart() {
+ svc_stop
+ sleep 2
+ svc_start
+}
diff --git a/net-p2p/bitflu/metadata.xml b/net-p2p/bitflu/metadata.xml
new file mode 100644
index 000000000000..7caed09d510c
--- /dev/null
+++ b/net-p2p/bitflu/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <longdescription lang="en">
+ Bitflu is a free BitTorrent client. The client was written in Perl and
+ is designed to run as a daemon (7x24h , like mlnet) on Linux, *BSD and
+ maybe even OSX.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-p2p/bittornado/Manifest b/net-p2p/bittornado/Manifest
new file mode 100644
index 000000000000..4dbe46810ffd
--- /dev/null
+++ b/net-p2p/bittornado/Manifest
@@ -0,0 +1,10 @@
+AUX bittornado-0.3.18-wxversion.patch 2808 SHA256 1b643fdf05458139641afc582493dbf2d92e0717c4423da3536af78bf7a9132e SHA512 df826f65f23be2b0c288666a57f755ad99e202f621143225ef232131bb821697b5e0bf8f3c9c7ee18644ca637c5172a0de3f88090a0bb413a99e23b6f9e36635 WHIRLPOOL 19ebb5cf1bda0ee688a2ef3dfd28082c2d33936224ea2cc7c07e33b51a693651a6523b2ca472cd2a7a6b9d51859542b9fb6170a77c9cc76baf03834a0550ddf0
+AUX bttrack.conf 613 SHA256 72eafd432074548c8a8370a585001f6090a57d00a8dd746207abac7f2178ca93 SHA512 62d63735f3329cca879aff33d64b2ab5bd12ea99ca94fe581980382dbf8a12a25ef39c8adcbdd45295ea9055fbe2e156473e072081618cb6175a77434ad0f8a4 WHIRLPOOL 528f0de5db9fdb8b373072a79151ee46d5f5400928b40d1aa452928b70097b06d082a0f579772e0e836d7e154404685cc5a9aee4b06985e107fd5b1db8038ea1
+AUX bttrack.rc 519 SHA256 7168d95fab252fa467a209e7043811283d71d953ea1131c1fdb3b8f1198b74f2 SHA512 74255a6dae0d5b1b5809dd6b7b792bb1f681d9c002dd64c0b633e4c903af8748922abe4521d0e52f23ad2d1f12066bf6a2eec1ad8112251e081f07002609eae0 WHIRLPOOL 9e5f7aa67de5bab3b288de4ce9f6ed1c00cda1fb6e40b3c9f04eb8ec5423f631aa54ed6e3e3cefdd075926d1fb52ae02476119bf01522b73f2baaff1461b505b
+DIST BitTornado-0.3.18.tar.gz 189227 SHA256 d9e6ad0bf5b2e9820bab809c5a4fcd94e844a57f396ac51547fe47dbe255d9e0 SHA512 61a55726d93ddb245e18e47f41dea982b8faa7d3296c3a7221d00e0fe71db772613c3ee113bb7df18390807dda8c77859ed7159a03535446ca417a1344e3c0d6 WHIRLPOOL f3393b5907a86c590e7d760760f11e8b671d90c9c8ff14d783904fce688243bd06abf46f6938fc9992f44653198eba99b062c1f19836cb4502ca9569e6b0c598
+DIST BitTornado-0.4.1_p20160925.tar.gz 164352 SHA256 e2aeb636a7ba6cfc1aecb233e611aa17d97f43d0c3381413e39c7f019f085f4d SHA512 09971cc5705c421c4440cd51b9aa37da9f8ce992a882d342c0547fe1771199fa61c4924f6d6cd321776f9dcefafd3e244b9cbfce047c4cdd4502dd0a1a1fdaaa WHIRLPOOL 4177f4dfeb2bd277bcd031ff6ca3e646a0ccb6f6af9aeb3a2def28aac269622bb60e44e9fa43bf2b0f07543214acba24cb74cfe38a5f447d53192299bd24787c
+EBUILD bittornado-0.3.18-r4.ebuild 1461 SHA256 33220fb3dc5c82e16b621338471bf89e9de3ef567782b57caced1d47cf5c94df SHA512 e5433975438df2ae576ad557195dcfe3bc1ff3fb92925763d6c464a3703f699d6d8554bd46a5b79a41d80f2d82ddd7e32b8c8554e8377fba0cd8b15a213ed93f WHIRLPOOL a3038f9d8b1542f24416da9b0720ac14ba6a80474d43960636bf1a58398d589df47b05ab7e82c03976fbf2e3b03097490c2660c640ca6ddfae67b1b9addde980
+EBUILD bittornado-0.4.1_p20160925-r1.ebuild 1286 SHA256 53bca7030c339191742d474d728f6da89b438b980f7cf0b15eb71de70d9ac151 SHA512 9c3942a797c01373d35c1d922d2afecf555fae767d58703697c5700268025503555ca9fefe2fd87d508bd853fad5f5b535d65ed6f98e604bfd59184b9fc44d7b WHIRLPOOL 371957eccdaf808af77e77746cd296e824e48256b8100bd1d3b226fb6c790b03f063a004cfff6c645e99536d90959046d15d2eb79560aa29ad827048dcbe9a58
+MISC ChangeLog 3598 SHA256 5afac19c9288759db564df4cc0ea4a21943d0a11bd36deede181030dada46c32 SHA512 76a90ed5e54988c4e6518ecb1b6e8b4e2acf4847522b653b00bc8dfd194d23afe744ffa5619b49801e2a53fdf725b1ed137537c3227873738625f6bc21b006a4 WHIRLPOOL 71c02dcb087fe5c238df31e5b107fe46adb1a13619539f3f1b8dde0c5738e2306620d83c963ca7732b41cba9740222af221c26c30173d572cd39839f67f39f97
+MISC ChangeLog-2015 10430 SHA256 ca5e48e24549143e259ad010d2963b246d597a0346e3c1112c14a7170b3da246 SHA512 966d5fa77e626a3d39909b0896be2cc409d941e6e05afe7b4be2c0c7ffe134536ae0be4144a95fa04c967dc50002bcc6e6a8bcad996a2e1954af344f6588c379 WHIRLPOOL c7cfa6157b7c2a949e3f5b03723c88453a0e011b24b905069cd88a00797487fe603c7ac340aa45b3e035f96618f7016b9fd4fa53ba0310f9d20494d43ea6004c
+MISC metadata.xml 302 SHA256 ca2d2039353a10d88693628fb1e2112777927fb35aa6ec9918ba18269624fe13 SHA512 a2ed81559aad97406f1099fba266a7a2fa9d97013f267cfc9df5139ebde26495f103f1118fc0b2af825e281b026c434d11300e545aef9eed07b65eb504b47e67 WHIRLPOOL 02138379f5c8a871ae79ff2a9b4644b4d8d02e88114a23639ca09aacc345df4411204a5538964b91c831aa7435e023a8efdcb87ba75f37cc444f6ed2533af3f1
diff --git a/net-p2p/bittornado/bittornado-0.3.18-r4.ebuild b/net-p2p/bittornado/bittornado-0.3.18-r4.ebuild
new file mode 100644
index 000000000000..a9edb21c4c47
--- /dev/null
+++ b/net-p2p/bittornado/bittornado-0.3.18-r4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# note: wxGTK interface has been removed wrt #391685. this ebuild is only for
+# cmdline tools as is.
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PN=BitTornado
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="TheShad0w's experimental BitTorrent client"
+HOMEPAGE="http://www.bittornado.com/"
+SRC_URI="http://download2.bittornado.com/download/${MY_P}.tar.gz"
+# GPL-2 is just for the init script from FILESDIR.
+LICENSE="MIT GPL-2"
+SLOT="0"
+
+KEYWORDS="alpha amd64 ~hppa ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-python/pycrypto[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ >=sys-apps/sed-4.0.5"
+
+S=${WORKDIR}/${MY_PN}-CVS
+PIXMAPLOC=/usr/share/pixmaps/bittornado
+
+python_prepare_all() {
+ # fixes wrong icons path
+ sed -i "s:os.path.abspath(os.path.dirname(os.path.realpath(sys.argv\[0\]))):\"${PIXMAPLOC}/\":" btdownloadgui.py
+ # Needs wxpython-2.6 only, bug #201247
+ eapply "${FILESDIR}"/${P}-wxversion.patch
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ # get rid of any reference to the not-installed gui version
+ rm "${ED%/}"/usr/bin/*gui.py || die
+ rm "${ED%/}$(python_get_scriptdir)"/*gui.py || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ newconfd "${FILESDIR}"/bttrack.conf bttrack
+ newinitd "${FILESDIR}"/bttrack.rc bttrack
+}
diff --git a/net-p2p/bittornado/bittornado-0.4.1_p20160925-r1.ebuild b/net-p2p/bittornado/bittornado-0.4.1_p20160925-r1.ebuild
new file mode 100644
index 000000000000..c5dcbd5245bf
--- /dev/null
+++ b/net-p2p/bittornado/bittornado-0.4.1_p20160925-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit distutils-r1
+
+MY_PN=BitTornado
+MY_P=${MY_PN}-${PV}
+EGIT_COMMIT="ed327c4e1ebbe1fe949be81723527cfda87aeb8d"
+
+DESCRIPTION="John Hoffman's fork of the original bittorrent"
+HOMEPAGE="https://github.com/effigies/BitTornado"
+SRC_URI="https://github.com/effigies/BitTornado/archive/${EGIT_COMMIT}.tar.gz -> ${MY_P}.tar.gz"
+# GPL-2 is just for the init script from FILESDIR.
+LICENSE="MIT GPL-2"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="test"
+
+RDEPEND="
+ || (
+ dev-python/pycryptodome[${PYTHON_USEDEP}]
+ dev-python/pycrypto[${PYTHON_USEDEP}]
+ )"
+DEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_PN}-${EGIT_COMMIT}
+
+python_prepare_all() {
+ # https://github.com/effigies/BitTornado/pull/53
+ sed -e 's:"BitTornado.Tracker":\0, "BitTornado.Types":' -i setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ py.test -v BitTornado/tests || die "tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ newconfd "${FILESDIR}"/bttrack.conf bttrack
+ newinitd "${FILESDIR}"/bttrack.rc bttrack
+}
diff --git a/net-p2p/bittornado/files/bittornado-0.3.18-wxversion.patch b/net-p2p/bittornado/files/bittornado-0.3.18-wxversion.patch
new file mode 100644
index 000000000000..357396303484
--- /dev/null
+++ b/net-p2p/bittornado/files/bittornado-0.3.18-wxversion.patch
@@ -0,0 +1,90 @@
+diff -Naur BitTornado-CVS-orig/btcompletedirgui.py BitTornado-CVS/btcompletedirgui.py
+--- BitTornado-CVS-orig/btcompletedirgui.py 2006-12-23 12:20:52.000000000 -0600
++++ BitTornado-CVS/btcompletedirgui.py 2007-12-04 11:09:36.000000000 -0600
+@@ -19,12 +19,16 @@
+ import sys
+ from os import getcwd
+ from os.path import join
++
+ try:
+- from wxPython.wx import *
+-except:
+- print 'wxPython is either not installed or has not been installed properly.'
++ import wxversion
++ wxversion.select("2.6")
++except Exception, e:
++ print >> sys.stderr, "%s: wxPython 2.6 not installed." %e
+ sys.exit(1)
+
++from wxPython.wx import *
++
+ try:
+ True
+ except:
+diff -Naur BitTornado-CVS-orig/btdownloadgui.py BitTornado-CVS/btdownloadgui.py
+--- BitTornado-CVS-orig/btdownloadgui.py 2007-12-04 11:06:58.000000000 -0600
++++ BitTornado-CVS/btdownloadgui.py 2007-12-04 11:10:36.000000000 -0600
+@@ -18,10 +18,13 @@
+ assert version >= '2', "Install Python 2.0 or greater"
+
+ try:
+- from wxPython.wx import *
+-except:
+- print 'wxPython is either not installed or has not been installed properly.'
+- exit(1)
++ import wxversion
++ wxversion.select("2.6")
++except Exception, e:
++ print >> sys.stderr, "%s: wxPython 2.6 not installed." %e
++ sys.exit(1)
++
++from wxPython.wx import *
+ from BitTornado.download_bt1 import BT1Download, defaults, parse_params, get_usage, get_response
+ from BitTornado.RawServer import RawServer, UPnP_ERROR
+ from random import seed
+diff -Naur BitTornado-CVS-orig/btmaketorrentgui.py BitTornado-CVS/btmaketorrentgui.py
+--- BitTornado-CVS-orig/btmaketorrentgui.py 2006-12-23 12:20:56.000000000 -0600
++++ BitTornado-CVS/btmaketorrentgui.py 2007-12-04 11:11:30.000000000 -0600
+@@ -21,12 +21,16 @@
+ import sys
+ from os import getcwd
+ from os.path import join, isdir
++
+ try:
+- from wxPython.wx import *
+-except:
+- print 'wxPython is either not installed or has not been installed properly.'
++ import wxversion
++ wxversion.select("2.6")
++except Exception, e:
++ print >> sys.stderr, "%s: wxPython 2.6 not installed." %e
+ sys.exit(1)
+
++from wxPython.wx import *
++
+ try:
+ True
+ except:
+diff -Naur BitTornado-CVS-orig/bt-t-make.py BitTornado-CVS/bt-t-make.py
+--- BitTornado-CVS-orig/bt-t-make.py 2006-12-23 12:20:52.000000000 -0600
++++ BitTornado-CVS/bt-t-make.py 2007-12-04 11:14:35.000000000 -0600
+@@ -22,12 +22,16 @@
+ from os import getcwd, listdir
+ from os.path import join, isdir
+ from traceback import print_exc
++
+ try:
+- from wxPython.wx import *
+-except:
+- print 'wxPython is either not installed or has not been installed properly.'
++ import wxversion
++ wxversion.select("2.6")
++except Exception, e:
++ print >> sys.stderr, "%s: wxPython 2.6 not installed." %e
+ sys.exit(1)
+
++from wxPython.wx import *
++
+ try:
+ True
+ except:
diff --git a/net-p2p/bittornado/files/bttrack.conf b/net-p2p/bittornado/files/bttrack.conf
new file mode 100644
index 000000000000..9757ce477ff6
--- /dev/null
+++ b/net-p2p/bittornado/files/bttrack.conf
@@ -0,0 +1,17 @@
+# /etc/conf.d/bttrack
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Change this to this to the port you would like to connect to for the tracker.
+# It is accessible at http://localhost:PORT/ from any web browser.
+PORT=8082
+
+# where to store recent downloader info
+DFILE=/usr/share/bittorrent/tracker.dfile
+
+# path to favicon.ico which many popular web browsers can use
+FAVICON=/usr/share/bittorrent/favicon.ico
+
+# Connection logs are sent to stdout by default, so they should be sent to a
+# file when using this script.
+LOGFILE=/var/log/bttrack.log
diff --git a/net-p2p/bittornado/files/bttrack.rc b/net-p2p/bittornado/files/bttrack.rc
new file mode 100644
index 000000000000..2c1dfe69cafd
--- /dev/null
+++ b/net-p2p/bittornado/files/bttrack.rc
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting bttrack"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/bttrack.pid \
+ --exec /usr/bin/bttrack.py -- --port ${PORT} \
+ --dfile ${DFILE} --favicon ${FAVICON} --logfile ${LOGFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bttrack"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bttrack.pid
+ eend $?
+}
diff --git a/net-p2p/bittornado/metadata.xml b/net-p2p/bittornado/metadata.xml
new file mode 100644
index 000000000000..751af98c28bc
--- /dev/null
+++ b/net-p2p/bittornado/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zmedico@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">effigies/BitTornado</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/classified-ads/Manifest b/net-p2p/classified-ads/Manifest
new file mode 100644
index 000000000000..498a041bb4d1
--- /dev/null
+++ b/net-p2p/classified-ads/Manifest
@@ -0,0 +1,6 @@
+DIST classified-ads-0.11.tar.gz 2528877 SHA256 afbe6ff38881c8959e269854d984de84ff94d5a900c357c1741ae404fab4ac6b SHA512 29e1af0eac079201354364959af8dc606f4d7595fe4e8013212c4e5b30622d095e2beaeeadce350974ef32680329664ad37aae575c103fa052345acf0a49ed04 WHIRLPOOL 63dce6d025c82e4ab26f51d03cce18c674f98b9ff6860d7329de6be44afbfd9b471f9fbeae3376b121f85325a269bafecf62c8e4be3b89d0cabbf22280ed7820
+DIST classified-ads-graphics-0.11.tar.gz 340476 SHA256 12bd4f581f82c4c805bbf19cc794f7462f9ec0e71358fbc1628fd872169295e2 SHA512 c59f65f37a8e4dddb753dbcdec835e946d9de021c5273319b3cd95ef1c3343715ce4b87d76b2d96264acc791a6cced32967521c74978131bd76fbcfc37bb344d WHIRLPOOL 2535170cdc4cc1d4ad2e204e85b546089b3aa404e4cee0e2ab9d094d6cda869043f24fba29d6f68b37f450ff947c13f02336e63b3236b404cbae528f801cc1ad
+EBUILD classified-ads-0.11.ebuild 1785 SHA256 a71001b5bc8766afbb3a9feef9de6c0705d0b60ef84fffdfa435acd6167b4830 SHA512 0e7cf99cdb07951c6a9ecef4cd32dcce4ffdbfee6c0524e6b7c5b0793b7236f607680f36f95b39215ce2891c22eadce2eeaa9e00da65b67e1f8ed0615de74e8a WHIRLPOOL d67bc514ba549bd606d68fc74fe1c6fb27eb6e6ff015d56582163b3f0580f6ccb796a931b87a76b058c28e17ed10c93b82b2f6a0e613fa2a36c7207639796038
+MISC ChangeLog 7084 SHA256 3e9ec4d49e4c69a6bc6f16e062e99ca894899b8ce5a259ba14441d457ca95541 SHA512 93b70a2f58f66f8535a99fced0ca645020877d7e91e095b6d7aac4122b1d9e56b5d61a39d479922bca844826242e24efbc243115b7dc54ac7bf3de82d03b3a70 WHIRLPOOL b0accfcdea322393d6d0d9d943126a51d736ddd3d2b9188bcdfd39a0c551886536e21a07f63fd4ff83145b8fbb394ad5d6ad6c3f2fc3a9dbb65273b5e43e6751
+MISC ChangeLog-2015 1020 SHA256 8e2cfa6cee03a73b66c760c96aad807d499de971a3f2728fd94d0a91d8738895 SHA512 2ebf8f6e298b6ef7622a3bd8c51e1829170c573f9a0620d60dcacb518b4309c464dd675a8e3d20eee21e5ece948ede4ccc0b62582bc329538baeee310ac341b6 WHIRLPOOL 1db6e139bf61dfc7e2403a32d7050648d935edc009e39d88b2aa2162c370fbab4624a7ca977b2bacbcf03901a89b8d2a8773a5394c024de6cd2db244f67d1200
+MISC metadata.xml 1804 SHA256 e56b1d32fc03213627d50647150fca6ac1695008a577e5d22ecf7ede194e2831 SHA512 cb174e4754cab1452b35b398559441b0d1de777b22dee7d9987ce554b4dffc36ddddd8d1218f443a98f989c7594116417cd509faae9c89a57eeb5ce4a925a817 WHIRLPOOL f9ad42f633247f0829ac57d5cf161c0d6a96fac785a306113504ef689d75b283c2f30a3acbc556eb0ed4b2b9600423ff8d2f8e55cbf66bd9a0da037427077f2f
diff --git a/net-p2p/classified-ads/classified-ads-0.11.ebuild b/net-p2p/classified-ads/classified-ads-0.11.ebuild
new file mode 100644
index 000000000000..eb54552c4810
--- /dev/null
+++ b/net-p2p/classified-ads/classified-ads-0.11.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PLOCALES="en fi sv da uk"
+PLOCALE_BACKUP="en"
+inherit qmake-utils virtualx l10n
+
+DESCRIPTION="Program for displaying classified advertisement items"
+HOMEPAGE="http://katiska.org/classified-ads/"
+SRC_URI="https://github.com/operatornormal/classified-ads/archive/${PV}.tar.gz \
+ -> classified-ads-${PV}.tar.gz \
+ https://github.com/operatornormal/classified-ads/blob/graphics/preprocessed.tar.gz?raw=true \
+ -> classified-ads-graphics-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="doc test"
+
+RDEPEND="dev-libs/openssl:0
+ >=net-libs/libnatpmp-20130911
+ <=net-libs/libnatpmp-20140401-r1
+ >=net-libs/miniupnpc-1.8
+ sys-apps/file
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtwidgets:5
+ dev-qt/qtsql:5[sqlite]
+ dev-qt/qtmultimedia:5[widgets]
+ dev-qt/qtprintsupport:5
+ media-libs/opus
+ virtual/libintl"
+
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( app-doc/doxygen[dot] )
+ test? ( dev-libs/libgcrypt:0
+ dev-qt/qttest:5
+ sys-devel/gdb:0 )"
+
+src_prepare() {
+ # preprocessed graphics are unpacked into wrong directory
+ # so lets move them into correct location:
+ mv ../ui/* ui/ || die
+ # possible patches
+ eapply_user
+}
+
+src_configure() {
+ eqmake5
+ if use test; then
+ cd test || die
+ eqmake5
+ fi
+}
+
+src_compile() {
+ emake
+ if use doc; then
+ pushd doc > /dev/null || die
+ doxygen || die
+ popd > /dev/null || die
+ fi
+ if use test; then
+ pushd test > /dev/null || die
+ emake
+ popd > /dev/null || die
+ fi
+}
+
+src_test() {
+ # testca will return 0 if all unit tests pass
+ virtx ./test/testca
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}" DESTDIR="${D}"
+ use doc && dodoc -r doc/doxygen.generated/html/
+}
diff --git a/net-p2p/classified-ads/metadata.xml b/net-p2p/classified-ads/metadata.xml
new file mode 100644
index 000000000000..901f5cab888c
--- /dev/null
+++ b/net-p2p/classified-ads/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>antti.jarvinen@katiska.org</email>
+ <name>Antti Järvinen</name>
+ <description>proxy maintainer</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Classified ads is an attempt to re-produce parts of the functionality
+ that went away when Usenet news ceased to exist. This attempt tries to
+ fix the problem of disappearing news-servers so that there is no servers
+ required and no service-providers needed for any operation ;
+ data storage is implemented inside client applications that
+ users are running. Features of the program currently include:
+
+ * Posting of ads online. Ads have a category ; there are some
+ pre-defined categories but more can be invented just by typing
+ over the suggested categories.
+ * Replying to ads either in public or privately to operator.
+ * (Small-sized) binary attachments to posts.
+ * Providing basic data of operators - data that operator may enter
+ himself, or leave blank.
+ * Basic searching of content based on words.
+ </longdescription>
+ <upstream>
+ <maintainer status="active">
+ <email>antti.jarvinen@katiska.org</email>
+ <name>Antti Järvinen</name>
+ </maintainer>
+ <changelog>https://github.com/operatornormal/classified-ads/commits/master</changelog>
+ <bugs-to>https://github.com/operatornormal/classified-ads/issues</bugs-to>
+ <remote-id type="github">operatornormal/classified-ads</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/createtorrent/Manifest b/net-p2p/createtorrent/Manifest
new file mode 100644
index 000000000000..ecfe1428904c
--- /dev/null
+++ b/net-p2p/createtorrent/Manifest
@@ -0,0 +1,5 @@
+DIST createtorrent-1.1.4.tar.gz 80605 SHA256 5bb8ae4cc450406afe06609ed4d29a3531ab1a65f519668c5fdbc2eab0b922af SHA512 d15c6d38e90a2941c578396fafaaa1778d5ce597681e0db89189b5c6719e8b69202dd6bb9dd2c279ef939eef8a74dd8e7ca3f0c224a5a4eaa277c3fd9543c24f WHIRLPOOL c7e52a689a4db24df2e92f4b5892d4505f92a7006c5709d8d2654b9ddf8b2258f97a0ff5f97e30cd51f6e7e9b6ee78fdfd0c1be0e394a6670d56c62964c088bd
+EBUILD createtorrent-1.1.4.ebuild 627 SHA256 164ba057d088b90f4a1c1198dc4452c62b24e37edc6fd18aa8ab4bca4b031b7b SHA512 567181f1157673d05e4c7391f121b5bd310e084ee970440ee1e8cd78e729a3583c5cb4a7c32ad82eb48658ab2b870f60353baefd23f13930d0fb13e7c0ad56fe WHIRLPOOL e58e592fd13c5bcca8979ce17330945087039a8216b39bbb6cdb076bf4fc94cbeaa49484e068965e5a910ba32037e97c5588d6ae593e9cdc0ad34beea49d75a1
+MISC ChangeLog 2473 SHA256 aead91b0f535ec91972aca75312407dbe4b018fd44ac88abfcd7703726810c92 SHA512 c2c8749cd04faecf86d3e8c74aee759c7471e2e61d30eea8860d3ad6dc108357f1df18ce4ef99d6e6ceac892f09472a83f8b492a4cb5429f38df32e36989824f WHIRLPOOL e9914c213116602b30829cafb6468c882678f319f6c0649086d055996d8e8aa5506dc4b4f5b26e254dd7a9ccef9d49ce0981175c15e05c446620f50e22045f0c
+MISC ChangeLog-2015 1441 SHA256 91f3402079eb7b1a5ce2fee468aee28b6b26c74a1faff9e1b1d3299808455a3d SHA512 7b92bc587151d3d8bb448bf990851cefb5d4d32dcd2b1374c2caf7d92b4d61f311641710c75600a1503183ccc51d40963c10d2197c112d3447b9d334d585b093 WHIRLPOOL 1334a9c3e31eaf107d5ff8668ad32d14c0fd37a99ef07316596eb79e58e17bf6ac368b9a637b57942b752b2222b70d05bcabeeed840080a2de19a6d9d9f20d79
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-p2p/createtorrent/createtorrent-1.1.4.ebuild b/net-p2p/createtorrent/createtorrent-1.1.4.ebuild
new file mode 100644
index 000000000000..bd1271c894bc
--- /dev/null
+++ b/net-p2p/createtorrent/createtorrent-1.1.4.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit autotools eutils
+
+DESCRIPTION="Create BitTorrent files easily"
+HOMEPAGE="http://www.createtorrent.com/"
+SRC_URI="http://www.createtorrent.com/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i "s:[[]ssl[]]:[crypto]:" configure.in || die "sed failed..."
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/net-p2p/createtorrent/metadata.xml b/net-p2p/createtorrent/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-p2p/createtorrent/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-p2p/ctcs/Manifest b/net-p2p/ctcs/Manifest
new file mode 100644
index 000000000000..879884ded6c6
--- /dev/null
+++ b/net-p2p/ctcs/Manifest
@@ -0,0 +1,5 @@
+DIST ctcs-1.4.1.tar.gz 27384 SHA256 9614e88d07c6b128677d4d2638a4a05ae00812ec5157ae0788012abed3172355 SHA512 363ad9e61dfe24a5e49affe03d79e14371062c7fc0730daa9004bb16e263682bff99037995ea09580f501eb63b9ddc3c6ac24d71eee7b88838bad428f3373c34 WHIRLPOOL 7030e62591bb15f44f9edafd8aca2fea3d4bdd7d321d038859b3d478e27482eec750f2a975726b49dd0c5c433b5657dbf72cc7e040d77f0a3425036b4ced5fa8
+EBUILD ctcs-1.4.1.ebuild 471 SHA256 c361b523c6d062026de5cd057e1a195fbe5025a51921de250c7c5f1a7779f628 SHA512 aa0ffb1f815ab563c229a9294237e8dd98f27b674567fa446392aea43b9cb12d9fef8782aabe955f804f28a42bc5b6e101b8f4316fc74009594a6865b789a8e1 WHIRLPOOL 72a54770784132db38661183e83ac0a740bba1f1261ba33caf5dbb4464c778ede7796344a86f0f4c222e6aeda42ad02e1b7e88b7582f45a248b9b01d35f76ae2
+MISC ChangeLog 2446 SHA256 7b8bfa33c631068c8c5ce1453d5fe07355c0e699e0dcade4fbcebc72a7c44c55 SHA512 5cb10b7f36f6ae5f48dbf7a5085d67a37365211b8dce1870e255e884ac44bce703bc9bec2cd4fcbe8eb7c41cc93764fe54ca2028c7200663deae40f029f0aeaf WHIRLPOOL 414ebb28072f20e46c0b052d178daeabd015ac58d06cd0c5259532126973fdc2f782cbea83b4c8e8607622ecaf1d8f802292c5d827baf91ee62b6c78f277094b
+MISC ChangeLog-2015 1434 SHA256 7857757149a8c3bc1b4aa2fa00116841e880883b03cb55de1871f0d50a59b6d4 SHA512 48bf742dcd77daa5291ea70249a707bfb20f52d8a7d672f289ca695115e9739543726f4867bc19f1f6b0309de199f1d885dafa64dfef43461b1af1ede95699c0 WHIRLPOOL 8b962b85bc1540ee69b7310b39fe6731bd78623774830b5d006bab1fa930eb92c8f10f4a74ed163de23ef372ca72e649275d9d394ff9ec6830884f4eb939828a
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-p2p/ctcs/ctcs-1.4.1.ebuild b/net-p2p/ctcs/ctcs-1.4.1.ebuild
new file mode 100644
index 000000000000..3276110e24fd
--- /dev/null
+++ b/net-p2p/ctcs/ctcs-1.4.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="interface for monitoring and managing Enhanced CTorrent clients"
+HOMEPAGE="http://www.rahul.net/dholmes/ctorrent/ctcs.html"
+SRC_URI="http://www.rahul.net/dholmes/ctorrent/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ >=net-p2p/ctorrent-3.3.1"
+
+src_install() {
+ dobin ctcs || die
+ dodoc readme.txt
+}
diff --git a/net-p2p/ctcs/metadata.xml b/net-p2p/ctcs/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-p2p/ctcs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-p2p/ctorrent/Manifest b/net-p2p/ctorrent/Manifest
new file mode 100644
index 000000000000..c3d1000a5fd1
--- /dev/null
+++ b/net-p2p/ctorrent/Manifest
@@ -0,0 +1,9 @@
+AUX ctorrent-3.3.2-empty-path-components.patch 838 SHA256 234634f4a92a0a8519af5b244f10c39902237bb5ff17ec5f0551f9512942f0e7 SHA512 0465d2c12b4bcd39a247a89c3623f425b53ebf879c50f0f042237a576877cebaaa05c32047878832f2acab1e9c6566f4f1341b1bcf5fbe149744c408a402c8f1 WHIRLPOOL c1d67f35bfd1134b8f288b06ef3164271208468e0aae60c72394f468627271194ebc21ae603f6df5528bcf25e3ca8595ba88022adf0f8bfc7cf79d155efa2875
+AUX ctorrent-3.3.2-negative-ints.patch 442 SHA256 b79e6211c085a1ca676c85b30354b1afc0537e67046c953532c0e0953523a17b SHA512 edc950552e3497d91a98ba320d4fbc49284f07f9a130230a765427b91e1dcde099610d5be16c4b9c9969a446d8908c18dd3884eb207901ae46e4b696d1215150 WHIRLPOOL a2e0ea6ef02e38b30793bbe73f62912f7f90d749c169648d7279e5e7dcc7183d79aa6d2a346458fdcd9ffa1edaf8fa3166a321e18b3927d6c1726da46f333a1a
+AUX ctorrent-CVE-2009-1759.patch 10931 SHA256 4d2735ca6bf8704097eae5ee79936d2be6a55074bce86bf74b79dd428a405293 SHA512 ecfe47034e5f54ebc1c7b94b846f7a5f619496928a8dadd7624ae9f51d05ef13b4b6c030373fb5c4817d6e5aee659b072c5b31eb32ff306e4514e4fcb6e5c4ea WHIRLPOOL 8a2e465f962582eb3210d5dfb8e75e115fa5db08567079743fd649ab265c686b6acec97213e8510836d2d3e33a34fb9053db87b36177a1cec09defd126f2ab52
+DIST ctorrent-dnh3.3.2.tar.gz 219053 SHA256 c87366c91475931f75b924119580abd06a7b3cb3f00fef47346552cab1e24863 SHA512 e59b2b899b8603e42a5754d5ce65f661b135b8e107140e0472af379b2b06ee2985239ed0ebf19dcaef788e617b99eac35ad32ad2d10352e2fcf5a6dc084d27dd WHIRLPOOL e89518e8fccd27e91027b954e0a25367536ebab1d91a959d51229a6779cdd0649154536df61316b88c4d9f236af90e0638d81df5c56d8230a4081a35604dc910
+EBUILD ctorrent-3.3.2-r2.ebuild 621 SHA256 79fa50e6b00b75402cfd148c699db15dbc5cf9cfefd0b4eb3ada715da1b885de SHA512 e7bf0ab4e23771852cbba7d7bd17b9c6695fa84a797b5ef200e68f02606bbedbd26277648856b036a2f025ad2122720340aadd81de7a831336910aaec36cac1c WHIRLPOOL 86106d98b5e7381790b1afe0bbe3ab576e5aa683aee0019bf3fdd0f3c55de7aa4bb7157c3dd528c5715cf73032322e2b02440710bc46606f71d6257f193271fe
+EBUILD ctorrent-3.3.2-r3.ebuild 680 SHA256 4a022f7b2055a29b08855b9f4f4b812e5f278bd1efe1ee20574ec72c6db334ed SHA512 6c8022bfd0f631159d44af684fb5c2a57dbb21f9694787dc720374d17f0b7d7474517ac54d06c164fdc1422570036cf67ef07c4483b81789af335fe3bb582be5 WHIRLPOOL c7804df15eecd5451a854e3b88749724619a779862688c21af0d4f392e887aa221dc98bcb895219967e4db75578e87edcc38662eadb991e2fad7ff22772fd28d
+MISC ChangeLog 2963 SHA256 40044a46b2b78674105b875a0f30063c49fba2cf8749cb1db1a33843513135fe SHA512 d40c2106d707e8d4996ce8257e568bdb0a3842b245cecafa62bfb17a01bc5636c8636b41260dad84cb8dfe156eed1227dee1e0836d24c39a5e6e62f7ce844671 WHIRLPOOL 58b7a6f45edd4fb100b26e91a23d177f2f3f2e4e8e44452c51d2f1a306c89c391e565ec7e8a6df951dfbbd6dbe94e4da31095a9e60a4bc64c2f482b69138b1b9
+MISC ChangeLog-2015 7594 SHA256 9a4f4b1725b0bd44a197d6d04ee6f0c1de2043899cb22dfa9a5d105141739f92 SHA512 f1788f41bc58aea7749b07af5b5b87e48d00b0098557b8376f3ed611a7ec3ab5f217c97cf7a6592ed333fe417c41e2c9e1f99ca62ecbe143bbc905a77e45be51 WHIRLPOOL 3a57a3c638c3ac1addbaf330532b34c04cc7a4d1ac8c937c2918c6845c6a89616af65ce1282f5a75c5d9f12248ed0d7095793879fb8600e429f8f49a6a1ea7ec
+MISC metadata.xml 245 SHA256 d230c330a2d4bdab56cbd46c4c4427589c556738054c8be4750208bf44140d46 SHA512 2614273ab49d7d71d4a7c39fde414a2337c4f62fa92f9b803d900dcae5c79299c894a1161ff14269d20f436376c5388b3e3f0cd3ad9d2b6ae766366c7029d6bb WHIRLPOOL 85c99ae1cb2884bb2f8e0003ebfc5279c834f1ef98143d5546bde523e66e0e474f1e49157d9e943eb4904836e45f16602c0e4a24bd9aae71aab5bff7615a934f
diff --git a/net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild b/net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild
new file mode 100644
index 000000000000..a93b57767ba5
--- /dev/null
+++ b/net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${PN}-dnh${PV}"
+
+DESCRIPTION="Enhanced CTorrent is a BitTorrent console client written in C and C++"
+HOMEPAGE="http://www.rahul.net/dholmes/ctorrent/"
+SRC_URI="mirror://sourceforge/dtorrent/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ~s390 ~sh ~sparc x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+DEPEND="dev-libs/openssl:="
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-CVE-2009-1759.patch
+ epatch "${FILESDIR}"/${P}-negative-ints.patch
+}
diff --git a/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild b/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild
new file mode 100644
index 000000000000..ba96a9a0cf3b
--- /dev/null
+++ b/net-p2p/ctorrent/ctorrent-3.3.2-r3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+MY_P="${PN}-dnh${PV}"
+
+DESCRIPTION="Enhanced CTorrent is a BitTorrent console client written in C and C++"
+HOMEPAGE="http://www.rahul.net/dholmes/ctorrent/"
+SRC_URI="mirror://sourceforge/dtorrent/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+DEPEND="dev-libs/openssl:="
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-CVE-2009-1759.patch
+ epatch "${FILESDIR}"/${P}-negative-ints.patch
+ epatch "${FILESDIR}"/${P}-empty-path-components.patch
+}
diff --git a/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch b/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch
new file mode 100644
index 000000000000..fce41d4feff5
--- /dev/null
+++ b/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch
@@ -0,0 +1,38 @@
+rTorrent sometimes creates invalid torrents which has empty path components.
+the bitorrent spec allows for "" strings, but they make no sense in paths.
+so instead of always adding a / in between, skip them. ugh.
+
+for example:
+dict {
+ 'info' => dict {
+ 'name' => str = "some dir" (len = 8)
+ 'files' => list [
+ dict {
+ 'length' => int = 12345567
+ 'path' => list [
+ str = "" (len = 0)
+ str = "foo.bin" (len = 7)
+ ]
+ }
+ ...
+ ]
+ ...
+ }
+ ...
+}
+
+ctorrent will then try to fetch the file "/some dir/foo.bin" instead of
+"some dir/foo.bin" (relative to $PWD).
+
+--- a/bencode.cpp
++++ b/bencode.cpp
+@@ -258,7 +258,8 @@
+ n -= r;
+ if( 'e' == *pb ) break;
+ if( pathname >= endmax ) return 0;
+- *pathname++ = PATH_SP;
++ if (q)
++ *pathname++ = PATH_SP;
+ }
+ *pathname = '\0';
+ return (pb - b + 1);
diff --git a/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch b/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch
new file mode 100644
index 000000000000..c3f98c713d01
--- /dev/null
+++ b/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch
@@ -0,0 +1,17 @@
+allow negative integers ... should fix random "error, initial meta info failed"
+
+https://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959
+
+--- ctorrent-dnh3.3.2/bencode.cpp
++++ ctorrent-dnh3.3.2/bencode.cpp
+@@ -44,6 +44,10 @@
+ p++; len--;
+ }
+
++ if( *p == '-'){
++ p++; len--;
++ }
++
+ for(psave = p; len && isdigit(*p); p++,len--) ;
+
+ if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0;
diff --git a/net-p2p/ctorrent/files/ctorrent-CVE-2009-1759.patch b/net-p2p/ctorrent/files/ctorrent-CVE-2009-1759.patch
new file mode 100644
index 000000000000..196703099f60
--- /dev/null
+++ b/net-p2p/ctorrent/files/ctorrent-CVE-2009-1759.patch
@@ -0,0 +1,364 @@
+Patch for CVE-2009-1759.
+Source: Upstream SVN, rev 302 from the drorrent-3 branch.
+
+Index: bencode.h
+===================================================================
+--- bencode.h (revision 300)
++++ bencode.h (revision 302)
+@@ -25,7 +25,7 @@
+ size_t decode_list(const char *b,size_t len,const char *keylist);
+ size_t decode_rev(const char *b,size_t len,const char *keylist);
+ size_t decode_query(const char *b,size_t len,const char *keylist,const char **ps,size_t *pi,int64_t *pl,int method);
+-size_t decode_list2path(const char *b, size_t n, char *pathname);
++size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen);
+ size_t bencode_buf(const char *str,size_t len,FILE *fp);
+ size_t bencode_str(const char *str, FILE *fp);
+ size_t bencode_int(const uint64_t integer, FILE *fp);
+Index: bencode.cpp
+===================================================================
+--- bencode.cpp (revision 300)
++++ bencode.cpp (revision 302)
+@@ -233,22 +233,28 @@
+ return bencode_end_dict_list(fp);
+ }
+
+-size_t decode_list2path(const char *b, size_t n, char *pathname)
++size_t decode_list2path(const char *b, size_t n, char *pathname, size_t maxlen)
+ {
+ const char *pb = b;
+ const char *s = (char *) 0;
++ const char *endmax = pathname + maxlen - 1;
+ size_t r,q;
+
+ if( 'l' != *pb ) return 0;
+ pb++;
+ n--;
+ if( !n ) return 0;
+- for(; n;){
++ while( n && pathname < endmax ){
+ if(!(r = buf_str(pb, n, &s, &q)) ) return 0;
++ if( q >= maxlen ) return 0;
+ memcpy(pathname, s, q);
+ pathname += q;
+- pb += r; n -= r;
+- if( 'e' != *pb ){*pathname = PATH_SP, pathname++;} else break;
++ maxlen -= q;
++ pb += r;
++ n -= r;
++ if( 'e' == *pb ) break;
++ if( pathname >= endmax ) return 0;
++ *pathname++ = PATH_SP;
+ }
+ *pathname = '\0';
+ return (pb - b + 1);
+Index: btfiles.cpp
+===================================================================
+--- btfiles.cpp (revision 300)
++++ btfiles.cpp (revision 302)
+@@ -449,7 +449,8 @@
+ return 0;
+ }
+
+-int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len, const char *saveas)
++int btFiles::BuildFromMI(const char *metabuf, const size_t metabuf_len,
++ const char *saveas, unsigned char exam_only)
+ {
+ char path[MAXPATHLEN];
+ const char *s, *p;
+@@ -458,11 +459,19 @@
+ int f_warned = 0;
+
+ if( !decode_query(metabuf, metabuf_len, "info|name", &s, &q, (int64_t*)0,
+- QUERY_STR) || MAXPATHLEN <= q )
++ QUERY_STR) || MAXPATHLEN <= q ){
++ errno = EINVAL;
+ return -1;
++ }
+
+ memcpy(path, s, q);
+ path[q] = '\0';
++ if( !exam_only &&
++ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
++ CONSOLE.Warning(1, "error, unsafe path \"%s\" in torrent data", path);
++ errno = EINVAL;
++ return -1;
++ }
+
+ r = decode_query(metabuf, metabuf_len, "info|files", (const char**)0, &q,
+ (int64_t*)0, QUERY_POS);
+@@ -471,21 +480,31 @@
+ BTFILE *pbf_last = (BTFILE*) 0;
+ BTFILE *pbf = (BTFILE*) 0;
+ size_t dl;
++ unsigned long nfiles = 0;
++
+ if( decode_query(metabuf,metabuf_len,"info|length",
+- (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) )
++ (const char**) 0,(size_t*) 0,(int64_t*) 0,QUERY_LONG) ){
++ errno = EINVAL;
+ return -1;
++ }
+
+ if( saveas ){
+ m_directory = new char[strlen(saveas) + 1];
+ #ifndef WINDOWS
+- if(!m_directory) return -1;
++ if( !m_directory ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ strcpy(m_directory,saveas);
+ }else{
+ int f_conv;
+ char *tmpfn = new char[strlen(path)*2+5];
+ #ifndef WINDOWS
+- if( !tmpfn ) return -1;
++ if( !tmpfn ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
+ if( arg_flg_convert_filenames ){
+@@ -493,6 +512,7 @@
+ #ifndef WINDOWS
+ if( !m_directory ){
+ delete []tmpfn;
++ errno = ENOMEM;
+ return -1;
+ }
+ #endif
+@@ -507,7 +527,10 @@
+ if( !f_conv || !arg_flg_convert_filenames ){
+ m_directory = new char[strlen(path) + 1];
+ #ifndef WINDOWS
+- if( !m_directory ) return -1;
++ if( !m_directory ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ strcpy(m_directory,path);
+ }
+@@ -517,24 +540,50 @@
+ p = metabuf + r + 1;
+ q--;
+ for(; q && 'e' != *p; p += dl, q -= dl){
+- if(!(dl = decode_dict(p, q, (const char*) 0)) ) return -1;
+- if( !decode_query(p, dl, "length", (const char**) 0,
+- (size_t*) 0,&t,QUERY_LONG) ) return -1;
++ if( !(dl = decode_dict(p, q, (const char*) 0)) ||
++ !decode_query(p, dl, "length", (const char**) 0, (size_t*) 0, &t,
++ QUERY_LONG) ){
++ errno = EINVAL;
++ return -1;
++ }
+ pbf = _new_bfnode();
+ #ifndef WINDOWS
+- if( !pbf ) return -1;
++ if( !pbf ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
++ nfiles++;
+ pbf->bf_length = t;
+ m_total_files_length += t;
+ r = decode_query(p, dl, "path", (const char **)0, &n, (int64_t*)0,
+ QUERY_POS);
+- if( !r ) return -1;
+- if(!decode_list2path(p + r, n, path)) return -1;
++ if( !r || !decode_list2path(p + r, n, path, sizeof(path)) ){
++ CONSOLE.Warning(1,
++ "error, invalid path in torrent data for file %lu at offset %llu",
++ nfiles, m_total_files_length - t);
++ delete pbf;
++ errno = EINVAL;
++ return -1;
++ }
++ if( !exam_only &&
++ (PATH_SP == path[0] || '/' == path[0] || 0==strncmp("..", path, 2)) ){
++ CONSOLE.Warning(1,
++ "error, unsafe path \"%s\" in torrent data for file %lu",
++ path, nfiles);
++ delete pbf;
++ errno = EINVAL;
++ return -1;
++ }
+
++
+ int f_conv;
+ char *tmpfn = new char[strlen(path)*2+5];
+ #ifndef WINDOWS
+- if( !tmpfn ) return -1;
++ if( !tmpfn ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ if( f_conv = ConvertFilename(tmpfn, path, strlen(path)*2+5) ){
+ if( arg_flg_convert_filenames ){
+@@ -542,6 +591,7 @@
+ #ifndef WINDOWS
+ if( !pbf->bf_filename ){
+ delete []tmpfn;
++ errno = ENOMEM;
+ return -1;
+ }
+ #endif
+@@ -556,7 +606,10 @@
+ if( !f_conv || !arg_flg_convert_filenames ){
+ pbf->bf_filename = new char[strlen(path) + 1];
+ #ifndef WINDOWS
+- if( !pbf->bf_filename ) return -1;
++ if( !pbf->bf_filename ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ strcpy(pbf->bf_filename, path);
+ }
+@@ -564,30 +617,42 @@
+ pbf_last = pbf;
+ }
+ }else{
+- if( !decode_query(metabuf,metabuf_len,"info|length",
+- (const char**) 0,(size_t*) 0,&t,QUERY_LONG) )
++ if( !decode_query(metabuf,metabuf_len, "info|length",
++ (const char**)0, (size_t*) 0, &t, QUERY_LONG) ){
++ errno = EINVAL;
+ return -1;
++ }
+ m_btfhead = _new_bfnode();
+ #ifndef WINDOWS
+- if( !m_btfhead) return -1;
++ if( !m_btfhead ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ m_btfhead->bf_length = m_total_files_length = t;
+ if( saveas ){
+ m_btfhead->bf_filename = new char[strlen(saveas) + 1];
+ #ifndef WINDOWS
+- if(!m_btfhead->bf_filename ) return -1;
++ if( !m_btfhead->bf_filename ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ strcpy(m_btfhead->bf_filename, saveas);
+ }else if( arg_flg_convert_filenames ){
+ char *tmpfn = new char[strlen(path)*2+5];
+ #ifndef WINDOWS
+- if( !tmpfn ) return -1;
++ if( !tmpfn ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ ConvertFilename(tmpfn, path, strlen(path)*2+5);
+ m_btfhead->bf_filename = new char[strlen(tmpfn) + 1];
+ #ifndef WINDOWS
+ if( !m_btfhead->bf_filename ){
+ delete []tmpfn;
++ errno = ENOMEM;
+ return -1;
+ }
+ #endif
+@@ -596,7 +661,10 @@
+ }else{
+ m_btfhead->bf_filename = new char[strlen(path) + 1];
+ #ifndef WINDOWS
+- if(!m_btfhead->bf_filename ) return -1;
++ if( !m_btfhead->bf_filename ){
++ errno = ENOMEM;
++ return -1;
++ }
+ #endif
+ strcpy(m_btfhead->bf_filename, path);
+ }
+@@ -694,6 +762,32 @@
+ size_t btFiles::FillMetaInfo(FILE* fp)
+ {
+ BTFILE *p;
++ const char *refname, *s;
++ char path[MAXPATHLEN];
++
++ refname = m_directory ? m_directory : m_btfhead->bf_filename;
++ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
++ refname = s + 1;
++ }
++ if( m_directory && '.' == *refname ){
++ char dir[MAXPATHLEN];
++ if( getcwd(dir, sizeof(dir)) && 0==chdir(m_directory) ){
++ if( getcwd(path, sizeof(path)) ){
++ refname = path;
++ while( (s = strchr(refname, PATH_SP)) && *(s + 1) ){
++ refname = s + 1;
++ }
++ }
++ chdir(dir);
++ }
++ }
++ if( '/' == *refname || '\0' == *refname || '.' == *refname ){
++ CONSOLE.Warning(1, "error, inappropriate file or directory name \"%s\"",
++ m_directory ? m_directory : m_btfhead->bf_filename);
++ errno = EINVAL;
++ return 0;
++ }
++
+ if( m_directory ){
+ // multi files
+ if( bencode_str("files", fp) != 1 ) return 0;
+@@ -715,16 +809,15 @@
+ if(bencode_end_dict_list(fp) != 1 ) return 0;
+
+ if(bencode_str("name", fp) != 1) return 0;
+- return bencode_str(m_directory, fp);
+-
++ return bencode_str(refname, fp);
+ }else{
+ if( bencode_str("length", fp) != 1 ) return 0;
+ if( bencode_int(m_btfhead->bf_length, fp) != 1) return 0;
+
+ if( bencode_str("name", fp) != 1 ) return 0;
+- return bencode_str(m_btfhead->bf_filename, fp);
++ return bencode_str(refname, fp);
+ }
+- return 1;
++ return 0;
+ }
+
+
+Index: btcontent.cpp
+===================================================================
+--- btcontent.cpp (revision 300)
++++ btcontent.cpp (revision 302)
+@@ -357,7 +357,11 @@
+
+ cfg_req_queue_length = (m_piece_length / cfg_req_slice_size) * 2 - 1;
+
+- if( m_btfiles.BuildFromMI(b, flen, saveas) < 0 ) ERR_RETURN();
++ if( m_btfiles.BuildFromMI(b, flen, saveas, arg_flg_exam_only) < 0 ){
++ if( EINVAL == errno )
++ CONSOLE.Warning(1, "Torrent metainfo file data is invalid or unusable.");
++ ERR_RETURN();
++ }
+
+ delete []b;
+ b = (char *)0;
+Index: btfiles.h
+===================================================================
+--- btfiles.h (revision 300)
++++ btfiles.h (revision 302)
+@@ -61,7 +61,7 @@
+
+ int BuildFromFS(const char *pathname);
+ int BuildFromMI(const char *metabuf, const size_t metabuf_len,
+- const char *saveas);
++ const char *saveas, unsigned char exam_only);
+
+ char *GetDataName() const;
+ uint64_t GetTotalLength() const { return m_total_files_length; }
diff --git a/net-p2p/ctorrent/metadata.xml b/net-p2p/ctorrent/metadata.xml
new file mode 100644
index 000000000000..b5ed8a246999
--- /dev/null
+++ b/net-p2p/ctorrent/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">dtorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/datacoin-hp/Manifest b/net-p2p/datacoin-hp/Manifest
new file mode 100644
index 000000000000..eb7aec8c849f
--- /dev/null
+++ b/net-p2p/datacoin-hp/Manifest
@@ -0,0 +1,10 @@
+AUX datacoin-hp-sys_leveldb.patch 6653 SHA256 67bd9bd4b3d0f90688aa8635588b296d326032be5474581397f263f75a3e9ba5 SHA512 b8cfc741682df5b3f1330a2dbc01c47b4c597b8cd7e7d97c150eec66e1659b056cfa3f3703bb95d21f82e349d220a75bc7c1a97916d84d25261bffb165a3627c WHIRLPOOL eb9a0104975eee4223eeaec3751514df22e7669161265c4534abe692ab1148a6ea1648570cd3ba22e9662fbf33c05dfd6541c5e0f14f9d0f3f70406379286f3c
+AUX datacoin.conf 108 SHA256 490bd98e4fae82d04aac70d030f8d5c8aa9fd22a8ff5d2c8238e49c26fb215b2 SHA512 e1c34d0a2799d618fb0b5dd17a5117957fb18532a1ecd223e3dfd6f815352c71abaaa7653715491f8e10ab6684b793da43e1841a1c63f5b5ed20c82dddee9ff6 WHIRLPOOL d1dd055b338c5fa5d0b94a1cd4f9ba686a310a0012788585ff1b73942284fbd4d87c4ebad8f11eb446a39b0ed1039994bf4eff4a7c01bd17995ba26836a59a70
+AUX datacoin.confd 194 SHA256 7415d875efd0b19a0f28abddaa9b54ad4748b91d543ca9791331c55078a7f884 SHA512 696a884f4f8b38d330547cf72c5f113b82a2a3e3583fa7fe4803ad4d90c25fc2a5a5536700b4e0f0a83be6fbeb51c61fe3d27973fe6fda530dba7e31e5f6ceb6 WHIRLPOOL cca73de6c5e32b384e9ca5dd0b67460b822ffa62b1064e7a8ed1feba9d750e0f9fee04e291e456d0696b4af3f50670aaa332de95cbd87459bd528d5366aec1fa
+AUX datacoin.initd 828 SHA256 fcdb9afe1f260a131607d47d6a396be96bf5eb0f84e45c270f3349b859e92491 SHA512 967e0e3d419df13af23a3981a5d54f42aa027d39993cea7a9b6b4b4be808ef14a7391e02c405f5de92eeccb2d00f3852821bf0f784413fb8d9b1b0ae9bd280fe WHIRLPOOL d0a53909c2abf678f7c28aa4ebd1e360a5cdf8abf89840ec3e72e75e432a7de99036fee8f194b33ee7106683dccb8ae6b5fd46b3d8e43dd72a4d84d1bc1e676f
+AUX datacoin.service 880 SHA256 a5840f12b558ef99cddfba4360a92064ebe4b88c5626cfe2c5e189a205e2d512 SHA512 3bb8639e1d95fb89949d65f7d0dffdcd9562b4a4d6cfd5523a4832f46091b6fe16ca84557e358c330e26f45701d2279f5b3cd06f29990b7457535e53b3f5df9c WHIRLPOOL be8767e02c7508d0789bc65d8cd67642831bd131cb3d0c4665ec541432235f0f23adc0dc847c0054794ea5889d2fac158290a433501e7a03a0c89e62ca5d1426
+AUX datacoind.logrotate 113 SHA256 b87dad90d7a14f6715f173b79dff9fbb8c751e5db56cda31e246476be46a3c71 SHA512 f77f8aca6ea979374e2d0a8661afab8bff0d3b65ad903a3bbdee0339271f947e0c0dd41aa884175ef6837b54227ad02e48b91255362dabb1fc16b038af1ede59 WHIRLPOOL 568bde8af0f7a852f53834c89a124f3584619dc6ff32f273b7efa6f70cb871f8951cbaa48ccfc35b36430732c3d0986501d691ef8e17c88d6c8cbe12f5100da7
+EBUILD datacoin-hp-9999.ebuild 2999 SHA256 a17f152fef6caa0cb8c89d340b85f78111a26a0267ca0df02c4fd351f8c0807c SHA512 1ea06e7d2754b3ad19792eea7cd3f44e809a5d21db16155f9a20f956accf15ea1d0ac7fe74f1f6b16cda31c72218e72b06fa9900d6a44ddf7c2436c2b6192cf2 WHIRLPOOL 18977b425cbf7102517e2485c23afd7c5de92ff7caa1b47388fd3d289997fde2f0a68965aebf1efce1fa46153b0daf9da7d83fe943c4c827c14b2fbaf2232a6e
+MISC ChangeLog 2625 SHA256 8a6361e246cfa1405ee3554d6e162ca9cf0bbe7e194dd256934f44def2841f4b SHA512 ed631cf1001c511b566cfd58d23d2a815ed59cfacbfb06a9cb806549ee8fc6e210cd5d80e36fa8bdf3bc7076b141551f2c4dd10cdd2f58d9da1f2376e8a21fb9 WHIRLPOOL d9631b2903e837ead6e7c91ceadb965da8c59c2f7314e0c576cac46469125fbf30a8da5978767b0132a8bc8243d4963df62d0bd00a93800aca3791fc8d20b95b
+MISC ChangeLog-2015 1168 SHA256 bba56fcbeab211039f56caed553c8f623b8612fa2816a6a1609527f8f8c76e1f SHA512 a16b9111cd2f8e1aea8090009d86be427f9f8eb4d1a5a633ed942d6ea20cd8933fe014a7dcb313f41a7425a6efbbc9f0b0dbbd70462031fbe73026e7a60610dc WHIRLPOOL b4c01f3383e6725be829e5aa926f6b9ecaccd64eef2d5f8447b79d054356d3d6db5ff00bfe8a6153c18bd27a3a61348ff98c1b7aa225863aaf64939410e922be
+MISC metadata.xml 605 SHA256 66c259d413f63c79c12443c27b74ca6db8fee7393690644623a0a84a8f9f1a37 SHA512 bb3835e8527beb5ebe3fc913ec42addbe3c11accc91d99ee88cd82bb7840e89883ce77ce06481258629822d1f1ac3fc7c21a3f3a91482aa32d299e1f48932b8c WHIRLPOOL 40681e839a9dcb795328845df9a967e27f99bdcc31a3701ee805fe89e3c04fc79cd9b4903570ad44baab05045d705530edeedc351292b3401853173a55b59cb3
diff --git a/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild b/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild
new file mode 100644
index 000000000000..5b7933868506
--- /dev/null
+++ b/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit bash-completion-r1 git-2 eutils db-use systemd user
+
+MyPV="${PV/_/-}"
+MyPN="${PN/-hp/d}"
+MyP="primecoin-${MyPV}"
+
+DESCRIPTION="High-performance version of datacoin (primecoin-hp fork)"
+HOMEPAGE="https://github.com/foo1inge/datacoin-hp"
+EGIT_REPO_URI="https://github.com/foo1inge/${PN}.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="examples upnp ipv6 examples logrotate hardened"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+ net-p2p/bitcoind
+"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-sys_leveldb.patch
+ rm -r src/leveldd
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
+ fi
+}
+
+pkg_setup() {
+ local UG="${PN}"
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/datacoin "${UG}"
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=0")
+
+ use hardened || OPTS+=("PIE=1")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${MyPN}
+}
+
+#Tests are broken with and without our primecoin-sys_leveldb.patch.
+#When tests work, make sure to inherit toolchain-funcs
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_primecoin
+# ./test_primecoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${MyPN}
+
+ insinto /etc/datacoin
+ doins "${FILESDIR}/datacoin.conf"
+ fowners ${PN}:${PN} /etc/datacoin/datacoin.conf
+ fperms 600 /etc/datacoin/datacoin.conf
+
+ newconfd "${FILESDIR}/datacoin.confd" ${PN}
+ newinitd "${FILESDIR}/datacoin.initd" ${PN}
+ systemd_dounit "${FILESDIR}/datacoin.service"
+
+ keepdir /var/lib/datacoin/.datacoin
+ fperms 700 /var/lib/datacoin
+ fowners ${PN}:${PN} /var/lib/datacoin/
+ fowners ${PN}:${PN} /var/lib/datacoin/.datacoin
+ dosym /etc/datacoin/datacoin.conf /var/lib/datacoin/.datacoin/datacoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 ${MyPN}.1
+ newman contrib/debian/manpages/bitcoin.conf.5 datacoin.conf.5
+
+ sed -i -e 's/bitcoin/datacoin-hp/g' contrib/bitcoind.bash-completion
+ newbashcomp contrib/bitcoind.bash-completion ${PN}.bash-completion
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/datacoind.logrotate" ${MyPN}
+ fi
+}
diff --git a/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch b/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch
new file mode 100644
index 000000000000..2f85d6a11993
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin-hp-sys_leveldb.patch
@@ -0,0 +1,179 @@
+diff --git a/datacoin-qt.pro b/datacoin-qt.pro
+index f531607..df0ecc4 100644
+--- a/datacoin-qt.pro
++++ b/datacoin-qt.pro
+@@ -4,7 +4,7 @@ macx:TARGET = "Datacoin-Qt"
+ VERSION = 0.8.3
+ INCLUDEPATH += src src/json src/qt
+ QT += network
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -104,25 +104,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff --git a/src/leveldb.cpp b/src/leveldb.cpp
+index e66f851..2856d70 100644
+--- a/src/leveldb.cpp
++++ b/src/leveldb.cpp
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -43,8 +45,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff --git a/src/makefile.unix b/src/makefile.unix
+index 359ac3d..ec1e075 100644
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -120,8 +120,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -130,7 +129,6 @@ OBJS= \
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -150,25 +148,44 @@ OBJS= \
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o \
+ obj/prime.o \
+ obj/checkpointsync.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
++
+ all: datacoind
+
+ test check: test_primecoin FORCE
+ ./test_primecoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -179,24 +196,22 @@ obj/build.h: FORCE
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
+-datacoind: $(OBJS:obj/%=obj/%)
+- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
++obj/%.o: %.cpp
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
++datacoind: $(OBJS)
++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+ obj-test/%.o: test/%.cpp
+- $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+ test_primecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
diff --git a/net-p2p/datacoin-hp/files/datacoin.conf b/net-p2p/datacoin-hp/files/datacoin.conf
new file mode 100644
index 000000000000..65c9767ea571
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.conf
@@ -0,0 +1,5 @@
+# see https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File
+#
+
+#rpcuser=
+#rpcpassword=
diff --git a/net-p2p/datacoin-hp/files/datacoin.confd b/net-p2p/datacoin-hp/files/datacoin.confd
new file mode 100644
index 000000000000..95939b8b19a3
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/datacoind
+
+# owner of datacoind process (don't change, must be existing)
+DATACOIN_USER="datacoin-hp"
+
+DATACOIN_OPTS="${DATACOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/datacoin-hp/files/datacoin.initd b/net-p2p/datacoin-hp/files/datacoin.initd
new file mode 100644
index 000000000000..1c380b7d12e1
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+vardir="/var/lib/datacoin"
+conffile="${vardir}/.datacoin/datacoin.conf"
+datacoind_user="${DATACOIN_USER:-nobody:nobody}"
+
+description="Bitcoin crypto-currency wallet for automated services"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/datacoind"
+command_args="${DATACOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${datacoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${datacoind_user} -m 0400 ${conffile} || return 1
+
+ if ! grep -q '^rpcpassword=' "${conffile}"; then
+ eerror "Please edit `readlink -f ${conffile}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+}
diff --git a/net-p2p/datacoin-hp/files/datacoin.service b/net-p2p/datacoin-hp/files/datacoin.service
new file mode 100644
index 000000000000..e0cb83190a11
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/datacoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/datacoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="DATACOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/primecoin/datacoin.conf
+
+[Unit]
+Description=Datacoin Daemon
+After=network.target
+
+[Service]
+User=datacoin
+Environment=DATACOIN_OPTS=
+ExecStart=/usr/bin/datacoind -daemon=0 $DATACOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/datacoin-hp/files/datacoind.logrotate b/net-p2p/datacoin-hp/files/datacoind.logrotate
new file mode 100644
index 000000000000..910bafe7de1d
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/datacoin/.datacoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP datacoind
+ endscript
+}
diff --git a/net-p2p/datacoin-hp/metadata.xml b/net-p2p/datacoin-hp/metadata.xml
new file mode 100644
index 000000000000..b93b686a45d8
--- /dev/null
+++ b/net-p2p/datacoin-hp/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>email@missionaccomplish.com</email>
+ <name>Fernando V.</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="logrotate">Use app-admin/logrotate for rotating logs</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">foo1inge/datacoin-hp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/dbhub/Manifest b/net-p2p/dbhub/Manifest
new file mode 100644
index 000000000000..f104c9835e1a
--- /dev/null
+++ b/net-p2p/dbhub/Manifest
@@ -0,0 +1,8 @@
+AUX dbhub-fix-buffer-overflows.patch 1406 SHA256 3bb5980495f7d759d8256717322f1316ff89d24b98e518aa7555b5bb3026ce85 SHA512 f3f5c328f6a9b5ac5c57b2b556b628b11bb56616c4cc9d246798c0e47ad80ee90a9bfed31f11cb0e00e7596a342166214946ab52983118a3d1486e4299e31d89 WHIRLPOOL 2e0d2354e69f505aa5523ceb1288fbf45ede013046686d93730c1a277648bad47abbe2a8e13edfbd9475bf9856512105126f325af6cb866f39837e96a0d779b6
+AUX dbhub-gentoo.patch 769 SHA256 f66e623953bd0e8e73e184ae8054ec6412b0d89074497b6bdbcd27c9f24686b2 SHA512 8981d3d9ebf833cc5d82ac930d2fef0620743f370ec904c338a19e4b2950c198d669857e5f1e64d9cd00ab95cdd0adc3853dea48f69d2c94e88c1bbeae391159 WHIRLPOOL d21507d0de943a62824dfe018ef37f4db7ec19fee862203ec9a249abee7e55dc3a73203258edfa48eabc9924f4cf0bfc01670b37e412867a2c8235d7c7fec377
+AUX dbhub-no-dynaloader.patch 323 SHA256 5ba25453a1e3094b87b8dc64a91c081af7cf0cf0679972f85be77d3a27836e25 SHA512 395191e51ac3ce10908793bf1fe86f126a30595409dd6cfb642b2d551d3f7c9288418bf06a9f7a843f7cb7ed95d184ac46a38a49c9af6c18396eabaf01568072 WHIRLPOOL 57b93bab8112c099d65ff672e80eb93e25aedfccb4806dd95ff36e6731803caa484eea3066faeef18eeab7da781a454833c3197a1000d14b69f9c9e165779775
+DIST dbhub-0.451.tbz2 239911 SHA256 941b384d11c181ed270d546f0867dc517693d05fdcdacb14b0b7c682022663b8 SHA512 c596205b24204d0b319117aa0005cedb143a5d4859c2ea702a6141e82793ab6396c6e1903a3d0db7a164e8b9947471722b252be89df8ab05d36ffee5a1ac7a27 WHIRLPOOL c8d911bb859d7d554238859304e3247c65c720f0f6979f3571d82892f6a404ce4645432e15671291919e4bd2062c22f501d1063799e011b75da2b6aa40eccb3f
+EBUILD dbhub-0.451-r1.ebuild 820 SHA256 e716b3551718e023f638568b536399061021a20ba7abbcee1b15d6e77977ed0c SHA512 d286da2f33c3569fff7160acca45d2ce5bd0076f3fe6bd1abdfc73db3121aa4753babcedd6494c6e4cffd93d88679f682f7b87b4ca1c4d140af0f016318f7088 WHIRLPOOL 75379f77590fbd02726923c99b005ce912b14899f1ac269ec567035e0d5a8bf2feffb9dcceb9515c5ffa46e3b5127843f3d98c0e5536158ffb2b97c52be8c09b
+MISC ChangeLog 2559 SHA256 c7d7e14673a24e51b4b015d239a1f4a408027f3286849e79f822ab281580504d SHA512 bc60337ef632358f0f870ee13a160bec18b7c5e1ca7801d3c8ed4a1cee4fef18dccf2faf91201410f315da12b571fe7c17bc9a7f5a56a6d163a1b028da173cb2 WHIRLPOOL ee98886e3eddf354cdc786fea51d77fb37974f2f92004b84553255878afc7ce06589b7b54e32c4129c5837326e16cb6afaa2ecfeaea1b36d9cd593f01f3dd6a1
+MISC ChangeLog-2015 4917 SHA256 f69879ea317ffe69aa6aeea0ace1f9ad8f5e37302eeb5d8195748bc707e58199 SHA512 a8125349df09dba5dcdd915f09a65113db6b100f19e47b34c563314e0e5d6c7a072674028e5bc28ab7ae1faed4c0a17c6ab6d5d2ca6381fec5fe9d11edeb5bfb WHIRLPOOL 8a8dcb31db6d3e5e4ef66421d1d5ad43293d617e6a5965f9e02ef2d9bd6560d0d5a773eb873a442e1359e30861117a940279bf10d161fbb3ab125c53d460f56d
+MISC metadata.xml 334 SHA256 50f772dc73a3b3659d3aae6a1a656df9eef9b2a224eb907d093a66fe371f61b5 SHA512 c3cf4d865b92516b7cf7698743166d7b84589f9147153ad33459dc1fb806bce8448c0ec44e423bf960bfeccf752aa934aa3943180a0c0685418234639fa66c90 WHIRLPOOL 4b60f4f6f0415c050d8f323b8cee2fef4ee83e4007000915277b039d87e570e78505929d0f78ddcf6f8fc02a85ee3e5172aa76e5291c71adf75f585ac8c83260
diff --git a/net-p2p/dbhub/dbhub-0.451-r1.ebuild b/net-p2p/dbhub/dbhub-0.451-r1.ebuild
new file mode 100644
index 000000000000..7b53906e3d64
--- /dev/null
+++ b/net-p2p/dbhub/dbhub-0.451-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="Hub software for Direct Connect, fork of opendchub"
+HOMEPAGE="http://www.dbhub.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="debug perl nls switch_user"
+
+DEPEND="perl? ( dev-lang/perl )
+ switch_user? ( sys-libs/libcap )"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-gentoo.patch \
+ "${FILESDIR}"/${PN}-no-dynaloader.patch \
+ "${FILESDIR}"/${PN}-fix-buffer-overflows.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable perl) \
+ $(use_enable switch_user) \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/net-p2p/dbhub/files/dbhub-fix-buffer-overflows.patch b/net-p2p/dbhub/files/dbhub-fix-buffer-overflows.patch
new file mode 100644
index 000000000000..8c4395d75d0a
--- /dev/null
+++ b/net-p2p/dbhub/files/dbhub-fix-buffer-overflows.patch
@@ -0,0 +1,53 @@
+From 6d52acedf13eba875ab064d1a3b6a0ac3afb24f3 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky@gentoo.org>
+Date: Wed, 19 Jan 2011 21:06:05 +0100
+Subject: [PATCH] Fix buffer overflows
+
+---
+ src/commands.c | 2 +-
+ src/main.c | 2 +-
+ src/main.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/commands.c b/src/commands.c
+index f66ad68..e0bc6a8 100644
+--- a/src/commands.c
++++ b/src/commands.c
+@@ -313,7 +313,7 @@ void chat(char *buf, struct user_t *user)
+ char kg2user[51];
+ char largestring[501];
+ char msgl[801];
+- char bigstring[1001];
++ char bigstring[4096];
+ char tempstring[151];
+ char nick[51];
+ char phrase[51];
+diff --git a/src/main.c b/src/main.c
+index dec3ef8..85dad68 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -506,7 +506,7 @@ void alarm_signal(int z){
+ void alarm_handler(void)
+ {
+ struct sock_t *human_user;
+- char sometxt[151];
++ char sometxt[250];
+ char somerec[21];
+ char showrec[251];
+ char recpath[MAX_FDP_LEN+1];
+diff --git a/src/main.h b/src/main.h
+index 886312e..da1ead5 100644
+--- a/src/main.h
++++ b/src/main.h
+@@ -430,7 +430,7 @@ int brokensr; /* 1 means share record was broken */
+ char recordshstr[120];
+ char recordusstr[120];
+
+-char clocknick[21];
++char clocknick[50];
+
+ //DB// Pointers that count various things and display them in !ui command to admins/owners
+ long long blocked_pm;
+--
+1.7.3.4
+
diff --git a/net-p2p/dbhub/files/dbhub-gentoo.patch b/net-p2p/dbhub/files/dbhub-gentoo.patch
new file mode 100644
index 000000000000..6e992cdb0129
--- /dev/null
+++ b/net-p2p/dbhub/files/dbhub-gentoo.patch
@@ -0,0 +1,25 @@
+--- configure.ac
++++ configure.ac
+@@ -115,7 +115,7 @@
+ AC_MSG_CHECKING([Perl LD Objs])
+ AC_MSG_RESULT([$perl_ldd])
+ CPPFLAGS="$CPPFLAGS $perl_ccflags"
+- LDFLAGS="$LDFLAGS $perl_ld"
++ LIBS="$LIBS $perl_ld"
+ MISSING_PERL_HEADERS=""
+ AC_CHECK_HEADERS([EXTERN.h perl.h],,HAVE_PERL="false"; MISSING_PERL_HEADERS="$ac_header $MISSING_PERL_HEADERS",[[#if HAVE_EXTERN_H
+ #include <EXTERN.h>
+@@ -141,13 +141,6 @@
+
+ AM_CONDITIONAL([BNLS],[test "$want_nls" = "yes"])
+
+-dnl Check if config directory exists.
+-if test ! -d $HOME/.dbhub; then
+- echo "creating config directory: $HOME/.dbhub"
+- mkdir $HOME/.dbhub
+- chmod 700 $HOME/.dbhub;
+-fi
+-
+ AC_OUTPUT(Makefile src/Makefile)
+
+ echo -e "\n\e@<:@1m-------------------------------------------------\e@<:@0m"
diff --git a/net-p2p/dbhub/files/dbhub-no-dynaloader.patch b/net-p2p/dbhub/files/dbhub-no-dynaloader.patch
new file mode 100644
index 000000000000..493b83a2943e
--- /dev/null
+++ b/net-p2p/dbhub/files/dbhub-no-dynaloader.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/276928
+
+--- configure.ac
++++ configure.ac
+@@ -122,7 +122,6 @@
+ #endif
+ ]])
+ AC_CHECK_LIB([perl],[perl_run],,LIBPERL_MISSING="true";HAVE_PERL="false")
+- AC_CHECK_FILE("$perl_loader", [AC_SUBST(perl_ldd) HAVE_DYNLOAD="yes"], HAVE_DYNLOAD="no";HAVE_PERL="false")
+ else
+ HAVE_PERL="false"
+ fi
diff --git a/net-p2p/dbhub/metadata.xml b/net-p2p/dbhub/metadata.xml
new file mode 100644
index 000000000000..e865d6f7b584
--- /dev/null
+++ b/net-p2p/dbhub/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="switch_user">Enable support for switching user</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dbhub</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/deluge/Manifest b/net-p2p/deluge/Manifest
new file mode 100644
index 000000000000..c6795a6d8b04
--- /dev/null
+++ b/net-p2p/deluge/Manifest
@@ -0,0 +1,21 @@
+AUX deluge-1.3.12-fix_scheduler_plugin.patch 1050 SHA256 9b0e4640a3537cb3b1805d4fca9d70539b341a2df0c3d4078194e0f4fdad037a SHA512 0613de93b5f61e523dfd8b8d5ec145a64b69ae96fde8236d9da9c7e4a54af681490879157f0a8a5537c27e93feb5b1db6651d61a9655e58763c1676e1843e087 WHIRLPOOL d26748a8c38ae912c736bf6db6ab9806c040d8d5b1c748f44c4619d5c7c74c826b682de7bd67cbcb1377b861e3ac93273f1568b80a875009f6b30f26d9147095
+AUX deluge-1.3.5-disable_libtorrent_internal_copy.patch 1165 SHA256 873b599723f2ec87df386badaaf1fa79686c32a50beaab0924bf40c0f2bb9fa1 SHA512 8f08d5b9cfcff3fda8153d4bdfc8435a3b63fefc51b6cd3c648a82134377dc561e68df3c9aba4a37cffeff7b789d352a438b75ec6bdaf58f87ab5326f641b316 WHIRLPOOL b9742b0e1fe666055c2e7cc141e4437143a534229a5661d6e3ec139971289b291fff736629ffc66034d2430971e9119d1cc6bd85e68f5be07b8bb5f9e2a19a3c
+AUX deluge-web.conf 210 SHA256 58c2b8c916a689b5f11a569450935cb5844c2eed9824625a46c7a608eb6d8e52 SHA512 ecea3cd59dff0c2f0215d98c9e4adda49b6f1f95d43d844262fe73c335d93a6e9076ff5143ff7f3e9f4433087d16a1d0497f75e2b1e0a3d788f5ad60705c9999 WHIRLPOOL 4b15a1c5987454a894ed2f3ba3bb34910f649e663feee5a5c4695dc74b1c305a1afee18a086fb562fe289e450382d77c177238a072500a543cf27281f1ab1b82
+AUX deluge-web.init 1484 SHA256 19adb9e46cf2d0a3f76ae12e2c6058cd6b80620d5fd5d2b02abecf54e5e3f726 SHA512 8afb1318e4cf267013a3704f71c83942c4c862eeb6d91ea15f4a2a8bb5f1bed7461453bf2877fe0afc4c3f560dad3629ade538324a75a9b6ce4982f5121a74ef WHIRLPOOL 1fef5a3f3b51f148bb3dbd7cd58129c722cc034f91b7f4d54814b6ac439f65f6a180817d9ac0016921ae4d68281ca6b6000f08e47c99b338db58b653c5ca5852
+AUX deluge-web.service 146 SHA256 7b829d7e0d15e0369a26f92e0fb15adae81007de170a6ba3f8afa74e675eabb3 SHA512 b189d5db4be60a01eb5950aad3cb0bd60a1ac9509464507d5187c7b387d2f78678e65db3d0340c87c50511b48d08c85f7380c9d405e5dc497eca121aaaeacfaa WHIRLPOOL b1798eaaf71e3f3c5fd53c49a2b48cefee615c378d4a43bed6c19afa523cf5d23f57181095ef4c439c8a3ebc152e75735f2f47e0ec53288a54ff5196dac5e037
+AUX deluge-web.service-2 198 SHA256 b9b79371a72226b6a76c2d9b61dc21d339d4574a9be68e3fc9defab530ca61af SHA512 51d761c76d213285bef2cd4cc80c7135838f0fb955a7584ca15194080d50aa63e81642d566b901af8970ed01ae9952482226a41627f1e198fd6587c197737889 WHIRLPOOL 6a382545f1d7c4087016d162417717aefd70034ef02c5e4ad5bf31f3ff94b5f482199851f39f817552ed979256fcb05fb9b59cd82200721c6347c99e7dc7e146
+AUX deluge-web.service.conf 100 SHA256 0dd1c923daf1d58721986670ddfe57e26e81d63fe33f516ff32f73d3d7330206 SHA512 aaf493b3f614558c762ffea3219eda7045e739eeeb826a19df456ef9a94a0894302695bd96490eb4fb44e16039126170ec31ba6e0a0a2f6ae69669e2b9f4cda9 WHIRLPOOL dc81c7cf547a1912fe28de1a3cc9644ec2b8c918f19acdf7f105471925604de37427629b7b7f962d6b017a2736bc406497e0238b4edd22e4aed7cd172a7e7800
+AUX deluged.conf 233 SHA256 de3b9475df0f86b70463ed879c99717580fc0d5568e15322c2f656639473310f SHA512 3201bc509661a30c509cb501cb13df69b94a273499e5d86e8b99704d4625347d7dff8a6eb2351c69616f945636dd490c10181627e651f9712472c73567cd2be3 WHIRLPOOL ec102bbb9de5fa6a0356a4dd4d51b07d960902d758484f02b43348fda892446db7f7e9be697f824e639669c238ba52cc03e7c5d2c1d660207bc85fbae250a01f
+AUX deluged.conf-2 228 SHA256 e0d29488ff0a9b8404572b5d67a3ef56a6fc914a6b17b56b346bfe74d1249adf SHA512 3005478b48c6c4c67f0eb8d9ee44ea1310ccd209fe6364f7bbc37ec296111e50462296d678cd4098bb63472ade190fdaf38ded39c3e8a73cbb4cede4860978c1 WHIRLPOOL 94fd6bd28ced381dbc3f4f6f9df04facc8bca63b17eb829dbd7d874624c893ffe360c217b56a03cde9b219f651b1f18014cc4ede27ea172adc143944c440d4ac
+AUX deluged.init 1974 SHA256 724b194823b950141d0c9e7db4a6dfeb9fcc07840ea929894e9afff7f98d5afc SHA512 c775610463f052c2b9ff5d5043536e69f99475e24bf0f0346b02bb00b87cb2125052c2b29008dabe5aa2da9cb6a819608a388ce5d1a03adedc350936241eaaee WHIRLPOOL acb555b7c6781883caa0ce0c01a7c20addf9836fc9e49fe3d7f2583b69e16202feee5d0acf4cf58ad9324cff168b82232f5e4da7a248d6c660e401875f6d9182
+AUX deluged.init-2 1503 SHA256 2ec017817f54656c3f2ec6b3ac3892ea25fab0591b20e46bc7e95f0b392d4020 SHA512 a2514306b14712c7b31e64baccb65080101314e5f81e01702caf0f030afa40d98c1d3898c90fb66f55092bb27c48f0a6bd5a4db215ac68e352602000b700164a WHIRLPOOL 0917c9ad99a3a2c527bec3e70cc3e5e831082377a1c729fea58ebb64db4bf11301ae0a2ce980a9d54e0718c1878e1cd9810be3fb430ba12b291c3317d9a0095e
+AUX deluged.service 277 SHA256 6347ec82b7a28daabe441e3436fdc725e96dae2249ccf8fb2452168368750000 SHA512 fea157a271d768a1b6025b32b97b2b88f5b70472a7059da7fa4babb4f1a686e33e04cc4bd7a5daf70a5f682252687495bbe72eb1c1b335857817f45ed4f1dd33 WHIRLPOOL 38f66dffa09250a73990a4bc76f230e8d4c8e9ad4c87167fdb2144f0a7c3210017500030ed2a4a381bcba82ee8cc45cb518688d752a453be02f7ddd69b5c0e7d
+AUX deluged.service-2 243 SHA256 b1246ead13fee7a2ff3e94a47f6535a665282e407deb5186383b456cd4ffec5e SHA512 cbb783b92eff1562435b690ec1ae9fd7e407577b33764b049d1a591260044ee66ba18acd3f3bf8ddf3822e082a2edb53db16de64c706cb190cf1026e2f880c8c WHIRLPOOL 054dff55cdfcbf3f66e49b3f8676fc0561cc079c6a428e4184804f4eada703af470febf9ae18ebb9c9d462e87a1aaa73194712cc74d34b9c3573f256633436c8
+AUX deluged.service.conf 114 SHA256 b57941f17dd8be788ed24e75a9b46548ef3e1cd6bf7ad1b68e7c7d7a38ef522d SHA512 b84ffe94048757359753157643e3d5d6a8110aebffbaf73b836f6f3f53a4e6fee6bcdf65563233ac04859707a5eda986638374b28d913281a98c9edaa6e4750a WHIRLPOOL fa19e0f20aefb6ba68da996491766539bd340f81f6c5398251f5e175485c0cbf091edd81b5e119653fe068c6742c5664ba8d672dafab8e119384f85e60559410
+DIST deluge-1.3.15.tar.bz2 1775913 SHA256 dcf823131be56c2180814e8def11496aaaf700710b5694867ba9f057615ac790 SHA512 1d0f93a8c5081b807a390f79101d7f26751b0dfc47efe4c3573541014f9e5969461e2d421d17646c17fb81eb4f66f25f5ddce63b9bd226989adb7d7506146bda WHIRLPOOL 93f3b2c86b983ecea7b001f0b58bd6e904ecc4c11c718286885d82b09f0068c4bf347b03be12edfe77677604d3af3ca9a68e8a2a08d696ff16f5385eb43c464f
+EBUILD deluge-1.3.15.ebuild 4871 SHA256 6a9772e2fa7d14f56fac837b3ad5561249376aed78c4acd98996bf7a4c469ab6 SHA512 7b6969f6d49b10a20c4278cab6a660f4fbc582c05c1d97d480434cb19598f1c68227236531a5f7e119cec9d0f40871f2e2ea7e3a6422d9765c6efc4aa2839ea5 WHIRLPOOL 88198b6cf1bc76b01508276b653a41fb677b59e55804a2e0f63f65d78063a8a32b702ed5fcfb0390cad645d73c6c93006fe5614fa9f0c18e6399baa5b27f0a84
+EBUILD deluge-1.3.9999.ebuild 4839 SHA256 6ae00d8ad91cf40f6b9c4ef8aede85a83444c253f6e7f3984982ecea1f0a092e SHA512 5dda54ad2be3d49147634d28e194961be91785b7462474290150650d1926d82c556e5851cc0f8e1127b5ba837ba131fc669e9f72cc6d53b800f5c35ef1459f1c WHIRLPOOL d288a352247e418e46ab20fc57594124f2948f3d76ecb67682dc10554138cfa1409b4dcac27b9cc0f89b0b7e2bbac77e54124edc6c2166e9333057f99f5e8b10
+EBUILD deluge-9999.ebuild 4798 SHA256 03259e6314d73bcd50a7b622b163007d9a257dbc7f07c484b15b8634f9bd6ff2 SHA512 6aa67f4d3c4d647e8dfb1593341b9168d1368da25c28790a446b1b5b4860a0b62830d9049c06151db0b656c790e4c0481d6b553a6e0eecf00ad7c7728c876c52 WHIRLPOOL 7b5db71160e796ff911faa3756a06aff4910ccadbbc69fda72e2d949f153ce5862abcb5d82013d585c8cceeb43a51e9b636c8a3bed4883c77231e0e2a0f66d9b
+MISC ChangeLog 9578 SHA256 a63ee9c503c728b05466b68b27908c58e69a69993cabb5aef9ea4738a19dfd31 SHA512 6ae24929688a73be92b7e96df7aea43607040473d1638d118c646ed6e8b34ccce2d9e14739751521460aa45c06fa6b2c0e33b4f8724ebcdf423be1b003823bd4 WHIRLPOOL 2976d7603f0f12adf1a173202561d9bb033c4628c2a98dd44744303db75298540faa57ddcfcae56b6ef461f0a8fddcdb3ff5c0a88205996aec5034208cb58ac7
+MISC ChangeLog-2015 27566 SHA256 a1188c71f37513b8ebf2cbc5b3381f5ca5961482d25094a2442d7c69b2faa338 SHA512 cc4b6e5859d72cac328540175bed1f680c256226824afdef802f4edcd4d09a965089cb92adcf4052ee551c10ecca6d03b4b56e7c1850bb578a836a759e5bc9aa WHIRLPOOL 5b6b9e739eefcae6926389304727eb8ce2861dcdbc40116e718128224ba5edf69a5703cb8331f25e03c24f4bc9fa8de488d0863c0f6d7269d08547275600d6c9
+MISC metadata.xml 924 SHA256 0566c81a62820982f316840340df3576329cc0b93168d12c344e79adf0b8d21b SHA512 094619b5059122dc2e2dd798265000dfc4f30b8929f7b592b89cbe54ad6534829cc55570bbef0849b2892464dbc5f61b4c77e7c178c3ab0c5eee79f0ebf118df WHIRLPOOL e7a84a397934f26af338be2a4666eeb95602bb5df49052035ba87cafba9c659c2a3bd9ccccd9e4ac48e17552dba0b8d3a9b364e17efcd021058a660b05624a06
diff --git a/net-p2p/deluge/deluge-1.3.15.ebuild b/net-p2p/deluge/deluge-1.3.15.ebuild
new file mode 100644
index 000000000000..4c92716328b3
--- /dev/null
+++ b/net-p2p/deluge/deluge-1.3.15.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
+inherit distutils-r1 eutils systemd user l10n
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
+ http://git.deluge-torrent.org/${PN}"
+ SRC_URI=""
+ KEYWORDS="amd64 x86"
+else
+ SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
+ KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console geoip gtk libnotify sound webinterface"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ sound? ( gtk )
+ libnotify? ( gtk )
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
+)
+
+CDEPEND="<net-libs/libtorrent-rasterbar-1.1[python,${PYTHON_USEDEP}]"
+DEPEND="${CDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-util/intltool"
+RDEPEND="${CDEPEND}
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ (
+ >=dev-python/twisted-core-13.0[${PYTHON_USEDEP}]
+ >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
+ )
+ )
+ geoip? ( dev-libs/geoip )
+ gtk? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ )
+ webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+ local args=(
+ -e "/Compiling po file/a \\\tuptoDate = False"
+ )
+ sed -i "${args[@]}" -- 'setup.py' || die
+ args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ local loc_dir="${S}/deluge/i18n"
+ l10n_find_plocales_changes "${loc_dir}" "" ".po"
+ rm_loc() {
+ rm -vf "${loc_dir}/${1}.po" || die
+ }
+ l10n_for_each_disabled_locale_do rm_loc
+
+ distutils-r1_python_prepare_all
+}
+
+esetup.py() {
+ # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
+ # Override this call from the distutils-r1 eclass.
+ # This does not respect the distutils-r1 API. DONOT copy this example.
+ set -- "${PYTHON}" setup.py "$@"
+ echo "$@"
+ "$@" || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
+ rm -f "${D}/usr/bin/deluge-console" || die
+ rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gtk ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
+ rm -rf "${D}/usr/share/icons/" || die
+ rm -f "${D}/usr/bin/deluge-gtk" || die
+ rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
+ rm -f "${D}/usr/share/applications/deluge.desktop" || die
+ fi
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
+ rm -f "${D}/usr/bin/deluge-web" || die
+ rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
+ fi
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+}
+
+pkg_postinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ elog
+ elog "If, after upgrading, deluge doesn't work, please remove the"
+ elog "'~/.config/deluge' directory and try again, but make a backup"
+ elog "first!"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "/etc/init.d/deluged start as root"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/deluge-1.3.9999.ebuild b/net-p2p/deluge/deluge-1.3.9999.ebuild
new file mode 100644
index 000000000000..8055972cdb31
--- /dev/null
+++ b/net-p2p/deluge/deluge-1.3.9999.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
+inherit distutils-r1 eutils systemd user l10n
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+
+if [[ ${PV} == 1.3.9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
+ http://git.deluge-torrent.org/${PN}"
+ EGIT_BRANCH="1.3-stable"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console geoip gtk libnotify sound webinterface"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ sound? ( gtk )
+ libnotify? ( gtk )
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
+)
+
+CDEPEND=">=net-libs/libtorrent-rasterbar-0.14.9[python,${PYTHON_USEDEP}]"
+DEPEND="${CDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-util/intltool"
+RDEPEND="${CDEPEND}
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
+ )
+ geoip? ( dev-libs/geoip )
+ gtk? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ )
+ webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+ local args=(
+ -e "/Compiling po file/a \\\tuptoDate = False"
+ )
+ sed -i "${args[@]}" -- 'setup.py' || die
+ args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ local loc_dir="${S}/deluge/i18n"
+ l10n_find_plocales_changes "${loc_dir}" "" ".po"
+ rm_loc() {
+ rm -vf "${loc_dir}/${1}.po" || die
+ }
+ l10n_for_each_disabled_locale_do rm_loc
+
+ distutils-r1_python_prepare_all
+}
+
+esetup.py() {
+ # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
+ # Override this call from the distutils-r1 eclass.
+ # This does not respect the distutils-r1 API. DONOT copy this example.
+ set -- "${PYTHON}" setup.py "$@"
+ echo "$@"
+ "$@" || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
+ rm -f "${D}/usr/bin/deluge-console" || die
+ rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gtk ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
+ rm -rf "${D}/usr/share/icons/" || die
+ rm -f "${D}/usr/bin/deluge-gtk" || die
+ rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
+ rm -f "${D}/usr/share/applications/deluge.desktop" || die
+ fi
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
+ rm -f "${D}/usr/bin/deluge-web" || die
+ rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
+ fi
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+}
+
+pkg_postinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ elog
+ elog "If, after upgrading, deluge doesn't work, please remove the"
+ elog "'~/.config/deluge' directory and try again, but make a backup"
+ elog "first!"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "/etc/init.d/deluged start as root"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/deluge-9999.ebuild b/net-p2p/deluge/deluge-9999.ebuild
new file mode 100644
index 000000000000..42a1addef2d3
--- /dev/null
+++ b/net-p2p/deluge/deluge-9999.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+PLOCALES="af ar ast be bg bn bs ca cs cy da de el en_AU en_CA en_GB eo es et eu fa fi fo fr fy ga gl he hi hr hu id is it iu ja ka kk km kn ko ku ky la lb lt lv mk ml ms nap nb nds nl nn oc pl pms pt pt_BR ro ru si sk sl sr sv ta te th tl tlh tr uk ur vi zh_CN zh_HK zh_TW"
+inherit distutils-r1 eutils systemd user l10n
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://deluge-torrent.org/${PN}.git
+ http://git.deluge-torrent.org/${PN}"
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="console geoip gtk libnotify sound webinterface"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ sound? ( gtk )
+ libnotify? ( gtk )
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.3.12-fix_scheduler_plugin.patch"
+)
+
+CDEPEND=">=net-libs/libtorrent-rasterbar-0.14.9[python,${PYTHON_USEDEP}]"
+DEPEND="${CDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-util/intltool"
+RDEPEND="${CDEPEND}
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ dev-python/setproctitle[${PYTHON_USEDEP}]
+ || ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+ >=dev-python/twisted-web-13.0[${PYTHON_USEDEP}]
+ )
+ geoip? ( dev-libs/geoip )
+ gtk? (
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
+ gnome-base/librsvg
+ libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
+ )
+ webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+ local args=(
+ -e "/Compiling po file/a \\\tuptoDate = False"
+ )
+ sed -i "${args[@]}" -- 'setup.py' || die
+ args=(
+ -e 's|"new_release_check": True|"new_release_check": False|'
+ -e 's|"check_new_releases": True|"check_new_releases": False|'
+ -e 's|"show_new_releases": True|"show_new_releases": False|'
+ )
+ sed -i "${args[@]}" -- 'deluge/core/preferencesmanager.py' || die
+
+ local loc_dir="${S}/deluge/i18n"
+ l10n_find_plocales_changes "${loc_dir}" "" ".po"
+ rm_loc() {
+ rm -vf "${loc_dir}/${1}.po" || die
+ }
+ l10n_for_each_disabled_locale_do rm_loc
+
+ distutils-r1_python_prepare_all
+}
+
+esetup.py() {
+ # bug 531370: deluge has its own plugin system. No need to relocate its egg info files.
+ # Override this call from the distutils-r1 eclass.
+ # This does not respect the distutils-r1 API. DONOT copy this example.
+ set -- "${PYTHON}" setup.py "$@"
+ echo "$@"
+ "$@" || die
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if ! use console ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/console/" || die
+ rm -f "${D}/usr/bin/deluge-console" || die
+ rm -f "${D}/usr/share/man/man1/deluge-console.1" ||die
+ fi
+ if ! use gtk ; then
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/gtkui/" || die
+ rm -rf "${D}/usr/share/icons/" || die
+ rm -f "${D}/usr/bin/deluge-gtk" || die
+ rm -f "${D}/usr/share/man/man1/deluge-gtk.1" || die
+ rm -f "${D}/usr/share/applications/deluge.desktop" || die
+ fi
+ if use webinterface; then
+ newinitd "${FILESDIR}/deluge-web.init" deluge-web
+ newconfd "${FILESDIR}/deluge-web.conf" deluge-web
+ systemd_newunit "${FILESDIR}/deluge-web.service-2" deluge-web.service
+ systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
+ else
+ rm -rf "${D}/usr/$(get_libdir)/python2.7/site-packages/deluge/ui/web/" || die
+ rm -f "${D}/usr/bin/deluge-web" || die
+ rm -f "${D}/usr/share/man/man1/deluge-web.1" || die
+ fi
+ newinitd "${FILESDIR}"/deluged.init-2 deluged
+ newconfd "${FILESDIR}"/deluged.conf-2 deluged
+ systemd_newunit "${FILESDIR}"/deluged.service-2 deluged.service
+ systemd_install_serviced "${FILESDIR}"/deluged.service.conf
+}
+
+pkg_postinst() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ elog
+ elog "If, after upgrading, deluge doesn't work, please remove the"
+ elog "'~/.config/deluge' directory and try again, but make a backup"
+ elog "first!"
+ elog
+ elog "To start the daemon either run 'deluged' as user"
+ elog "or modify /etc/conf.d/deluged and run"
+ elog "/etc/init.d/deluged start as root"
+ elog "You can still use deluge the old way"
+ elog
+ elog "Systemd unit files for deluged and deluge-web no longer source"
+ elog "/etc/conf.d/deluge* files. Environment variable customization now"
+ elog "happens in /etc/systemd/system/deluged.service.d/00gentoo.conf"
+ elog "and /etc/systemd/system/deluge-web.service.d/00gentoo.conf"
+ elog
+ elog "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch b/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch
new file mode 100644
index 000000000000..fda64aa2b393
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.12-fix_scheduler_plugin.patch
@@ -0,0 +1,22 @@
+From cdf301601fe71bd697f3796cf0a5656d437d140e Mon Sep 17 00:00:00 2001
+From: Calum Lind <calumlind+deluge@gmail.com>
+Date: Wed, 16 Sep 2015 15:11:56 +0100
+Subject: [Scheduler] Revert erroneous fix backported from develop branch
+
+ * The issue this was intended to fix only occurs on develop branch
+---
+ deluge/plugins/scheduler/scheduler/core.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deluge/plugins/scheduler/scheduler/core.py b/deluge/plugins/scheduler/scheduler/core.py
+index 9fb81df..f0e2392 100644
+--- a/deluge/plugins/scheduler/scheduler/core.py
++++ b/deluge/plugins/scheduler/scheduler/core.py
+@@ -127,7 +127,7 @@ class Core(CorePluginBase):
+ """
+ core_config = deluge.configmanager.ConfigManager("core.conf")
+ for setting in CONTROLLED_SETTINGS:
+- component.get("PreferencesManager").do_config_set_func(setting, core_config[setting])
++ core_config.apply_set_functions(setting)
+ # Resume the session if necessary
+ component.get("Core").session.resume()
diff --git a/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
new file mode 100644
index 000000000000..349261426de8
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
@@ -0,0 +1,42 @@
+--- a/setup.py
++++ b/setup.py
+@@ -205,38 +205,7 @@
+
+ _ext_modules = []
+
+-# Check for a system libtorrent and if found, then do not build the libtorrent extension
+-build_libtorrent = True
+-try:
+- from deluge._libtorrent import lt
+-except ImportError:
+- build_libtorrent = True
+-else:
+- build_libtorrent = False
+-
+-if build_libtorrent:
+- got_libtorrent = False
+- if not os.path.exists("libtorrent"):
+- import subprocess
+- if subprocess.call(['./get_libtorrent.sh']) > 0:
+- got_libtorrent = False
+- else:
+- got_libtorrent = True
+- else:
+- got_libtorrent = True
+-
+- if got_libtorrent:
+- # There isn't a system libtorrent library, so let's build the one included with deluge
+- libtorrent = Extension(
+- 'libtorrent',
+- extra_compile_args = _extra_compile_args,
+- include_dirs = _include_dirs,
+- libraries = _libraries,
+- library_dirs = _library_dirs,
+- sources = _sources
+- )
+-
+- _ext_modules = [libtorrent]
++import deluge._libtorrent
+
+ desktop_data = 'deluge/data/share/applications/deluge.desktop'
+
diff --git a/net-p2p/deluge/files/deluge-web.conf b/net-p2p/deluge/files/deluge-web.conf
new file mode 100644
index 000000000000..a08f9b74fe61
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.conf
@@ -0,0 +1,6 @@
+# /etc/conf.d/deluge-web
+# Change this to the user you want to run deluged as.
+# You may specify a group too, after a colon
+DELUGE_WEB_USER="deluge:deluge"
+DELUGE_WEB_HOME="/var/lib/deluge"
+#DELUGE_WEB_OPTS=""
diff --git a/net-p2p/deluge/files/deluge-web.init b/net-p2p/deluge/files/deluge-web.init
new file mode 100644
index 000000000000..1e0b4833f072
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.init
@@ -0,0 +1,53 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ "${DELUGE_WEB_USER}" = "" ] ; then
+ eerror "Please edit /etc/conf.d/deluge-web"
+ eerror "You have to specify a user to run deluge-web as, as we will not run it as root!"
+ eerror "Modify DELUGE_WEB_USER to your needs (you can also add a group, after a colon)"
+ return 1
+ fi
+ if ! getent passwd "${DELUGE_WEB_USER%:*}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluge-web"
+ eerror "Your user has to exist!"
+ return 1
+ fi
+ if [ "${DELUGE_WEB_USER%:*}" = "${DELUGE_WEB_USER}" ] ; then
+ return 0
+ else
+ if ! getent group "${DELUGE_WEB_USER#*:}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluge-web"
+ eerror "Your group has to exist too!"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ if [ "${DELUGE_WEB_HOME}" = "" ] ; then
+ DELUGE_WEB_USER_HOME=$(getent passwd "${DELUGE_WEB_USER%:*}" | cut -d ':' -f 6)
+ else
+ DELUGE_WEB_USER_HOME=${DELUGE_WEB_HOME}
+ fi
+ ebegin "Starting Deluge-Web"
+ start-stop-daemon --start --background --pidfile \
+ /run/deluge-web.pid --make-pidfile \
+ --exec /usr/bin/deluge-web --user "${DELUGE_WEB_USER%:*}" \
+ -e HOME="${DELUGE_WEB_USER_HOME}" -- ${DELUGE_WEB_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Deluge-Web"
+ start-stop-daemon --stop --user "${DELUGE_WEB_USER%:*}" \
+ --pidfile /run/deluge-web.pid
+ eend $?
+}
diff --git a/net-p2p/deluge/files/deluge-web.service b/net-p2p/deluge/files/deluge-web.service
new file mode 100644
index 000000000000..426401a95e08
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Deluge WebUI
+After=deluged.service
+
+[Service]
+User=deluge
+ExecStart=/usr/bin/deluge-web
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-p2p/deluge/files/deluge-web.service-2 b/net-p2p/deluge/files/deluge-web.service-2
new file mode 100644
index 000000000000..adb38300a30e
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.service-2
@@ -0,0 +1,11 @@
+[Unit]
+Description=Deluge WebUI
+Documentation=man:deluge-web
+After=deluged.service
+
+[Service]
+ExecStart=/usr/bin/deluge-web -c ${DELUGED_HOME} ${DELUGED_OPTS}
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/net-p2p/deluge/files/deluge-web.service.conf b/net-p2p/deluge/files/deluge-web.service.conf
new file mode 100644
index 000000000000..2c594cdf8f7b
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-web.service.conf
@@ -0,0 +1,4 @@
+[Service]
+User=deluge
+Group=deluge
+Environment="DELUGE_WEB_HOME=/var/lib/deluge" "DELUGE_WEB_OPTS="
diff --git a/net-p2p/deluge/files/deluged.conf b/net-p2p/deluge/files/deluged.conf
new file mode 100644
index 000000000000..21b375d5c97f
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.conf
@@ -0,0 +1,9 @@
+# /etc/conf.d/deluged
+# Change this to the user you want to run deluged as.
+# You may specify a group too, after a colon
+DELUGED_USER=""
+# DELUGED_UMASK="0002"
+# DELUGED_OPTS="-p 58846"
+DELUGEUI_START="false"
+DELUGEUI_OPTS="-u web"
+
diff --git a/net-p2p/deluge/files/deluged.conf-2 b/net-p2p/deluge/files/deluged.conf-2
new file mode 100644
index 000000000000..ac0c4cd0db51
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.conf-2
@@ -0,0 +1,7 @@
+# /etc/conf.d/deluged
+# Change this to the user you want to run deluged as.
+# You may specify a group too, after a colon
+DELUGED_USER="deluge:deluge"
+# DELUGED_UMASK="0002"
+DELUGED_OPTS="-p 58846"
+DELUGED_HOME="/var/lib/deluge"
diff --git a/net-p2p/deluge/files/deluged.init b/net-p2p/deluge/files/deluged.init
new file mode 100644
index 000000000000..0fd9429fb055
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.init
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ "${DELUGED_USER}" = "" ] ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "You have to specify a user to run deluged as, as we will not run it as root!"
+ eerror "Modify DELUGED_USER to your needs (you can also add a group, after a colon)"
+ return 1
+ fi
+ if ! getent passwd "${DELUGED_USER%:*}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your user has to exist!"
+ return 1
+ fi
+ if [ "${DELUGED_USER%:*}" = "${DELUGED_USER}" ] ; then
+ return 0
+ else
+ if ! getent group "${DELUGED_USER#*:}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your group has to exist too!"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ if [ "${DELUGED_HOME}" = "" ] ; then
+ DELUGED_USER_HOME=$(getent passwd "${DELUGED_USER%:*}" | cut -d ':' -f 6)
+ else
+ DELUGED_USER_HOME=${DELUGED_HOME}
+ fi
+ ebegin "Starting Deluged"
+ start-stop-daemon --start --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /run/deluged.pid --background --make-pidfile \
+ ${DELUGED_UMASK:+--umask ${DELUGED_UMASK}} \
+ --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize ${DELUGED_OPTS}
+ eend $?
+
+
+ if [ "${DELUGEUI_START}" = "true" ] ; then
+ ebegin "Starting Deluge"
+ start-stop-daemon --start --background --pidfile \
+ /run/deluge.pid --make-pidfile \
+ --exec /usr/bin/deluge --user "${DELUGED_USER%:*}" \
+ -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping Deluged"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /run/deluged.pid
+ eend $?
+
+
+ if [ "${DELUGEUI_START}" = "true" ] ; then
+ ebegin "Stopping Deluge"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluge --pidfile /run/deluge.pid
+ eend $?
+ fi
+}
diff --git a/net-p2p/deluge/files/deluged.init-2 b/net-p2p/deluge/files/deluged.init-2
new file mode 100644
index 000000000000..1f76298d1877
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.init-2
@@ -0,0 +1,53 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ "${DELUGED_USER}" = "" ] ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "You have to specify a user to run deluged as, as we will not run it as root!"
+ eerror "Modify DELUGED_USER to your needs (you can also add a group, after a colon)"
+ return 1
+ fi
+ if ! getent passwd "${DELUGED_USER%:*}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your user has to exist!"
+ return 1
+ fi
+ if [ "${DELUGED_USER%:*}" = "${DELUGED_USER}" ] ; then
+ return 0
+ else
+ if ! getent group "${DELUGED_USER#*:}" >/dev/null ; then
+ eerror "Please edit /etc/conf.d/deluged"
+ eerror "Your group has to exist too!"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+ if [ "${DELUGED_HOME}" = "" ] ; then
+ DELUGED_USER_HOME=$(getent passwd "${DELUGED_USER%:*}" | cut -d ':' -f 6)
+ else
+ DELUGED_USER_HOME=${DELUGED_HOME}
+ fi
+ ebegin "Starting Deluged"
+ start-stop-daemon --start --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /run/deluged.pid --background --make-pidfile \
+ ${DELUGED_UMASK:+--umask ${DELUGED_UMASK}} \
+ --exec /usr/bin/deluged -e HOME="${DELUGED_USER_HOME}" -- --do-not-daemonize ${DELUGED_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Deluged"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluged --pidfile /run/deluged.pid
+ eend $?
+}
diff --git a/net-p2p/deluge/files/deluged.service b/net-p2p/deluge/files/deluged.service
new file mode 100644
index 000000000000..74876b008ccf
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Deluge BitTorrent client
+After=network.target local-fs.target
+Wants=local-fs.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/deluged
+User=deluge
+Group=deluge
+ExecStart=/usr/bin/deluged -d -p $DELUGED_PORT $DELUGED_OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/deluge/files/deluged.service-2 b/net-p2p/deluge/files/deluged.service-2
new file mode 100644
index 000000000000..049cd025b534
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.service-2
@@ -0,0 +1,11 @@
+[Unit]
+Description=Deluge BitTorrent client
+Documentation=man:deluged
+After=network.target local-fs.target
+Wants=local-fs.target
+
+[Service]
+ExecStart=/usr/bin/deluged -d -c ${DELUGED_HOME} ${DELUGED_OPTS}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/deluge/files/deluged.service.conf b/net-p2p/deluge/files/deluged.service.conf
new file mode 100644
index 000000000000..2d74e23582cb
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.service.conf
@@ -0,0 +1,5 @@
+[Service]
+User=deluge
+Group=deluge
+#UMask=0002
+Environment="DELUGED_HOME=/var/lib/deluge" "DELUGED_OPTS=-p 58846"
diff --git a/net-p2p/deluge/metadata.xml b/net-p2p/deluge/metadata.xml
new file mode 100644
index 000000000000..33afb6123b98
--- /dev/null
+++ b/net-p2p/deluge/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>paolo.pedroni@iol.it</email>
+ <name>Paolo Pedroni</name>
+ <description>Proxied Maintainer, assign bugs to him</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>k_f@gentoo.org</email>
+ <name>Kristian Fiskerstrand</name>
+ <description>Proxy Maintainer, CC on bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+<use>
+ <flag name="webinterface">Install dependencies needed for the web
+ interface</flag>
+ <flag name="console">Enable default console UI</flag>
+ <flag name="linguas_nap">Neapolitan locale</flag>
+ <flag name="linguas_iu">Inuktitut locale</flag>
+ <flag name="linguas_pms">Piemontese locale</flag>
+</use>
+</pkgmetadata>
diff --git a/net-p2p/dogecoin-qt/Manifest b/net-p2p/dogecoin-qt/Manifest
new file mode 100644
index 000000000000..6169c75e7480
--- /dev/null
+++ b/net-p2p/dogecoin-qt/Manifest
@@ -0,0 +1,5 @@
+DIST dogecoin-1.6.tar.gz 3405829 SHA256 cab04d7a33de1b429440bfa98506d4a64417a70bddcb9a33342b38837edf54fd SHA512 dd40d96f87aa787af3ae7da38ec33c94bdc15b1176c2468c3a7408778b3b0e64f2c2bdafa3a85e72ef02fe4b9f931cbe7dec33b1da3bc867978d747f31662621 WHIRLPOOL 9721725f24d712caeab03b863115b9f3d553951cdf48885a3cdc4899f5e5a5eec5a7c1c63c22b5bf7ff93c73cc90b15f8b9c1f4318d8737c1cfa4f7e5aafd1ae
+EBUILD dogecoin-qt-1.6.ebuild 3241 SHA256 7a24178d7ddf377a01c0462e825fa2cda7c9c51e23b18d90c3145a196bd53a70 SHA512 3f699cc77580901b75f23f6b17a8dd1a450ead1a4e522d5011b4133136a6efd2f714d5f32acbab57fa091703e46cf574ab8865a4b9d26ef52d80d5673cdd0267 WHIRLPOOL 9ec23bd891974319597755d497219ca95bf6d2acf3cb64a9f939e3de420ff19fb2d1f60e58df0b357d8923469b126b84fc7ebccf4c2c31ac89032c1fda0a716c
+MISC ChangeLog 2304 SHA256 71ff8a7d7fbae32362bdfff31f504c4ef445af41f81a18f2d50d7bec65a42e98 SHA512 10481c92b0e2063911484f60710989bf4ea36075b4c0e39c10565332a1276b4cc8193a4d4dd549d792d65be6a5cecc9cee8da29622bc0e904b4ce3c876df1e89 WHIRLPOOL e143f4bee0eb3f699b3680cd10175e64dc8b9e0fb8ea85cbcaf32c073dde49c0205d79eb7d96eae0cef37fe852f59eb8e2bafb0656a47f9ead56d0ee58f7ca63
+MISC ChangeLog-2015 1043 SHA256 547e3624dc8b6f9523c541c237974d5bb30d598c72be89d4b19a189fe69ccc4b SHA512 995dd42f7a4958572fdca342212ab8aa7984f41a016fa462957e857674853570b8adff6d6b69c78216c1e376d61b00c935b9ec5b36c387bedeb45f4388e8b0a9 WHIRLPOOL 7359bf1afd1ceba9bd3422db5340354ef571babd719c2f435d82f7dcb1b872119bfbd3a22c01e7f4483ffdf04357d22981f78f629542bdab5e0dc58035f02c76
+MISC metadata.xml 472 SHA256 d56ad0f87cd85e1b460a9675808aec50bc59ffcd9790f409c340e95b623cdcfb SHA512 1bd731e2275966b37531e755ad1f1e5be17cdf369565ab0279df755b42134eb24d7b40b2f079cde4e06aa22994533ccbab47c7da9c8a4a5a99c779817d1c87dc WHIRLPOOL 2d5198cfaf5b4455d56ec9663124cf1de90c3be51bfb70da455626b6b74cdbba033c3299b9fc22b1d8cfcbfe1522dedeb01c6aaf31d9a0d2a8ac7ebf222c148e
diff --git a/net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild b/net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild
new file mode 100644
index 000000000000..8c1c86314a70
--- /dev/null
+++ b/net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="af_ZA ar bg bs ca ca_ES cs cy da de el_GR en eo es es_CL et eu_ES fa fa_IR fi fr fr_CA gu_IN he hi_IN hr hu it ja la lt lv_LV nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW"
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+MyPV="${PV/_/-}"
+MyPN="dogecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency favored by Shiba Inus worldwide"
+HOMEPAGE="https://dogecoin.com/"
+SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/${MyPV}.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dbus ipv6 kde +qrcode upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ qrcode? (
+ media-gfx/qrencode
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+DOCS="doc/README.md doc/release-notes.md"
+
+S="${WORKDIR}/${MyP}"
+
+src_prepare() {
+# epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch
+# rm -r src/leveldb || die
+
+ sed 's/BDB_INCLUDE_PATH=.*//' -i 'dogecoin-qt.pro' || die
+
+ cd src || die
+
+ local filt= yeslang= nolang=
+
+ #for lan in $LANGS; do
+ # if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
+ # ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ # fi
+ #done
+
+ for ts in $(ls qt/locale/*.ts)
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts"
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'qt/bitcoin.qrc' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ OPTS=()
+
+ use dbus && OPTS+=("USE_DBUS=1")
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use qrcode && OPTS+=("USE_QRCODE=1")
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
+ fi
+
+ #The litecoin codebase is mostly taken from bitcoin-qt
+ eqmake4 dogecoin-qt.pro "${OPTS[@]}" || die
+}
+
+#Tests are broken with and without our litecoin-sys_leveldb.patch
+#src_test() {
+# cd src || die
+# emake -f makefile.unix "${OPTS[@]}" test_litecoin
+# ./test_litecoin || die 'Tests failed'
+#}
+
+src_install() {
+# qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Dogecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/dogecoin;\nTerminal=false"
+
+# newman contrib/debian/manpages/bitcoin-qt.1 ${PN}.1
+
+# if use kde; then
+# insinto /usr/share/kde4/services
+# newins contrib/debian/bitcoin-qt.protocol ${PN}.protocol
+# fi
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/dogecoin-qt/metadata.xml b/net-p2p/dogecoin-qt/metadata.xml
new file mode 100644
index 000000000000..214ecd1e7eeb
--- /dev/null
+++ b/net-p2p/dogecoin-qt/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ This is a client for the Dogecoin cryptocurrency.
+ Dogecoin is a scrypt-based alternative to Bitcoin.
+ </longdescription>
+ <use>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">dogecoin/dogecoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/ed2k_hash/Manifest b/net-p2p/ed2k_hash/Manifest
new file mode 100644
index 000000000000..948a34e3b5f6
--- /dev/null
+++ b/net-p2p/ed2k_hash/Manifest
@@ -0,0 +1,7 @@
+AUX ed2k_64bit.patch 462 SHA256 ef31840da881b63c0793c196e049abfee947001c9aa530f0c3ae67f67129b862 SHA512 48143a761a271cd40641c06f7ea109f68111962ff14e22be85e842932726233994f84ea60f208d7f10f38de0c6709b80c4c30f3fc051e3170991919c90909ff1 WHIRLPOOL 9dc74c98e87507da53c3416a482dbdedb63c830e010fda767d80d2275d792c82d50e58d7b35f92cd07786187fa83b5ffb59f81617c717b34185fbefd878028d0
+DIST ed2k_hash-0.4.0.tar.gz 113158 SHA256 554b2d9fb3ce668312341f43bafc95cf985059d83bf5e82f92547610c7f2bf18 SHA512 f924c6b39bf82fe0d4e68decb5ae9fb5ce2999e8b1d3083ba97c178f3f716634603982962947cecb2ef20de56672b10e833d104bae9627ae180ba629c9e1b4c6 WHIRLPOOL e65036d632a6dfed746c851c76727fe43ae3fbb7818a0ec2d26d0190279b9a119c2854158124c5bc493ada9421acc0bfcf9229ab3f016e291ac9f8f0c7264481
+EBUILD ed2k_hash-0.4.0-r1.ebuild 822 SHA256 4b6852499d3567608c71a4474688e828029d136a435b4fd1bb7f01d69217d39a SHA512 9e4f63359ff412376dad918f0bab38c002f34c47909fd3dbfdebb9540933bfb95702453e653536ce726a50f19cb20a8d993b7fe22204a9e3c1370a3ec75d69e6 WHIRLPOOL 77f68a28ce3c2e1a124ad97abe9ec1b8078113e5412001e452e58558314b20901716c78f36dbc5f26ad5dcbaa2eb0a49b5abe357b841518ed80a3ab0e65b35e3
+EBUILD ed2k_hash-0.4.0-r2.ebuild 816 SHA256 e86c9b0da51d10a4aea6b96babe6c5b3d717b857fa4cc3a9a8d91bb006206c0f SHA512 25e7db3bce23f241bf7f4258c18b5d3179c27a49a663d67e55a29289782fb15fe7e3fa00b1fb12e1b0e08ae5ed0f322272313010482061731de0cde3641c25f4 WHIRLPOOL 4b3afe791955bc4fcec0fbff9946489e229ae39625426ef393611c58f373f341b7a61184647ba044d69154458b874b3849c6014e7187c7dd56b749ffb815f6d6
+MISC ChangeLog 2708 SHA256 372390852d909a75caea03ece3ba0a6c23bf89eb2b9b972a46328c26488aba06 SHA512 423370bfe5d47f4bfff5fb3319674f3dcf622bd709f319364acd1d49f32f693505e5530b7b17fd78311f6991dbe7e86cf76b311922e880786d4cf66349bf6628 WHIRLPOOL 0c241aeb94383dd908c2e1aaa84bb5269e48382b36c87f82ded0fec59b49e26838323221df45c7c12435d9199321f66de703c8131706dda12748e67bf61a529a
+MISC ChangeLog-2015 2749 SHA256 c6aac0dcd0a0ec8bb88c8656796c800f43634fb8bafb1c62e658da4dbded7d9b SHA512 b305f2b829162a5251121001fc35ee2793ada84adbed675c969645d912b7654d85893155b450de14405cefda47e65d20e629bad65d26007c5be3633847ea8c7e WHIRLPOOL 2f10e74f8088748702c4f6f3f52f09c1f421a4f3ddd5678cfa34377bdeda2fad4eda4338d919eccf214ac9123d3afa65d332200c3c49d87fdd2ab7ce97c3e78d
+MISC metadata.xml 247 SHA256 6fd09d4015a1213da44d9d98d05d67fc50ab4d5a30b0f7ab7f6c145c43937a5c SHA512 0fd2dabec194318e31d99cea9b5ddd499f0e545af32fdf63d570c5cfb49650c57de6c1a131f936a5f4867f7651f771b0db464ef461eb08363b96112d3eedbce4 WHIRLPOOL 3f38458142b47135b73db30059ee7231c574ff1fef01139b8e7ecc910752fe3ed151b8ca48a3a41ea7ca8cdd6525a0fb0dfcf56aab53b57c687cf08f18db0f26
diff --git a/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild b/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..f7ed1638c4d7
--- /dev/null
+++ b/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic eutils
+
+DESCRIPTION="Tool for generating eDonkey2000 links"
+HOMEPAGE="http://ed2k-tools.sourceforge.net/ed2k_hash.shtml"
+RESTRICT="mirror"
+SRC_URI="mirror://sourceforge/ed2k-tools/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="fltk"
+DEPEND="fltk? ( x11-libs/fltk:1 )"
+
+src_prepare() {
+ epatch "${FILESDIR}/ed2k_64bit.patch"
+}
+
+src_configure() {
+ if use fltk; then
+ append-ldflags "$(fltk-config --ldflags)"
+ export CPPFLAGS="$(fltk-config --cxxflags)"
+ else
+ export ac_cv_lib_fltk_main='no'
+ fi
+
+ econf --disable-dependency-tracking
+}
+
+src_install() {
+ emake install DESTDIR="${D}" mydocdir=/usr/share/doc/${PF}/html
+ dodoc AUTHORS INSTALL README TODO
+}
diff --git a/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r2.ebuild b/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r2.ebuild
new file mode 100644
index 000000000000..1e2ab6041d0d
--- /dev/null
+++ b/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic
+
+DESCRIPTION="Tool for generating eDonkey2000 links"
+HOMEPAGE="http://ed2k-tools.sourceforge.net/ed2k_hash.shtml"
+RESTRICT="mirror"
+SRC_URI="mirror://sourceforge/ed2k-tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="" # fltk support is broken, bug #359643
+
+DEPEND=""
+RDEPEND=""
+#DEPEND="fltk? ( x11-libs/fltk:1 )"
+
+PATCHES=( "${FILESDIR}/ed2k_64bit.patch" )
+
+src_configure() {
+# if use fltk; then
+# append-ldflags "$(fltk-config --ldflags)"
+# export CPPFLAGS="$(fltk-config --cxxflags)"
+# else
+ export ac_cv_lib_fltk_main='no'
+# fi
+
+ econf
+}
+
+src_install() {
+ emake install DESTDIR="${D}" mydocdir=/usr/share/doc/${PF}/html
+ einstalldocs
+}
diff --git a/net-p2p/ed2k_hash/files/ed2k_64bit.patch b/net-p2p/ed2k_hash/files/ed2k_64bit.patch
new file mode 100644
index 000000000000..3523b1febecd
--- /dev/null
+++ b/net-p2p/ed2k_hash/files/ed2k_64bit.patch
@@ -0,0 +1,12 @@
+--- a/ed2k_hash/md4.h 2002-09-04 18:24:37.000000000 +0100
++++ b/ed2k_hash/md4.h 2004-09-02 21:13:49.900613616 +0100
+@@ -66,7 +66,8 @@
+ typedef unsigned short int UINT2;
+
+ /* UINT4 defines a four byte word */
+-typedef unsigned long int UINT4;
++/* unsigned long int on 64bit is 8 bits */
++typedef unsigned int UINT4;
+
+ /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
+ If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
diff --git a/net-p2p/ed2k_hash/metadata.xml b/net-p2p/ed2k_hash/metadata.xml
new file mode 100644
index 000000000000..60470d6a6f41
--- /dev/null
+++ b/net-p2p/ed2k_hash/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">ed2k-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/eiskaltdcpp/Manifest b/net-p2p/eiskaltdcpp/Manifest
new file mode 100644
index 000000000000..7c878a1edaa8
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/Manifest
@@ -0,0 +1,11 @@
+AUX eiskaltdcpp-2.2.10-ipv6_upnp.patch 4793 SHA256 1dd9ba73c3f64e2a683bcb75cd06df430f30982b95cdacaf1065d231579fcdfa SHA512 d1be465da6cc13584f074bf9b96a0355127b4e2e0b3d571473116fa55a2bca617786988f0dae58ddf50a4f31531658cdc6258eb92ab2eb7599165b5ca6d11cf5 WHIRLPOOL 32c713f39cab7592f9f8674b11f3e70b3d8574e644cced52d300cf6b1bd4ece911381cc9f235d4c5c1a2bf6c57e55b3b83e791da136da0b07920aa54336fc146
+AUX eiskaltdcpp-2.2.10-miniupnpc1.patch 1511 SHA256 e41d973803825566a9914e7a07ea46bb1faa91a6bc0c9663e5c82a93c60c7f69 SHA512 fb97a5b2a43433ec3b3bb557b1b6c488e6f3b38bf507eade67468636a1cc7721de2ef005664e248945e5d68bc82e479849c88628598d53aaecdef438fffa3e09 WHIRLPOOL 3b1fa78a4c3b05947f4f3e4961708b0de524dfb005fc64f6f8e5f390a18dc82079f421117993cf3d30b601a729b845d72eb11c3efcf8111ea4df34b5e0a43dc5
+AUX eiskaltdcpp-2.2.10-miniupnpc2.patch 1123 SHA256 d1d02648f488c22c58b2090bdba5babc828a8479a03cf310a8ed4be55ba6a470 SHA512 14cd68087aeaa755eeae58fd1265af35fb4f4e1651e7f083f09fd9e660a1b8df5bb8d6e31add6ba30796c99058030386432a69ef4338d969c692a80931361e36 WHIRLPOOL ff70505649873e022df1255c02c7ca3395d016ab2a42e12c8c71c904aa13cfab8157527f4d5210347e26eba10c9ba4c2559801419c819f32619036a3f5fa6e53
+AUX eiskaltdcpp-2.2.10-openssl-1.1.patch 5482 SHA256 d8ace9b52618f0a48a018aa070130dcb0f39c584d75d55cdea499c98006b0f61 SHA512 52433c16a95aefa9e5fd36c812b6f4cc5729cd870885fada69fe5529da11ab1edf4701879c62db0befab17e60da1168bf724ae8c39ee5f22d24eafda4f808485 WHIRLPOOL 71953184f84ad8d527a1afe237d46d2f2e56ee3dee3c71048e49d2dfa170adc86ba7131bb8e05aca9f425ee83d570e30fb113a46c0c46a4e9fa75b67a64ffd04
+AUX eiskaltdcpp-2.2.10-tray-close.patch 788 SHA256 57d4278e9670cff5c01231bcc727d6fe12018f80d74750aaa34e636f77a7c04f SHA512 f1f59590b7ded55bc6351450cbe1efcf15ca8db2c532d2871512c8866809f06572076a586c968fade8d0f2fe8d33eb06d1b0359fb810748b6ad9d812c188155d WHIRLPOOL 0c886e588d213703f9782565d2f786528072dcfb215aa7288b585813b8ad8c0910a47990944aacf8f0b0bf8dc4e23d43a6024322c1d54eb6b6759919b92c1a57
+DIST eiskaltdcpp-2.2.10.tar.gz 3843143 SHA256 e461c8c499e459651d6382a6ded6788e5ac9a9c4ff26386c3cf073d94d606127 SHA512 97c39287b9568aebc5ab21aeabefb63ea32bde8744242bb8647b742c933de9cf74a7fbb2e6df7be6046319bbc660e8abdec0fa332ee91ec5048492af0d763818 WHIRLPOOL 463abac15ccabdbe002d6b5e30cf1baa7486055e304ec963a4d50449ff8b451d093beba273d2e11a9002e642d6dcb06e05970898b893a86c7917dfbfa02611ae
+EBUILD eiskaltdcpp-2.2.10.ebuild 3260 SHA256 ff639ab1fcebb17b01aac1aa30355b74158c198940b76f48be87e4d7915e3a6d SHA512 e8c0310563413d235ed03b814e672dc09e0a35f882cc9124ed80e3ed47e129fffee553e82ff09341bc0e5a6a0bb1b01a5a2f486dbdeb63a316b234fc6ebef606 WHIRLPOOL 6592cc5360e03257bac6dad7165a28f68166f126ac8d431525019157ecefff6d0fa6982d4b3583cdf649e31700674b8b384aecc68a90c0d302151cf32a704eb9
+EBUILD eiskaltdcpp-9999.ebuild 3489 SHA256 64b7c3e68a13905cd48d9c393140ff0659928559eacb7e67b6c3bb63db708bd6 SHA512 1e42ac5f1ff745f48299088953bedcddeadb4cfd74a11ddb5ac52748861d97f3811c127d721b6d687cb544fc26fb423e1e0101d8e5581ebaf844f6a53e93576c WHIRLPOOL 09b946def9c77c389fb7076fad30a29558de70506e480f70c1102f0ac070c0824ea6ddd10127ff4e7ae3fac9c699fa5d04208d9f4c767b5e6961174f035e6b60
+MISC ChangeLog 2678 SHA256 42386e773dddf40be5a406447bcb703f81409067318b3f66b46c35f703cebee9 SHA512 9cf43206c6637a69beab4d1e9861734c9e6a5a355f455656a1c0a773d4e0207e46c48f734293844218b5f0cea73ef1c69ea7005fd39082a5b6bafb1cc0708806 WHIRLPOOL 8ad8bb2979b1c425b5bb7f290382240afe329ccd63f6907f9d3a734833196ac1763868183292ce5a1c32d90a19872ee7a0cb98c29746b27e8f8da9a89e44d51f
+MISC ChangeLog-2015 11096 SHA256 30693b260225184806fdeab40aae91f6b37f44159418fff66470c3815c762122 SHA512 3b2d73d41b2b97d78f4f687b9bad032fdbfbbb32c9c0c69ff26ba788f9cdf4a8bde1430580a8e7ea695e6e884710a2b27bf2d33254a4435163b450ad275f425b WHIRLPOOL 94ba3a09d704c6e414197c1b26eec9fdc04995d98165f4257b1b7768e035b1ee4a59d14dae56ba8709e0ea8af531357fda03a6ee6b0055497bb4e67b697bd4b0
+MISC metadata.xml 996 SHA256 c86ad162b468b17f839d378a71215fcf7afc8def096b388f8ea3b9838c8af9fd SHA512 c36a94f827751c9a4ad080470d52576ea7a679a709605dec744f6bd55b0c4bb7566cc4e17aa499e09087cda45f839e0aa6a9e0d29ce5ce089fa25bf07a3e7325 WHIRLPOOL ce5cadd55bb66a53cb4877cc673f9e092d6426cc0c684981b15800cabd17ee7532fb162c79aac4d10c866f07f7ff44cd515065ad49be8ff16c229a9a6fbdce83
diff --git a/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild
new file mode 100644
index 000000000000..69ba4dfd9af6
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.10.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="be bg cs de el en es eu fr hu it pl pt_BR ru sk sr@latin sr sv_SE uk vi zh_CN"
+
+inherit cmake-utils gnome2-utils l10n xdg-utils
+[[ ${PV} = *9999* ]] && inherit git-r3
+
+DESCRIPTION="Qt/DC++ based client for DirectConnect and ADC protocols"
+HOMEPAGE="https://github.com/eiskaltdcpp/eiskaltdcpp"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="cli daemon dbus +dht examples idn -javascript json lua +minimal pcre +qt5 spell sqlite upnp -xmlrpc"
+
+REQUIRED_USE="
+ ?? ( json xmlrpc )
+ cli? ( ^^ ( json xmlrpc ) )
+ dbus? ( qt5 )
+ javascript? ( qt5 )
+ spell? ( qt5 )
+ sqlite? ( qt5 )
+"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ KEYWORDS=""
+fi
+
+RDEPEND="
+ app-arch/bzip2
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ sys-apps/attr
+ sys-libs/zlib
+ virtual/libiconv
+ virtual/libintl
+ cli? (
+ dev-lang/perl
+ dev-perl/Data-Dump
+ dev-perl/Term-ShellUI
+ virtual/perl-Getopt-Long
+ json? ( dev-perl/JSON-RPC )
+ xmlrpc? ( dev-perl/RPC-XML )
+ )
+ daemon? ( xmlrpc? ( dev-libs/xmlrpc-c[abyss,cxx] ) )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:= )
+ pcre? ( dev-libs/libpcre )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ dbus? ( dev-qt/qtdbus:5 )
+ javascript? (
+ dev-qt/qtdeclarative:5
+ dev-qt/qtscript:5
+ )
+ spell? ( app-text/aspell )
+ sqlite? ( dev-qt/qtsql:5[sqlite] )
+ )
+ upnp? ( net-libs/miniupnpc )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+DOCS=( AUTHORS ChangeLog.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ipv6_upnp.patch
+ "${FILESDIR}"/${P}-miniupnpc{1,2}.patch
+ "${FILESDIR}"/${P}-openssl-1.1.patch
+ "${FILESDIR}"/${P}-tray-close.patch
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ l10n_find_plocales_changes 'eiskaltdcpp-qt/translations' '' '.ts'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -Dlinguas="$(l10n_get_locales)"
+ -DLOCAL_MINIUPNP=OFF
+ -DUSE_GTK=OFF
+ -DUSE_GTK3=OFF
+ -DUSE_LIBGNOME2=OFF
+ -DUSE_LIBCANBERRA=OFF
+ -DUSE_LIBNOTIFY=OFF
+ -DUSE_QT=OFF
+ -DUSE_QT_QML=OFF
+ -DNO_UI_DAEMON=$(usex daemon)
+ -DDBUS_NOTIFY=$(usex dbus)
+ -DWITH_DHT=$(usex dht)
+ -DWITH_EXAMPLES=$(usex examples)
+ -DUSE_IDNA=$(usex idn)
+ -DUSE_JS=$(usex javascript)
+ -DLUA_SCRIPT=$(usex lua)
+ -DWITH_LUASCRIPTS=$(usex lua)
+ -DWITH_DEV_FILES=$(usex !minimal)
+ -DPERL_REGEX=$(usex pcre)
+ -DUSE_QT5=$(usex qt5)
+ -DWITH_EMOTICONS=$(usex qt5)
+ -DWITH_SOUNDS=$(usex qt5)
+ -DUSE_ASPELL=$(usex spell)
+ -DUSE_QT_SQLITE=$(usex sqlite)
+ -DUSE_MINIUPNP=$(usex upnp)
+ )
+ if use cli; then
+ mycmakeargs+=(
+ -DUSE_CLI_JSONRPC=$(usex json)
+ -DUSE_CLI_XMLRPC=$(usex xmlrpc)
+ )
+ fi
+ if use daemon; then
+ mycmakeargs+=(
+ -DJSONRPC_DAEMON=$(usex json)
+ -DXMLRPC_DAEMON=$(usex xmlrpc)
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild b/net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild
new file mode 100644
index 000000000000..8a00e9cfb49d
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PLOCALES="be bg cs de el en es eu fr hu it pl pt_BR ru sk sr sr@latin sv_SE tr uk vi zh_CN"
+
+inherit cmake-utils gnome2-utils l10n xdg-utils
+[[ ${PV} = *9999* ]] && inherit git-r3
+
+DESCRIPTION="Qt/DC++ based client for DirectConnect and ADC protocols"
+HOMEPAGE="https://github.com/eiskaltdcpp/eiskaltdcpp"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="cli daemon dbus +dht examples -gtk idn -javascript json libcanberra libnotify lua +minimal pcre +qt5 spell sqlite upnp -xmlrpc"
+
+REQUIRED_USE="
+ ?? ( json xmlrpc )
+ cli? ( ^^ ( json xmlrpc ) )
+ dbus? ( qt5 )
+ javascript? ( qt5 )
+ libcanberra? ( gtk )
+ libnotify? ( gtk )
+ spell? ( qt5 )
+ sqlite? ( qt5 )
+"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ KEYWORDS=""
+fi
+
+RDEPEND="
+ app-arch/bzip2
+ dev-libs/boost:=
+ dev-libs/openssl:0=
+ sys-apps/attr
+ sys-libs/zlib
+ virtual/libiconv
+ virtual/libintl
+ cli? (
+ dev-lang/perl
+ dev-perl/Data-Dump
+ dev-perl/Term-ShellUI
+ virtual/perl-Getopt-Long
+ json? ( dev-perl/JSON-RPC )
+ xmlrpc? ( dev-perl/RPC-XML )
+ )
+ daemon? ( xmlrpc? ( dev-libs/xmlrpc-c[abyss,cxx] ) )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/gtk+:3
+ x11-libs/pango
+ x11-themes/hicolor-icon-theme
+ libcanberra? ( media-libs/libcanberra )
+ libnotify? ( x11-libs/libnotify )
+ )
+ idn? ( net-dns/libidn )
+ lua? ( dev-lang/lua:= )
+ pcre? ( dev-libs/libpcre )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ dbus? ( dev-qt/qtdbus:5 )
+ javascript? (
+ dev-qt/qtdeclarative:5
+ dev-qt/qtscript:5
+ )
+ spell? ( app-text/aspell )
+ sqlite? ( dev-qt/qtsql:5[sqlite] )
+ )
+ upnp? ( net-libs/miniupnpc )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+"
+
+DOCS=( AUTHORS ChangeLog.txt )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ l10n_find_plocales_changes 'eiskaltdcpp-qt/translations' '' '.ts'
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -Dlinguas="$(l10n_get_locales)"
+ -DLOCAL_MINIUPNP=OFF
+ -DUSE_GTK=OFF
+ -DUSE_QT=OFF
+ -DUSE_QT_QML=OFF
+ -DUSE_LIBGNOME2=OFF
+ -DNO_UI_DAEMON=$(usex daemon)
+ -DDBUS_NOTIFY=$(usex dbus)
+ -DWITH_DHT=$(usex dht)
+ -DWITH_EXAMPLES=$(usex examples)
+ -DUSE_GTK3=$(usex gtk)
+ -DUSE_IDNA=$(usex idn)
+ -DUSE_JS=$(usex javascript)
+ -DUSE_LIBCANBERRA=$(usex libcanberra)
+ -DUSE_LIBNOTIFY=$(usex libnotify)
+ -DLUA_SCRIPT=$(usex lua)
+ -DWITH_LUASCRIPTS=$(usex lua)
+ -DWITH_DEV_FILES=$(usex !minimal)
+ -DPERL_REGEX=$(usex pcre)
+ -DUSE_QT5=$(usex qt5)
+ -DUSE_ASPELL=$(usex spell)
+ -DUSE_QT_SQLITE=$(usex sqlite)
+ -DUSE_MINIUPNP=$(usex upnp)
+ )
+ if use cli; then
+ mycmakeargs+=(
+ -DUSE_CLI_JSONRPC=$(usex json)
+ -DUSE_CLI_XMLRPC=$(usex xmlrpc)
+ )
+ fi
+ if use daemon; then
+ mycmakeargs+=(
+ -DJSONRPC_DAEMON=$(usex json)
+ -DXMLRPC_DAEMON=$(usex xmlrpc)
+ )
+ fi
+ if use qt5 || use gtk; then
+ mycmakeargs+=(
+ -DWITH_EMOTICONS=ON
+ -DWITH_SOUNDS=ON
+ )
+ else
+ mycmakeargs+=(
+ -DWITH_EMOTICONS=OFF
+ -DWITH_SOUNDS=OFF
+ )
+ fi
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch
new file mode 100644
index 000000000000..9b1f7638b6aa
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-ipv6_upnp.patch
@@ -0,0 +1,123 @@
+From 639b9f9aa286f10ce11f9fb28f0c83985f069a0d Mon Sep 17 00:00:00 2001
+From: Sergey Farbotka <z8sergey8z@gmail.com>
+Date: Mon, 31 Aug 2015 23:55:44 +0300
+Subject: [PATCH] Core: send IPv4-only address in UPNP request
+
+The app sends first available local IP address in UPNP request.
+If first available address is IPv6, miniupnpd sends the following error:
+"Failed to convert hostname '<my-ipv6-address>' to ip address"
+
+As eiskaltdc++ does not support IPv6 yet, we can use IPv4 address only
+in UPNP requests.
+---
+ dcpp/ConnectivityManager.cpp | 2 +-
+ dcpp/Util.cpp | 17 ++++++++++++-----
+ dcpp/Util.h | 5 +++--
+ extra/upnpc.cpp | 2 +-
+ 4 files changed, 17 insertions(+), 9 deletions(-)
+
+diff --git a/dcpp/ConnectivityManager.cpp b/dcpp/ConnectivityManager.cpp
+index 3495a9a..acc0d68 100644
+--- a/dcpp/ConnectivityManager.cpp
++++ b/dcpp/ConnectivityManager.cpp
+@@ -90,7 +90,7 @@ void ConnectivityManager::detectConnection() {
+
+ autoDetected = true;
+
+- if (!Util::isPrivateIp(Util::getLocalIp())) {
++ if (!Util::isPrivateIp(Util::getLocalIp(AF_INET))) {
+ SettingsManager::getInstance()->set(SettingsManager::INCOMING_CONNECTIONS, SettingsManager::INCOMING_DIRECT);
+ log(_("Public IP address detected, selecting active mode with direct connection"));
+ fire(ConnectivityManagerListener::Finished());
+diff --git a/dcpp/Util.cpp b/dcpp/Util.cpp
+index dc7e08e..9b5a2ca 100644
+--- a/dcpp/Util.cpp
++++ b/dcpp/Util.cpp
+@@ -704,7 +704,7 @@ string Util::formatExactSize(int64_t aBytes) {
+ #endif
+ }
+
+-vector<string> Util::getLocalIPs() {
++vector<string> Util::getLocalIPs(unsigned short sa_family) {
+ vector<string> addresses;
+
+ #ifdef HAVE_IFADDRS_H
+@@ -712,6 +712,9 @@ vector<string> Util::getLocalIPs() {
+
+ if (getifaddrs(&ifap) == 0)
+ {
++ bool ipv4 = (sa_family == AF_UNSPEC) || (sa_family == AF_INET);
++ bool ipv6 = (sa_family == AF_UNSPEC) || (sa_family == AF_INET6);
++
+ for (struct ifaddrs *i = ifap; i != NULL; i = i->ifa_next)
+ {
+ struct sockaddr *sa = i->ifa_addr;
+@@ -723,14 +726,14 @@ vector<string> Util::getLocalIPs() {
+ socklen_t len;
+
+ // IPv4 address
+- if (sa->sa_family == AF_INET)
++ if (ipv4 && (sa->sa_family == AF_INET))
+ {
+ struct sockaddr_in* sai = (struct sockaddr_in*)sa;
+ src = (void*) &(sai->sin_addr);
+ len = INET_ADDRSTRLEN;
+ }
+ // IPv6 address
+- else if (sa->sa_family == AF_INET6)
++ else if (ipv6 && (sa->sa_family == AF_INET6))
+ {
+ struct sockaddr_in6* sai6 = (struct sockaddr_in6*)sa;
+ src = (void*) &(sai6->sin6_addr);
+@@ -752,9 +755,13 @@ vector<string> Util::getLocalIPs() {
+
+ return addresses;
+ }
+-string Util::getLocalIp() {
++string Util::getLocalIp(unsigned short as_family) {
+ #ifdef HAVE_IFADDRS_H
+- return getLocalIPs().empty() ? "0.0.0.0" : getLocalIPs()[0];
++ vector<string> addresses = getLocalIPs(as_family);
++ if (addresses.empty())
++ return (((as_family == AF_UNSPEC) || (as_family == AF_INET)) ? "0.0.0.0" : "::");
++
++ return addresses[0];
+ #else
+ string tmp;
+
+diff --git a/dcpp/Util.h b/dcpp/Util.h
+index a489f70..f2842d3 100644
+--- a/dcpp/Util.h
++++ b/dcpp/Util.h
+@@ -28,6 +28,7 @@
+
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <sys/socket.h>
+ #include <unistd.h>
+ #include <cstdlib>
+ #include <vector>
+@@ -403,8 +404,8 @@ class Util
+ }
+
+ static string encodeURI(const string& /*aString*/, bool reverse = false);
+- static string getLocalIp();
+- static std::vector<string> getLocalIPs();
++ static string getLocalIp(unsigned short sa_family = AF_UNSPEC);
++ static std::vector<string> getLocalIPs(unsigned short sa_family = AF_UNSPEC);
+ static bool isPrivateIp(string const& ip);
+ static string formatAdditionalInfo(const std::string& aIp, bool sIp, bool sCC);
+ /**
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index fb61f14..63f6d34 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -63,7 +63,7 @@ bool UPnPc::add(const unsigned short port, const UPnP::Protocol protocol, const
+ const string port_ = Util::toString(port);
+
+ return UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_.c_str(), port_.c_str(),
+- Util::getLocalIp().c_str(), description.c_str(), protocols[protocol], NULL
++ Util::getLocalIp(AF_INET).c_str(), description.c_str(), protocols[protocol], NULL
+ #if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
+ , 0) == UPNPCOMMAND_SUCCESS;
+ #else
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch
new file mode 100644
index 000000000000..7cca21840c7f
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc1.patch
@@ -0,0 +1,31 @@
+From 33bf1489e75d1b1cc834d6eb9629598cd77d6c58 Mon Sep 17 00:00:00 2001
+From: Pavel Vatagin <pavelvat@gmail.com>
+Date: Sun, 17 Jan 2016 03:00:36 +0300
+Subject: [PATCH] extra: fix static build for windows with -DLOCAL_MINIUPNP=OFF
+
+---
+ extra/upnpc.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index 63f6d34..40a011a 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -42,7 +42,7 @@ using namespace dcpp;
+ bool UPnPc::init()
+ {
+ UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
+-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
++#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+ , 0, 0);
+ #else
+ );
+@@ -64,7 +64,7 @@ bool UPnPc::add(const unsigned short port, const UPnP::Protocol protocol, const
+
+ return UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_.c_str(), port_.c_str(),
+ Util::getLocalIp(AF_INET).c_str(), description.c_str(), protocols[protocol], NULL
+-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
++#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+ , 0) == UPNPCOMMAND_SUCCESS;
+ #else
+ ) == UPNPCOMMAND_SUCCESS;
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch
new file mode 100644
index 000000000000..bbe113b9cf47
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-miniupnpc2.patch
@@ -0,0 +1,29 @@
+From b88120830e974d843cbfec552b639fa72c64dcbd Mon Sep 17 00:00:00 2001
+From: Pavel Vatagin <pavelvat@gmail.com>
+Date: Fri, 5 Feb 2016 04:15:33 +0300
+Subject: [PATCH] extra: fix #332
+
+---
+ extra/upnpc.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
+index 40a011a..bbd7bbf 100644
+--- a/extra/upnpc.cpp
++++ b/extra/upnpc.cpp
+@@ -41,9 +41,13 @@ using namespace dcpp;
+
+ bool UPnPc::init()
+ {
+- UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
++ UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), NULL, 0
+ #if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
+- , 0, 0);
++ , 0
++#if (MINIUPNPC_API_VERSION >= 14)
++ , 2
++#endif
++ , NULL);
+ #else
+ );
+ #endif
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch
new file mode 100644
index 000000000000..bf6f387ec26e
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-openssl-1.1.patch
@@ -0,0 +1,138 @@
+From 3b9c502ff5c98856d4f8fdb7ed3c6ef34448bfb7 Mon Sep 17 00:00:00 2001
+From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
+Date: Tue, 7 Feb 2017 09:19:18 +0100
+Subject: [PATCH] crypto: add support for OpenSSL 1.1
+
+In OpenSSL 1.1 BN and SSL are opaque structures.
+
+* BN_set0_pqg() has been implemented in 1.1
+* SSL_is_server() has been implemented in 1.0.2 and 1.1
+
+Reported-by: Vasiliy Glazov <vascom2@gmail.com>
+Closes: https://github.com/eiskaltdcpp/eiskaltdcpp/issues/356
+Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
+---
+ dcpp/CryptoManager.cpp | 15 +++++++++++----
+ dcpp/SSLSocket.cpp | 11 +++++++++--
+ 2 files changed, 20 insertions(+), 6 deletions(-)
+
+diff --git a/dcpp/CryptoManager.cpp b/dcpp/CryptoManager.cpp
+index 08893a75c..b672d92f4 100644
+--- a/dcpp/CryptoManager.cpp
++++ b/dcpp/CryptoManager.cpp
+@@ -27,12 +27,20 @@
+ #include "version.h"
+
+ #include <openssl/bn.h>
+-
++#include <openssl/rand.h>
+ #include <bzlib.h>
+
+ namespace dcpp {
+
+-
++static const char ciphersuites[] =
++ "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:"
++ "ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:"
++ "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:"
++ "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:"
++ "ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:"
++ "DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:"
++ "AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:AES128-SHA"
++ "!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK";
+
+ CryptoManager::CryptoManager()
+ :
+@@ -42,10 +50,10 @@
+ {
+ SSL_library_init();
+
+- clientContext.reset(SSL_CTX_new(TLSv1_client_method()));
+- clientVerContext.reset(SSL_CTX_new(TLSv1_client_method()));
+- serverContext.reset(SSL_CTX_new(TLSv1_server_method()));
+- serverVerContext.reset(SSL_CTX_new(TLSv1_server_method()));
++ clientContext.reset(SSL_CTX_new(SSLv23_client_method()));
++ clientVerContext.reset(SSL_CTX_new(SSLv23_client_method()));
++ serverContext.reset(SSL_CTX_new(SSLv23_server_method()));
++ serverVerContext.reset(SSL_CTX_new(SSLv23_server_method()));
+
+ if(clientContext && clientVerContext && serverContext && serverVerContext) {
+ dh.reset(DH_new());
+@@ -101,10 +109,15 @@
+ };
+
+ if(dh) {
+- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
+- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
+-
++ BIGNUM *p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0);
++ BIGNUM *g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ dh->p = p;
++ dh->g = g;
+ if (!dh->p || !dh->g) {
++#else
++ if (!DH_set0_pqg(dh, p, NULL, g)) {
++#endif
+ dh.reset();
+ } else {
+ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE);
+@@ -112,6 +125,28 @@
+ SSL_CTX_set_tmp_dh(serverContext, (DH*)dh);
+ SSL_CTX_set_tmp_dh(serverVerContext, (DH*)dh);
+ }
++ BN_free(p);
++ BN_free(g);
++ }
++
++ SSL_CTX_set_options(clientContext, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(clientContext, ciphersuites);
++ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(serverContext, ciphersuites);
++ SSL_CTX_set_options(clientVerContext, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(clientVerContext, ciphersuites);
++ SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION);
++ SSL_CTX_set_cipher_list(serverVerContext, ciphersuites);
++
++ EC_KEY* tmp_ecdh;
++ /* NID_X9_62_prime256v1 is not secure, more secure is NID_secp384r1 or NID_secp521r1*/
++ if((tmp_ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1)) != NULL) {
++ SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_ECDH_USE);
++ SSL_CTX_set_tmp_ecdh(serverContext, tmp_ecdh);
++ SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_ECDH_USE);
++ SSL_CTX_set_tmp_ecdh(serverVerContext, tmp_ecdh);
++
++ EC_KEY_free(tmp_ecdh);
+ }
+
+ SSL_CTX_set_verify(serverContext, SSL_VERIFY_NONE, 0);
+diff --git a/dcpp/SSLSocket.cpp b/dcpp/SSLSocket.cpp
+index 1e283eec8..d4dc12388 100644
+--- a/dcpp/SSLSocket.cpp
++++ b/dcpp/SSLSocket.cpp
+@@ -37,6 +37,13 @@ void SSLSocket::connect(const string& aIp, uint16_t aPort) {
+ waitConnected(0);
+ }
+
++#if OPENSSL_VERSION_NUMBER < 0x10002000L
++static inline int SSL_is_server(SSL *s)
++{
++ return s->server;
++}
++#endif
++
+ bool SSLSocket::waitConnected(uint32_t millis) {
+ if(!ssl) {
+ if(!Socket::waitConnected(millis)) {
+@@ -54,9 +61,9 @@ bool SSLSocket::waitConnected(uint32_t millis) {
+ }
+
+ while(true) {
+- int ret = ssl->server?SSL_accept(ssl):SSL_connect(ssl);
++ int ret = SSL_is_server(ssl)?SSL_accept(ssl):SSL_connect(ssl);
+ if(ret == 1) {
+- dcdebug("Connected to SSL server using %s as %s\n", SSL_get_cipher(ssl), ssl->server?"server":"client");
++ dcdebug("Connected to SSL server using %s as %s\n", SSL_get_cipher(ssl), SSL_is_server(ssl)?"server":"client");
+ return true;
+ }
+ if(!waitWant(ret, millis)) {
diff --git a/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch
new file mode 100644
index 000000000000..0749fe80802e
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/files/eiskaltdcpp-2.2.10-tray-close.patch
@@ -0,0 +1,23 @@
+From 35edb67258747a4704bad0288d9d02d3486493d8 Mon Sep 17 00:00:00 2001
+From: aneo78 <aneo78@yandex.ru>
+Date: Fri, 11 Aug 2017 23:29:33 +0700
+Subject: [PATCH] fix issue 363: eiskaltdcpp-qt don't close in Qt5
+
+---
+ eiskaltdcpp-qt/src/MainWindow.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/eiskaltdcpp-qt/src/MainWindow.cpp b/eiskaltdcpp-qt/src/MainWindow.cpp
+index a80c5e9c0..e8b49e4b6 100644
+--- a/eiskaltdcpp-qt/src/MainWindow.cpp
++++ b/eiskaltdcpp-qt/src/MainWindow.cpp
+@@ -390,6 +390,9 @@ void MainWindow::closeEvent(QCloseEvent *c_e){
+ if (ConnectionManager::getInstance())
+ ConnectionManager::getInstance()->disconnect();
+
++ if (Notification::getInstance())
++ Notify->enableTray(false);
++
+ d->arena->hide();
+ d->arena->setWidget(NULL);
+
diff --git a/net-p2p/eiskaltdcpp/metadata.xml b/net-p2p/eiskaltdcpp/metadata.xml
new file mode 100644
index 000000000000..b65eafebb426
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ EiskaltDC++ is a multi-platform program that uses the Direct Connect and
+ ADC protocol. It is compatible with other DC clients, such as the original DC
+ from Neomodus, DC++ and derivatives. EiskaltDC++ also interoperates with all
+ common DC hub software.
+ </longdescription>
+ <use>
+ <flag name="cli">Enable sample cli based on readline</flag>
+ <flag name="daemon">Enable eiskaltdcpp-daemon</flag>
+ <flag name="dht">Enable DHT (distributed hash table) support for libeiskaltdcpp</flag>
+ <flag name="json">Enable JSON for cli and daemon</flag>
+ <flag name="libcanberra">Enable sound notifications support over libcanberra in EiskaltDC++ Gtk</flag>
+ <flag name="minimal">Don't install headers</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">eiskaltdcpp/eiskaltdcpp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/fms/Manifest b/net-p2p/fms/Manifest
new file mode 100644
index 000000000000..86778bd6fbb4
--- /dev/null
+++ b/net-p2p/fms/Manifest
@@ -0,0 +1,7 @@
+AUX fms 864 SHA256 c8a1836b3670364a64cdeaa7e3f4ef02ef7d14a0cae61cb68a9e79c083f98ab7 SHA512 317e29e3b248eb3881dc29861d3afe68750d3283960f622be5259ea5e35bfd8f13d7ade62ef4ca38d7f7e8e964e1a3c75f4f86626c1f4a1f65a0073063fd6c01 WHIRLPOOL c730fa647f6d0ac4b0ab1884c51695c8400d763e5ec74239fa409c46794f5fcbf0197bc989734a8a4c74895519b1a08ba9899379fe525f35556fb9404c7b2374
+AUX fms-use-system-libs3.patch 1380 SHA256 7654995dec542dabe4e052abed971f906a50d422e40a1822002a3ecb9cbfd34a SHA512 5eaf4f455a1b6b65e2f71a2371382710d435a2fdc7379244019951622dcdd8ed6677c0fe3061aacff419cc186a8c8b0169f1949445c6af8bd2577f57051527bc WHIRLPOOL 4306104f7a9ce2cef37a7ee8eb8b32a7d4518ff54728f0ebc13b455b12863a5e5fcf60d9bcf599c30da70fba708fdc0b80fb924f3add701b9450e9b4c7e91b6a
+DIST fms-src-0.3.79.zip 3847775 SHA256 b5dbb1e1d075e2134c692038ea95805a528807b0d777e2752f806f6935508f30 SHA512 aa9f505c5ef55b1f462b16de6d870d02dc102fd184cc353c6c6b8a346978a9953b34e878f262f4190a3d15d76c5a37f065c4e5ebdbc0e43a4a5c22d61fa9fba7 WHIRLPOOL ab799a0e318d4bfb750898bd544da31cad39ce81a633da43753bd4c4aa4179425bfeb1b283fc1acf1ec34c2947ce735d48528bd85b664ab50e2f8118f5f30d26
+EBUILD fms-0.3.79.ebuild 1950 SHA256 1bc24f8ebe6c7e6e4554d3bc56c3f1ca83363a9fda501e5d63d8d6ec0d40d336 SHA512 5322cb95d29af0315e6abbe5c369a28d6f4c72e2f9ddf6d30ad87ff56609cbc43acb855c9b1edf1e6a7f70de4715535ec48bf02d533c2c307ee8c9ae7056c7ee WHIRLPOOL 7e980a94d1b9f3e933f95fcf146eeff9c60b35ddd55d401d24fc6199d2f4e1f7de38745c2a60c32acb295472337903b2756159a2d6fba89a994c41affce21a6e
+MISC ChangeLog 3024 SHA256 3c9c907147ec79b0fc2d56692d78256bf57e1cebb05e63bbcbccbb5bbb0631c0 SHA512 f2f201055a89dfa271f560af86760e675d637c87e8d53eae831b609eee4a2b02e4b83d0af9a492f27e96a2a6d4f04519bac1f3fe377f60a2f08c3976a22abf05 WHIRLPOOL b3e3f3cf924967e1f478853af7b2e6046a1ef1e9581d4594a1f2894cee516690f080800ff3c492559364a73785b4cce17a69fc643da269d87025a24509cb176e
+MISC ChangeLog-2015 6286 SHA256 5b3ec323bb48b356c2bb2a7bc39651d7896e6f32b36186b4110f25bdadb37fc1 SHA512 ddd2831ecbf68433631c3406bfa026897b08d8662c3df4a28aca754bf6833108dd1871942385c530e3851b64c65fd29f72e1b8e32892b3cad73fc68e9f44e74f WHIRLPOOL 8f403cee048a3f35f9290fc0bcdfd6d918eb46c2daf3a45c34e15d9cd430c19c60eaf0994ee4ec6b04c27792a5532a1bd5958210cdb392add2684c4eda1f24c0
+MISC metadata.xml 328 SHA256 abc997a21912fb53ddc4e4b7a35080398a87cfab9662d285d703f34b55adb372 SHA512 2346bb04ab74946a53af785c770e3d7cb40d1cbd69010ecb515975c8df60a75ca0e777abf834e3f3de98e4046d5f8ef615349f8cc11fb6093dc87a140c3b08c7 WHIRLPOOL 3cbf433fc3b2ea5bb5f3e87003ca9908917a482eaf2034f541d7cb504c707924863e57a239eae26eba2af37e27c5a97cc5d065024c9a0353feb2ccada215be41
diff --git a/net-p2p/fms/files/fms b/net-p2p/fms/files/fms
new file mode 100644
index 000000000000..07f1a0551637
--- /dev/null
+++ b/net-p2p/fms/files/fms
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Check for OpenRC/Baselayout 2 - see bug #270646
+is_openrc() {
+ [ -f /lib/librc.so -o -f /etc/init.d/sysfs -o -f /lib/rc/version ]
+}
+
+start() {
+ ebegin "Starting FMS"
+ if is_openrc; then
+ start-stop-daemon -S -u freenet:freenet -d /var/freenet/fms -b -x /usr/bin/fms
+ eend $?
+ else
+ cd /var/freenet/fms
+ su -s /bin/sh -c "fms --daemon" freenet
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping FMS"
+ if is_openrc; then
+ start-stop-daemon -K -u freenet:freenet -d /var/freenet/fms /usr/bin/fms
+ eend $?
+ else
+ pkill -u freenet -f "fms --daemon"
+ eend 0
+ fi
+ if [[ $RC_CMD == "restart" ]]; then
+ ebegin "Waiting a few seconds to be sure FMS is ready for restart"
+ sleep 10
+ #give fms time to stop and release the nntp port
+ fi
+}
+
diff --git a/net-p2p/fms/files/fms-use-system-libs3.patch b/net-p2p/fms/files/fms-use-system-libs3.patch
new file mode 100644
index 000000000000..32a702511d53
--- /dev/null
+++ b/net-p2p/fms/files/fms-use-system-libs3.patch
@@ -0,0 +1,41 @@
+--- CMakeLists.txt 2016-06-04 21:18:20.000000000 +0200
++++ CMakeLists.txt.new 2017-01-12 17:12:10.000000000 +0100
+@@ -373,11 +373,18 @@
+ ENDIF(AUDIO_CAPTCHA)
+
+ IF(FROST_SUPPORT OR FCP_SSL_SUPPORT)
+- ADD_SUBDIRECTORY(libs/mbedtls)
+- TARGET_LINK_LIBRARIES(fms mbedtls)
+- TARGET_LINK_LIBRARIES(fms mbedcrypto)
+- TARGET_LINK_LIBRARIES(fms mbedx509)
+- INCLUDE_DIRECTORIES(libs/mbedtls/include)
++
++ FIND_LIBRARY(MBEDTLS_LIBRARY NAMES mbedtls )
++ FIND_LIBRARY(MBEDCRYPTO_LIBRARY NAMES mbedcrypto mbedx509)
++ FIND_LIBRARY(MBEDX509_LIBRARY NAMES mbedx509)
++
++ IF(MBEDTLS_LIBRARY)
++ TARGET_LINK_LIBRARIES(fms ${MBEDTLS_LIBRARY})
++ TARGET_LINK_LIBRARIES(fms ${MBEDCRYPTO_LIBRARY})
++ TARGET_LINK_LIBRARIES(fms ${MBEDX509_LIBRARY})
++ ELSE(MBEDTLS_LIBRARY)
++ MESSAGE(FATAL ERROR: "Could not find mbedtls library.")
++ ENDIF(MBEDTLS_LIBRARY)
+
+ IF(FROST_SUPPORT)
+ ADD_DEFINITIONS(-DFROST_SUPPORT)
+@@ -405,3 +412,14 @@
+ IF(BUILD_PLUGIN)
+ ADD_SUBDIRECTORY(plugin)
+ ENDIF(BUILD_PLUGIN)
++
++MESSAGE(STATUS "<<< Gentoo configuration >>>
++Build type ${CMAKE_BUILD_TYPE}
++Install path ${CMAKE_INSTALL_PREFIX}
++Compiler flags:
++C ${CMAKE_C_FLAGS}
++C++ ${CMAKE_CXX_FLAGS}
++Linker flags:
++Executable ${CMAKE_EXE_LINKER_FLAGS}
++Module ${CMAKE_MODULE_LINKER_FLAGS}
++Shared ${CMAKE_SHARED_LINKER_FLAGS}\n")
diff --git a/net-p2p/fms/fms-0.3.79.ebuild b/net-p2p/fms/fms-0.3.79.ebuild
new file mode 100644
index 000000000000..2e81e7b377e9
--- /dev/null
+++ b/net-p2p/fms/fms-0.3.79.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils cmake-utils user
+
+DESCRIPTION="A spam-resistant message board application for Freenet"
+HOMEPAGE="http://freenetproject.org/tools.html"
+SRC_URI="mirror://gentoo/${PN}-src-${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="frost"
+
+RDEPEND="virtual/libiconv
+ frost? ( net-libs/mbedtls )
+ >=dev-libs/poco-1.4.3_p1
+ >=dev-db/sqlite-3.6.15"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ enewgroup freenet
+ enewuser freenet -1 -1 /var/freenet freenet
+}
+
+src_prepare() {
+ rm -rv libs
+ edos2unix src/http/pages/showfilepage.cpp
+ epatch "${FILESDIR}"/${PN}-use-system-libs3.patch
+}
+
+src_configure() {
+ local mycmakeargs="-DI_HAVE_READ_THE_README=ON \
+ -DUSE_BUNDLED_SQLITE=OFF \
+ -DDO_CHARSET_CONVERSION=ON \
+ $(cmake-utils_use frost FROST_SUPPORT)"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ insinto /var/freenet/fms
+ dobin "${CMAKE_BUILD_DIR}"/fms || die
+ doins *.htm || die "doinstall failed"
+ doins -r fonts images styles translations || die
+ fperms -R o-rwx /var/freenet/fms/ /usr/bin/fms
+ fowners -R freenet:freenet /var/freenet/fms/ /usr/bin/fms
+ doinitd "${FILESDIR}/fms" || die "installing init.d file failed"
+ dodoc readme.txt || die "installing doc failed"
+}
+
+pkg_postinst() {
+ if ! has_version 'net-p2p/freenet' ; then
+ ewarn "FMS needs a freenet node to up-/download #ssages."
+ ewarn "Please make sure to have a node you can connect to"
+ ewarn "or install net-p2p/freenet to get FMS working."
+ fi
+ elog "By default, the FMS NNTP server will listen on port 1119,"
+ elog "and the web configuration interface will be running at"
+ elog "http://localhost:8080. For more information, read"
+ elog "${ROOT}usr/share/doc/${PF}/readme.txt.bz2"
+ if use frost; then
+ elog " "
+ elog "You need to enable frost on the config page"
+ elog "and restart fms for frost support."
+ fi
+}
diff --git a/net-p2p/fms/metadata.xml b/net-p2p/fms/metadata.xml
new file mode 100644
index 000000000000..2f2a55f2853b
--- /dev/null
+++ b/net-p2p/fms/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tommy@gentoo.org</email>
+ <name>Thomas Sachau (Tommy[D])</name>
+ </maintainer>
+ <use>
+ <flag name="frost">Add support for frost boards</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/freenet/Manifest b/net-p2p/freenet/Manifest
new file mode 100644
index 000000000000..ac79daf8f63e
--- /dev/null
+++ b/net-p2p/freenet/Manifest
@@ -0,0 +1,17 @@
+AUX 0.7.5_p1321-ext.patch 921 SHA256 e115f7b35b741e49ad1124a2aada2c18287ec962211e50bbad0a89e1d2bebd7f SHA512 974998abecb041f8912a7791ec2867445f85108e8c43a567ea5fc0977d220e838789b40a24f2b822aef89f0a8a9a7571e370d93d4bfe89ca3c460cbbf7cc86e1 WHIRLPOOL d6f6a6c6ec3b6e48ffaa6e8b7ca81f049d2bee685a6bd587e3bdd5442a2056b73cad8765454008a19e13502ece749e7e9b0f88f78dba3906b95c3b252ecbb71e
+AUX 0.7.5_p1475-remove-git.patch 926 SHA256 e48e8b9032a7f8e3aed55636598a6db5ea1e16b5f32cd046348317b49736b3b3 SHA512 d24cc1ecd7a991927d8e65378b9dabe1e7e75d8902a40cc6ae7bf19104133e9708da8768ee38230f93fc41609324ae3a9f7f7998ba261c4f4f3254d38ffaa792 WHIRLPOOL 9a5d995ce585d5f87b729011bbd41c4eee0860e18e23afd3a65637103d46a9fbd8b7fa7bf4a200f9eb05df5b66dc113f71036d823da30f1ca41fc21a4bd9bb3a
+AUX freenet 474 SHA256 8973d27668bc38899d1df798985a3abb7f981fd9264a957ff1b1436edc4a2ebc SHA512 8bfaf754106cd5476f96554932d3a394efbfbbdd51d6a62b32259e3c65ef562cf92f0f7fb2a2cb768037312780a990cdd05f758e23c4cc57e7543aaaed85f285 WHIRLPOOL 313ed472f670f88925973c512b0cdd2eebb5ded7b806bc195718da81840ef3724f35399312edce586a01aa788028f1ec988a68b3e7f9720a498d0894525c5128
+AUX freenet-0.7.5_p1474-wrapper.conf 949 SHA256 147d413f6c7aebbe104b6720a431fcfa7d4ecb8b9054173d936130a6a8083a26 SHA512 a6d30afc502176a6e0bab480368553c1df50add8fe18b65cede38be752c989125999cbb8bedfd68641623fd4498e19610c16d02fcf9d951da450a9612301cdeb WHIRLPOOL 0da355278bbf9dc94cfe6ec772f89b574b03b7a495b8a9ada6a9f7f0bca0166a576a5f702857e53522f54e2adfac62ac6f2133a44c3e83e7333b920004e44759
+AUX freenet.service 271 SHA256 eb9e38c169055ba62ccc5e97065a1e7d96b2e639d1ae921a658acd3c98f74c65 SHA512 2f3d4ec0ba05eff328e8176cbe130176a82a1bb432599de44ab78ca27e9c96e0eafe0871f12b0165247f941a2e929635a6abe6cd61351b1305c0d0e8cff83d2b WHIRLPOOL 42be0b1bab59e2b0aecd4dc5e8fd4a29432df4497e88073c235d2ba0761a66850d54da7b01dc36f34712e62fb2f0efd141d0c0116f5267c16a4f69103dde9783
+AUX run.sh-20090501 16217 SHA256 470aa99d083a16d2f620282502a59546611f1903e21aef50b93b10d9fada7d7a SHA512 ba97f1e370ffb7c9ea109b7d529430581a588d8d7e121ec09865e9e8932f2901477f7f43e7d0b95c7c95c2c42db05870e5d811528f91f78b48b68a539c804e67 WHIRLPOOL 201c2541da742ae0c211d6b736914340dd06d4907326de5a0073b39e8aa0a60933ed7d4eef3aa86465f9d0c2e0bf5bd78ed85d3c83c08ba9b50aabc25853864e
+DIST freenet-0.7.5_p1475.zip 5009537 SHA256 21b3c3e95ea094cd137ae081e9b5dff098b9e5c20b37576dc0b1c091b6ee3108 SHA512 96376600fb3ff6d2bd6ede426fd05c684b51a0f2ace1f83696b0f63b2e2acd9359d41558a11d954e54031e88a62afe854f6cab7d852756dff76851f075249369 WHIRLPOOL 59e5b6240f3e34e6032feb1702e03f55fdd0bfa12977e70281cdf626e56863eff66b93c35afa54f9c398a87b4d8ac5254238b33742904ac9ec10f6bdb759228d
+DIST freenet-0.7.5_p1478.zip 5082260 SHA256 543ea64fb3b81777445c69e42d3739eaba3eacd40e06200cdae47106cef75807 SHA512 4147ef68e9c61a7d90c378cd9a3896933c4b931c31caf95107d1e188b4bf51d187381200d262fc1adaf939be7b0ea0eec9f795a09c897c1d20765325ac5faf03 WHIRLPOOL 665e94646471e363e890ff53d29785eb8ec47a3cf1d0c8e6102ac18df957164399155ea38b5623b09dc419d7279d736d12489098342fa2a216f71ce5101ac0dd
+DIST freenet-ant-1.7.1.jar 1327167 SHA256 634e0b616d65d611419920e8b379b7b66399e44f520baa772147ed73743433b1 SHA512 2c84378d995fed0630169fffab020bde89c3edb7b3bc1e14e2251ed71be684dc2520fdeed8bae382de362984e25a31dcd59326ef8735f8066166c1e8d98ca408 WHIRLPOOL 667be2b1581c5fd847907b63522a0f83c595a6b8f1805d714e978a5cb0f05de4804153c89605618adf5c3b097a7019e7d7e9de0bf0987c7b1adb0dbc54e0f055
+DIST seednodes-20150812.fref.bz2 11631 SHA256 bf8a83a2c5cb7c160119d69c657f1db5324794c3603f13acb41416c09728fdc7 SHA512 3aa2ef00ca058b313032243f03f0f82a4e70f455bbe3dee48f9ce438415711f4415172946a3f958e14a699df69d9d0fa88173ce482c0b3d503da0829418b1d3d WHIRLPOOL 724b610d6ebd839a304262645cbf81fb7ea6c5da7b6121e76016d1752dc474fb331e74abe445987f5af94181eacfba832ec23077aa84ba08026bbf831d542a44
+DIST seednodes-20160521.fref.bz2 13751 SHA256 c122851dee2da471d3e286c9fad4d3c94e3d235fd8dc9f27bc99eeff5811f7a8 SHA512 3530ac6bf9de886930bb403c2d2ec27102d5dc6904582ee69987e369dbfaf7170aadbc02b95836ff43fef2531fb06087a494b426662cd5529c87316590fd2686 WHIRLPOOL 3b8bd751983f3cd97677129a6205d1365a3bc95dc4a4a7e7ba539d75c0faf9159b6f03bf2c89e9290a07a2b58641af0e59d227a8b4cfc31e91c9a3ba1c85547d
+EBUILD freenet-0.7.5_p1475-r2.ebuild 4298 SHA256 dcfeeeee55573ac871d52ad1ec0e7a5dafe8447076153650780e111b51a20100 SHA512 4710455e7f12a37f54b367b843f1758450a8e84a266771eb7288f183e347ecfc7424c8dfd0a40f3af0fd2cc0d27a53ebdf43553a7cc84eaeb4898190990d5233 WHIRLPOOL 557595d7f5784cf37864f3bc9153841c8798304768890214061bd7460148b29d6031b25acd296cf7a24ebe7fd0ed134cdfaf8d5fa190532c98b39b631334d4d1
+EBUILD freenet-0.7.5_p1478-r1.ebuild 4240 SHA256 f76a3ff28e24c4f6c54c664f54ed413a4be4f98a66aab1c1d69d4245f7f6ceba SHA512 3329c581704206df82e1a823947a4f64b6a3f347acc3908376e3055ba0bb684e64e70bf521788297def4918a759502e6220df3bfaa4e526dca837544903fad1a WHIRLPOOL 4daa32179d5cf3b5e56940f8e2dd13f30d0482a0d556769ee2711d23c26ea0c26cede9ca498b81c7b3998510a40be598ef847588b694b9ad2bbc682ee3640afd
+EBUILD freenet-0.7.5_p1478.ebuild 4240 SHA256 f76a3ff28e24c4f6c54c664f54ed413a4be4f98a66aab1c1d69d4245f7f6ceba SHA512 3329c581704206df82e1a823947a4f64b6a3f347acc3908376e3055ba0bb684e64e70bf521788297def4918a759502e6220df3bfaa4e526dca837544903fad1a WHIRLPOOL 4daa32179d5cf3b5e56940f8e2dd13f30d0482a0d556769ee2711d23c26ea0c26cede9ca498b81c7b3998510a40be598ef847588b694b9ad2bbc682ee3640afd
+MISC ChangeLog 4180 SHA256 6ad7289c3cbd8122da98535da122b3127424ad7864e5e1c63355331ff9d22112 SHA512 6d23b1ca815c0ffabe97648df2659015c5581562645a64d3164dcac84f1defbc8df5330482d0b7c699bf9ac59e82780f9ea24f09da57dd19d14ca1fad508af09 WHIRLPOOL c7e58b58b35803b56ebb842d92b504c31bd7c890ff0dc385f93ccf46e9f3bb0b2c1c4babcc721e98955a5db1d68aa7cd5634bd72e0ef8e2990314abed44c9e44
+MISC ChangeLog-2015 26408 SHA256 c1a8971659f48f3632987f9837c01659267f5406ba81c780783eddddc8fe04ca SHA512 2b1ed4f73b651a559954d8e08caf4b4ad744dca1c55164eadb3d110dc0fa1218040889161cbaaaa9bfa65ade21bdb714e7bd76ce1a60f0d51e032349b457aefc WHIRLPOOL 73c73155ea356e26dc44091b000c7eefb5a21da4a1cedb8ddf08dfc5bc8d38805577e841f8f2fbede0955427e8bea8dea55b6f1eab7a6067b86b7df353cce181
+MISC metadata.xml 333 SHA256 42f8d69a12c1978cced09950b7b54b526560466d5abf83672462aabbf86e0fca SHA512 73b9b7fc476aba6342a92820a2a4d200735370173f10fd93521daa89c711d9152006dbb00aa1f513558cf0fb7e33ca97f7442ddce4a7bcc58c8a3ec8a08403c8 WHIRLPOOL 35a45af575938790ba47f27a5ff663c09b0583afafb0597775943e4e31aef5f0c526585e331b1e2764c18f769ce7a2429b277976b921276eb28e281e6f098bfd
diff --git a/net-p2p/freenet/files/0.7.5_p1321-ext.patch b/net-p2p/freenet/files/0.7.5_p1321-ext.patch
new file mode 100644
index 000000000000..1d2ba8f140f4
--- /dev/null
+++ b/net-p2p/freenet/files/0.7.5_p1321-ext.patch
@@ -0,0 +1,22 @@
+--- src/freenet/node/NodeStarter.java 2010-11-10 21:46:10.000000000 +0100
++++ src/freenet/node/NodeStarter.java.new 2010-11-10 21:50:12.000000000 +0100
+@@ -49,8 +49,8 @@
+ public static final String extRevisionNumber;
+
+ static {
+- extBuildNumber = ExtVersion.extBuildNumber();
+- extRevisionNumber = ExtVersion.extRevisionNumber();
++ extBuildNumber = 29;
++ extRevisionNumber = "";
+ }
+
+ private FreenetFilePersistentConfig cfg;
+@@ -86,7 +86,7 @@
+ return Integer.valueOf(-1);
+ }
+
+- String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + ExtVersion.buildNumber + " r" + ExtVersion.cvsRevision+" running with ext build "+extBuildNumber+" r" + extRevisionNumber;
++ String builtWithMessage = "freenet.jar built with freenet-ext.jar Build #" + extBuildNumber + " running with ext build "+extBuildNumber;
+ Logger.normal(this, builtWithMessage);
+ System.out.println(builtWithMessage);
+
diff --git a/net-p2p/freenet/files/0.7.5_p1475-remove-git.patch b/net-p2p/freenet/files/0.7.5_p1475-remove-git.patch
new file mode 100644
index 000000000000..5cebf6e948ef
--- /dev/null
+++ b/net-p2p/freenet/files/0.7.5_p1475-remove-git.patch
@@ -0,0 +1,24 @@
+diff -Naur a/build-clean.xml b/build-clean.xml
+--- a/build-clean.xml 2016-10-10 18:26:04.056935377 +0200
++++ b/build-clean.xml 2016-10-10 18:47:11.662036536 +0200
+@@ -59,18 +59,8 @@
+ <assertions><enable/></assertions>
+
+ <!-- set version string based on git-describe -->
+- <exec executable="git" failifexecutionfails="false"
+- errorProperty="git.errror" outputproperty="git.describe" resultproperty="git.result">
+- <arg value="describe" />
+- <arg value="--always" />
+- <arg value="--abbrev=4" />
+- <arg value="--dirty" />
+- </exec>
+- <condition property="git.revision" value="${git.describe}" else="@unknown@">
+- <and>
+- <equals arg1="${git.result}" arg2="0" />
+- <isset property="git.describe" />
+- </and>
++ <condition property="git.revision" value="@unknown@" else="@unknown@">
++ <isset property="git.describe" />
+ </condition>
+
+ <!-- =================================================================== -->
diff --git a/net-p2p/freenet/files/freenet b/net-p2p/freenet/files/freenet
new file mode 100644
index 000000000000..cfbfa767732e
--- /dev/null
+++ b/net-p2p/freenet/files/freenet
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ start-stop-daemon --start --user freenet --exec /bin/sh /var/freenet/run.sh start 2>/dev/null
+ eend 0
+}
+
+status() {
+ start-stop-daemon --start --user freenet --exec /bin/sh /var/freenet/run.sh status 2>/dev/null
+ eend 0
+}
+
+stop() {
+ start-stop-daemon --start --user freenet --exec /bin/sh /var/freenet/run.sh stop 2>/dev/null
+ eend 0
+}
diff --git a/net-p2p/freenet/files/freenet-0.7.5_p1474-wrapper.conf b/net-p2p/freenet/files/freenet-0.7.5_p1474-wrapper.conf
new file mode 100644
index 000000000000..7ec6cd01bcad
--- /dev/null
+++ b/net-p2p/freenet/files/freenet-0.7.5_p1474-wrapper.conf
@@ -0,0 +1,27 @@
+wrapper.java.command=java
+wrapper.working.dir=/var/freenet/
+wrapper.java.mainclass=freenet.node.NodeStarter
+wrapper.java.library.path.1=/usr/lib
+wrapper.java.initmemory=60
+wrapper.java.maxmemory=1024
+wrapper.java.additional.1=-Dnetworkaddress.cache.ttl=0
+wrapper.java.additional.2=-Dnetworkaddress.cache.negative.ttl=0
+wrapper.java.additional.3=-enableassertions:freenet
+# You might want to set the following line if you have changed java.maxmemory
+wrapper.java.additional.4=-XX:MaxPermSize=1024M
+
+wrapper.app.parameter.1=freenet.ini
+wrapper.console.format=PM
+wrapper.console.loglevel=INFO
+wrapper.logfile=wrapper.log
+wrapper.logfile.format=LPTM
+wrapper.logfile.loglevel=INFO
+wrapper.logfile.maxsize=2M
+wrapper.logfile.maxfiles=3
+wrapper.syslog.loglevel=NONE
+wrapper.console.title=Freenet 0.7
+wrapper.jvm_exit.timeout=120
+wrapper.restart.reload_configuration=TRUE
+wrapper.filter.trigger.1=java.lang.OutOfMemoryError
+wrapper.filter.action.1=RESTART
+
diff --git a/net-p2p/freenet/files/freenet.service b/net-p2p/freenet/files/freenet.service
new file mode 100644
index 000000000000..17df1373dc34
--- /dev/null
+++ b/net-p2p/freenet/files/freenet.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=An encrypted network without censorship and monitoring.
+After=network.target
+
+[Service]
+User=freenet
+Type=forking
+ExecStart=/var/freenet/run.sh start
+ExecStop=/var/freenet/run.sh stop
+WorkingDirectory=/var/freenet
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/freenet/files/run.sh-20090501 b/net-p2p/freenet/files/run.sh-20090501
new file mode 100644
index 000000000000..3f9723ff3e76
--- /dev/null
+++ b/net-p2p/freenet/files/run.sh-20090501
@@ -0,0 +1,585 @@
+#! /bin/sh
+
+#
+# Copyright (c) 1999, 2006 Tanuki Software Inc.
+#
+# Java Service Wrapper sh script. Suitable for starting and stopping
+# wrapped Java applications on UNIX platforms.
+#
+
+#-----------------------------------------------------------------------------
+# These settings can be modified to fit the needs of your application
+
+# Application
+APP_NAME="Freenet"
+APP_LONG_NAME="Freenet 0.7"
+
+# Wrapper
+WRAPPER_CMD="/usr/bin/wrapper"
+WRAPPER_CONF="/etc/freenet-wrapper.conf"
+
+# Priority at which to run the wrapper. See "man nice" for valid priorities.
+# nice is only used if a priority is specified.
+
+# Note that Freenet will scale its usage within the specifed niceness, some
+# threads will have a lower priority (higher nice value) than this. Also please
+# don't renice Freenet once it's started.
+PRIORITY=10
+
+# Location of the pid file.
+PIDDIR="/var/freenet/"
+
+# If uncommented, causes the Wrapper to be shutdown using an anchor file.
+# When launched with the 'start' command, it will also ignore all INT and
+# TERM signals.
+IGNORE_SIGNALS=true
+
+# If specified, the Wrapper will be run as the specified user.
+# IMPORTANT - Make sure that the user has the required privileges to write
+# the PID file and wrapper.log files. Failure to be able to write the log
+# file will cause the Wrapper to exit without any way to write out an error
+# message.
+# NOTE - This will set the user which is used to run the Wrapper as well as
+# the JVM and is not useful in situations where a privileged resource or
+# port needs to be allocated prior to the user being changed.
+RUN_AS_USER=freenet
+
+# The following two lines are used by the chkconfig command. Change as is
+# appropriate for your application. They should remain commented.
+# chkconfig: 2345 20 80
+# description: @app.long.name@
+
+# Do not modify anything beyond this point
+#-----------------------------------------------------------------------------
+
+if [ "X`id -u`" = "X0" -a -z "$RUN_AS_USER" ]
+then
+ echo "Do not run this script as root."
+ exit 1
+fi
+
+# and get java implementation too, Sun JDK or Kaffe
+JAVA_IMPL=`java -version 2>&1 | head -n 1 | cut -f1 -d' '`
+
+# sun specific options
+LDPROP=""
+#if [ "$JAVA_IMPL" = "java" ]
+#then
+# echo Sun java detected.
+# # Tell it not to use NPTL.
+# # BAD THINGS happen if it uses NPTL.
+# # Specifically, at least on 1.4.1. and 1.5.0b2, we get hangs
+# # where many threads are stuck waiting for a lock to be
+# # unlocked but no thread owns it.
+#
+# ## won't work on libc2.4 ... let's hope it's fixed
+# if [[ -z "$(/lib/libc.so.6 | head -n 1 | grep 'release version 2.4')" ]]
+# then
+# if [[ -d /lib/tls ]]
+# then
+# LDPROP="set.LD_ASSUME_KERNEL=2.4.1"
+# fi
+# fi
+#fi
+
+
+# Get the fully qualified path to the script
+case $0 in
+ /*)
+ SCRIPT="$0"
+ ;;
+ *)
+ PWD=`pwd`
+ SCRIPT="$PWD/$0"
+ ;;
+esac
+
+# Resolve the true real path without any sym links.
+CHANGED=true
+while [ "X$CHANGED" != "X" ]
+do
+ # Change spaces to ":" so the tokens can be parsed.
+ SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
+ # Get the real path to this script, resolving any symbolic links
+ TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
+ REALPATH=
+ for C in $TOKENS; do
+ REALPATH="$REALPATH/$C"
+ while [ -h "$REALPATH" ] ; do
+ LS="`ls -ld "$REALPATH"`"
+ LINK="`expr "$LS" : '.*-> \(.*\)$'`"
+ if expr "$LINK" : '/.*' > /dev/null; then
+ REALPATH="$LINK"
+ else
+ REALPATH="`dirname "$REALPATH"`""/$LINK"
+ fi
+ done
+ done
+
+ # Change ":" chars back to spaces.
+ REALPATH="`echo $REALPATH | sed -e 's;:; ;g'`"
+ SCRIPT="`echo $SCRIPT | sed -e 's;:; ;g'`"
+
+ if [ "$REALPATH" = "$SCRIPT" ]
+ then
+ CHANGED=""
+ else
+ SCRIPT="$REALPATH"
+ fi
+done
+
+# Change the current directory to the location of the script
+cd "`dirname \"$REALPATH\"`"
+REALDIR="`pwd`"
+# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if
+# the working directory is later changed.
+FIRST_CHAR="`echo $PIDDIR | cut -c1,1`"
+if [ "$FIRST_CHAR" != "/" ]
+then
+ PIDDIR="$REALDIR/$PIDDIR"
+fi
+# Same test for WRAPPER_CMD
+FIRST_CHAR="`echo $WRAPPER_CMD | cut -c1,1`"
+if [ "$FIRST_CHAR" != "/" ]
+then
+ WRAPPER_CMD="$REALDIR/$WRAPPER_CMD"
+fi
+# Same test for WRAPPER_CONF
+FIRST_CHAR="`echo $WRAPPER_CONF | cut -c1,1`"
+if [ "$FIRST_CHAR" != "/" ]
+then
+ WRAPPER_CONF="$REALDIR/$WRAPPER_CONF"
+fi
+
+# Process ID
+ANCHORFILE="$PIDDIR/$APP_NAME.anchor"
+PIDFILE="$PIDDIR/$APP_NAME.pid"
+LOCKDIR="$REALDIR"
+LOCKFILE="$LOCKDIR/$APP_NAME"
+pid=""
+
+# Resolve the os
+DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]`
+case "$DIST_OS" in
+ 'sunos')
+ DIST_OS="solaris"
+ ;;
+ 'hp-ux' | 'hp-ux64')
+ DIST_OS="hpux"
+ ;;
+ 'darwin' | 'oarwin')
+ DIST_OS="macosx"
+
+ #We use the 1.5 jvm if it exists
+ if [ -d /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ ]
+ then
+ export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
+ fi
+ ;;
+ 'unix_sv')
+ DIST_OS="unixware"
+ ;;
+esac
+
+# Resolve the architecture
+DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
+case "$DIST_ARCH" in
+ 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64')
+ DIST_ARCH="x86"
+ ;;
+ 'ip27' | 'mips')
+ DIST_ARCH="mips"
+ ;;
+ 'power' | 'powerpc' | 'power_pc' | 'ppc64')
+ DIST_ARCH="ppc"
+ ;;
+ 'pa_risc' | 'pa-risc')
+ DIST_ARCH="parisc"
+ ;;
+ 'sun4u' | 'sparcv9')
+ DIST_ARCH="sparc"
+ ;;
+ '9000/800')
+ DIST_ARCH="parisc"
+ ;;
+esac
+
+# Check if we are running on 64bit platform, seems like a workaround for now...
+DIST_BIT=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]`
+case "$DIST_BIT" in
+ 'amd64' | 'ia64' | 'x86_64' | 'ppc64')
+ DIST_BIT="64"
+ ;;
+# 'pa_risc' | 'pa-risc') # Are some of these 64bit? Least not all...
+# BIT="64"
+# ;;
+ 'sun4u' | 'sparcv9') # Are all sparcs 64?
+ DIST_BIT="64"
+ ;;
+# '9000/800')
+# DIST_BIT="64"
+# ;;
+ *) # In any other case default to 32
+ DIST_BIT="32"
+ ;;
+esac
+
+# Decide on the wrapper binary to use.
+# 64bit wrapper by default on 64bit platforms, because
+# they might not have 32bit emulation libs installed.
+# For macosx, we also want to look for universal binaries.
+
+WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-$DIST_BIT"
+
+if [ -x "$WRAPPER_TEST_CMD" ]
+then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+else
+ if [ "$DIST_OS" = "macosx" ] # Some osx weirdness, someone please check that this still works
+ then
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-$DIST_BIT"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-$DIST_BIT"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-$DIST_BIT"
+ if [ -x "$WRAPPER_TEST_CMD" ]
+ then
+ WRAPPER_CMD="$WRAPPER_TEST_CMD"
+ else
+ if [ ! -x "$WRAPPER_CMD" ]
+ then
+ echo "Unable to locate any of the following binaries:"
+ echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-$DIST_BIT"
+ echo " $WRAPPER_CMD-$DIST_OS-universal-$DIST_BIT"
+ echo " $WRAPPER_CMD"
+ #
+ # We need -Djava.net.preferIPv4Stack=true on FreeBSD, otherwise recent jvms thow an IllegalArgumentException when we create the socket
+ #
+ NO_WRAPPER="java -Djava.net.preferIPv4Stack=true -cp freenet-ext.jar:freenet.jar freenet.node.NodeStarter"
+ fi
+ fi
+ fi
+ fi
+ else
+ if [ ! -x "$WRAPPER_CMD" ]
+ then
+ echo "Unable to locate any of the following binaries:"
+ echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-$DIST_BIT"
+ echo " $WRAPPER_CMD"
+ NO_WRAPPER="java -cp freenet-ext.jar:freenet.jar freenet.node.NodeStarter"
+ fi
+ fi
+fi
+
+# Build the nice clause
+if [ "X$PRIORITY" = "X" ]
+then
+ CMDNICE=""
+else
+ CMDNICE="nice -$PRIORITY"
+fi
+
+# Build the anchor file clause.
+if [ "X$IGNORE_SIGNALS" = "X" ]
+then
+ ANCHORPROP=
+ IGNOREPROP=
+else
+ ANCHORPROP=wrapper.anchorfile=\"$ANCHORFILE\"
+ IGNOREPROP=wrapper.ignore_signals=TRUE
+fi
+
+# Build the lock file clause. Only create a lock file if the lock directory exists on this platform.
+if [ -d "$LOCKDIR" ]
+then
+ LOCKPROP=wrapper.lockfile=\"$LOCKFILE\"
+else
+ LOCKPROP=
+fi
+
+checkUser() {
+ # Check the configured user. If necessary rerun this script as the desired user.
+ if [ "X$RUN_AS_USER" != "X" ]
+ then
+ # Resolve the location of the 'id' command
+ IDEXE="/usr/xpg4/bin/id"
+ if [ ! -x $IDEXE ]
+ then
+ IDEXE="/usr/bin/id"
+ if [ ! -x $IDEXE ]
+ then
+ echo "Unable to locate 'id'."
+ echo "Please report this message along with the location of the command on your system."
+ exit 1
+ fi
+ fi
+
+ if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ]
+ then
+ # Already running as the configured user. Avoid password prompts by not calling su.
+ RUN_AS_USER=""
+ fi
+ fi
+ if [ "X$RUN_AS_USER" != "X" ]
+ then
+ # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be
+ # able to create the lock file. The Wrapper will be able to update this file once it
+ # is created but will not be able to delete it on shutdown. If $2 is defined then
+ # the lock file should be created for the current command
+ if [ "X$LOCKPROP" != "X" ]
+ then
+ if [ "X$2" != "X" ]
+ then
+ # Resolve the primary group
+ RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1`
+ if [ "X$RUN_AS_GROUP" = "X" ]
+ then
+ RUN_AS_GROUP=$RUN_AS_USER
+ fi
+ touch "$LOCKFILE"
+ chown $RUN_AS_USER:$RUN_AS_GROUP "$LOCKFILE"
+ fi
+ fi
+
+ # Still want to change users, recurse. This means that the user will only be
+ # prompted for a password once.
+ su -m $RUN_AS_USER -c "$REALPATH $1"
+
+ # Now that we are the original user again, we may need to clean up the lock file.
+ if [ "X$LOCKPROP" != "X" ]
+ then
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ # Wrapper is not running so make sure the lock file is deleted.
+ if [ -f "$LOCKFILE" ]
+ then
+ rm "$LOCKFILE"
+ fi
+ fi
+ fi
+
+ exit 0
+ fi
+}
+
+getpid() {
+ if [ -f "$PIDFILE" ]
+ then
+ if [ -r "$PIDFILE" ]
+ then
+ pid="`cat \"$PIDFILE\"`"
+ if [ "X$pid" != "X" ]
+ then
+ # It is possible that 'a' process with the pid exists but that it is not the
+ # correct process. This can happen in a number of cases, but the most
+ # common is during system startup after an unclean shutdown.
+ # So make sure the process is one of "ours" -- that we can send
+ # a signal to it. (We don't use ps(1) because that's neither
+ # safe nor portable.
+ if ! kill -0 $pid 2>/dev/null
+ then
+ # This is a stale pid file.
+ rm -f "$PIDFILE"
+ echo "Removed stale pid file: $PIDFILE"
+ pid=""
+ fi
+ # Sometimes the pid exists and it's ours!
+ if ! test -f /proc/$pid/cwd/Freenet.pid
+ then
+ # This is a stale pid file.
+ rm -f "$PIDFILE"
+ echo "Removed stale pid file2: $PIDFILE"
+ pid=""
+
+ fi
+ fi
+ else
+ echo "Cannot read $PIDFILE."
+ exit 1
+ fi
+ fi
+}
+
+testpid() {
+ if ! kill -0 $pid 2>/dev/null
+ then
+ # Process is gone so remove the pid file.
+ rm -f "$PIDFILE"
+ pid=""
+ fi
+}
+
+console() {
+ echo "Running $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" $LDPROP $ANCHORPROP $LOCKPROP"
+ eval $COMMAND_LINE
+ else
+ echo "$APP_LONG_NAME is already running."
+ exit 1
+ fi
+}
+
+start() {
+ echo "Starting $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ if [ "$NO_WRAPPER" ] # Check if we don't have usable wrapper, and run without it
+ then
+ echo ""
+ echo "Let's start the node without the wrapper, you'll have to daemonize it yourself."
+ eval $NO_WRAPPER
+ else # Otherwise use the wrapper
+ COMMAND_LINE="$CMDNICE \"$WRAPPER_CMD\" \"$WRAPPER_CONF\" wrapper.syslog.ident=\"$APP_NAME\" wrapper.pidfile=\"$PIDFILE\" $LDPROP wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP"
+ eval $COMMAND_LINE
+ fi
+ else
+ echo "$APP_LONG_NAME is already running."
+ exit 1
+ fi
+}
+
+stopit() {
+ echo "Stopping $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME was not running."
+ else
+ if [ "X$IGNORE_SIGNALS" = "X" ]
+ then
+ # Running so try to stop it.
+ kill $pid
+ if [ $? -ne 0 ]
+ then
+ # An explanation for the failure should have been given
+ echo "Unable to stop $APP_LONG_NAME."
+ exit 1
+ fi
+ else
+ rm -f "$ANCHORFILE"
+ if [ -f "$ANCHORFILE" ]
+ then
+ # An explanation for the failure should have been given
+ echo "Unable to stop $APP_LONG_NAME."
+ exit 1
+ fi
+ fi
+
+ # We can not predict how long it will take for the wrapper to
+ # actually stop as it depends on settings in wrapper.conf.
+ # Loop until it does.
+ savepid=$pid
+ CNT=0
+ TOTCNT=0
+ while [ "X$pid" != "X" ]
+ do
+ # Show a waiting message every 5 seconds.
+ if [ "$CNT" -lt "5" ]
+ then
+ CNT=`expr $CNT + 1`
+ else
+ echo "Waiting for $APP_LONG_NAME to exit..."
+ CNT=0
+ fi
+ TOTCNT=`expr $TOTCNT + 1`
+
+ sleep 1
+
+ testpid
+ done
+
+ pid=$savepid
+ testpid
+ if [ "X$pid" != "X" ]
+ then
+ echo "Failed to stop $APP_LONG_NAME."
+ exit 1
+ else
+ echo "Stopped $APP_LONG_NAME."
+ fi
+ fi
+}
+
+status() {
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME is not running."
+ exit 1
+ else
+ echo "$APP_LONG_NAME is running ($pid)."
+ exit 0
+ fi
+}
+
+dump() {
+ echo "Dumping $APP_LONG_NAME..."
+ getpid
+ if [ "X$pid" = "X" ]
+ then
+ echo "$APP_LONG_NAME was not running."
+
+ else
+ kill -QUIT $pid
+
+ if [ $? -ne 0 ]
+ then
+ echo "Failed to dump $APP_LONG_NAME."
+ exit 1
+ else
+ echo "Dumped $APP_LONG_NAME."
+ fi
+ fi
+}
+
+case "$1" in
+
+ 'console')
+ checkUser $1 touchlock
+ console
+ ;;
+
+ 'start')
+ checkUser $1 touchlock
+ start
+ ;;
+
+ 'stop')
+ checkUser $1
+ stopit
+ ;;
+
+ 'restart')
+ checkUser $1 touchlock
+ stopit
+ start
+ ;;
+
+ 'status')
+ checkUser $1
+ status
+ ;;
+
+ 'dump')
+ checkUser $1
+ dump
+ ;;
+
+ *)
+ echo "Usage: $0 { console | start | stop | restart | status | dump }"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/net-p2p/freenet/freenet-0.7.5_p1475-r2.ebuild b/net-p2p/freenet/freenet-0.7.5_p1475-r2.ebuild
new file mode 100644
index 000000000000..46fb1bb9cdc3
--- /dev/null
+++ b/net-p2p/freenet/freenet-0.7.5_p1475-r2.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DATE=20150812
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2 multilib systemd user
+
+DESCRIPTION="An encrypted network without censorship"
+HOMEPAGE="https://freenetproject.org/"
+SRC_URI="
+ https://github.com/${PN}/fred/archive/build0${PV#*p}.zip -> ${P}.zip
+ mirror://gentoo/seednodes-${DATE}.fref.bz2
+ mirror://gentoo/freenet-ant-1.7.1.jar"
+
+LICENSE="GPL-2+ GPL-2 MIT BSD-2 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="dev-java/bcprov:1.54
+ dev-java/commons-compress:0
+ dev-java/fec:0
+ dev-java/java-service-wrapper:0
+ dev-java/jbitcollider-core:0
+ dev-java/lzma:0
+ dev-java/lzmajio:0
+ dev-java/mersennetwister:0"
+
+DEPEND="
+ app-arch/unzip
+ >=virtual/jdk-1.7
+ ${CDEPEND}
+ test? (
+ dev-java/junit:0
+ dev-java/ant-junit:0
+ )
+ dev-java/ant-core:0"
+
+RDEPEND="
+ >=virtual/jre-1.7
+ net-libs/nativebiginteger:0
+ ${CDEPEND}"
+
+PDEPEND="net-libs/NativeThread:0"
+
+JAVA_PKG_BSFIX_NAME+=" build-clean.xml"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
+JAVA_ANT_ENCODING="utf8"
+
+EANT_BUILD_TARGET="package"
+EANT_TEST_TARGET="unit"
+EANT_BUILD_XML="build-clean.xml"
+EANT_GENTOO_CLASSPATH="bcprov-1.54,commons-compress,fec,java-service-wrapper,jbitcollider-core,lzma,lzmajio,mersennetwister"
+EANT_EXTRA_ARGS="-Dsuppress.gjs=true -Dlib.contrib.present=true -Dlib.bouncycastle.present=true -Dlib.junit.present=true -Dtest.skip=true"
+
+S="${WORKDIR}/fred-build0${PV#*p}"
+
+RESTRICT="test" # they're broken in the last release.
+
+MY_PATCHES=(
+ "${FILESDIR}"/0.7.5_p1321-ext.patch
+ "${FILESDIR}/${PV}-remove-git.patch"
+)
+
+pkg_setup() {
+ has_version dev-java/icedtea[cacao] && {
+ ewarn "dev-java/icedtea was built with cacao USE flag."
+ ewarn "freenet may compile with it, but it will refuse to run."
+ ewarn "Please remerge dev-java/icedtea without cacao USE flag,"
+ ewarn "if you plan to use it for running freenet."
+ }
+ java-pkg-2_pkg_setup
+ enewgroup freenet
+ enewuser freenet -1 -1 /var/freenet freenet
+}
+
+src_unpack() {
+ unpack ${P}.zip seednodes-${DATE}.fref.bz2
+
+ # See 603362.
+ # mv "${WORKDIR}"/freenet-fred-* "${S}" || die
+}
+
+java_prepare() {
+ cp "${FILESDIR}"/freenet-0.7.5_p1474-wrapper.conf freenet-wrapper.conf || die
+ cp "${FILESDIR}"/run.sh-20090501 run.sh || die
+
+ epatch "${MY_PATCHES[@]}"
+
+ sed -i -e "s:=/usr/lib:=/usr/$(get_libdir):g" \
+ freenet-wrapper.conf || die "sed failed"
+
+ echo "wrapper.java.classpath.1=/usr/share/freenet/lib/freenet.jar" >> freenet-wrapper.conf || die
+
+ local i=2 pkg jars jar
+ local ifs_original=${IFS}
+ IFS=","
+ for pkg in ${EANT_GENTOO_CLASSPATH} ; do
+ jars="$(java-pkg_getjars ${pkg})"
+ for jar in ${jars} ; do
+ echo "wrapper.java.classpath.$((i++))=${jar}" >> freenet-wrapper.conf || die
+ done
+ done
+ IFS=${ifs_original}
+ echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf || die
+
+ cp "${DISTDIR}"/freenet-ant-1.7.1.jar lib/ant.jar || die
+}
+
+EANT_TEST_EXTRA_ARGS="-Dtest.skip=false"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar dist/freenet.jar
+ java-pkg_newjar "${DISTDIR}"/freenet-ant-1.7.1.jar ant.jar
+
+ if has_version =sys-apps/baselayout-2*; then
+ doinitd "${FILESDIR}"/freenet
+ else
+ newinitd "${FILESDIR}"/freenet.old freenet
+ fi
+
+ systemd_dounit "${FILESDIR}"/freenet.service
+
+ dodoc AUTHORS
+ newdoc README.md README
+ insinto /etc
+ doins freenet-wrapper.conf
+ insinto /var/freenet
+ doins run.sh
+ newins "${WORKDIR}"/seednodes-${DATE}.fref seednodes.fref
+ fperms +x /var/freenet/run.sh
+ dosym java-service-wrapper/libwrapper.so /usr/$(get_libdir)/libwrapper.so
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src
+}
+
+pkg_postinst() {
+ elog " "
+ elog "1. Start freenet with /etc/init.d/freenet start."
+ elog "2. Open localhost:8888 in your browser for the web interface."
+ #workaround for previously existing freenet user
+ [[ $(stat --format="%U" /var/freenet) == "freenet" ]] || chown \
+ freenet:freenet /var/freenet
+}
+
+pkg_postrm() {
+ if ! [[ -e /usr/share/freenet/lib/freenet.jar ]] ; then
+ elog " "
+ elog "If you dont want to use freenet any more"
+ elog "and dont want to keep your identity/other stuff"
+ elog "remember to do 'rm -rf /var/freenet' to remove everything"
+ fi
+}
diff --git a/net-p2p/freenet/freenet-0.7.5_p1478-r1.ebuild b/net-p2p/freenet/freenet-0.7.5_p1478-r1.ebuild
new file mode 100644
index 000000000000..d37f8db162eb
--- /dev/null
+++ b/net-p2p/freenet/freenet-0.7.5_p1478-r1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DATE=20160521
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2 multilib systemd user
+
+DESCRIPTION="An encrypted network without censorship"
+HOMEPAGE="https://freenetproject.org/"
+SRC_URI="
+ https://github.com/${PN}/fred/archive/build0${PV#*p}.zip -> ${P}.zip
+ mirror://gentoo/seednodes-${DATE}.fref.bz2
+ mirror://gentoo/freenet-ant-1.7.1.jar"
+
+LICENSE="GPL-2+ GPL-2 MIT BSD-2 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="dev-java/bcprov:1.54
+ dev-java/commons-compress:0
+ dev-java/fec:0
+ dev-java/java-service-wrapper:0
+ dev-java/jbitcollider-core:0
+ dev-java/lzma:0
+ dev-java/lzmajio:0
+ dev-java/mersennetwister:0"
+
+DEPEND="
+ app-arch/unzip
+ >=virtual/jdk-1.7
+ ${CDEPEND}
+ test? (
+ dev-java/junit:0
+ dev-java/ant-junit:0
+ )
+ dev-java/ant-core:0"
+
+RDEPEND="
+ >=virtual/jre-1.7
+ net-libs/nativebiginteger:0
+ ${CDEPEND}"
+
+PDEPEND="net-libs/NativeThread:0"
+
+JAVA_PKG_BSFIX_NAME+=" build-clean.xml"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
+JAVA_ANT_ENCODING="utf8"
+
+EANT_BUILD_TARGET="package"
+EANT_TEST_TARGET="unit"
+EANT_BUILD_XML="build-clean.xml"
+EANT_GENTOO_CLASSPATH="bcprov-1.54,commons-compress,fec,java-service-wrapper,jbitcollider-core,lzma,lzmajio,mersennetwister"
+EANT_EXTRA_ARGS="-Dsuppress.gjs=true -Dlib.contrib.present=true -Dlib.bouncycastle.present=true -Dlib.junit.present=true -Dtest.skip=true"
+
+S="${WORKDIR}/fred-build0${PV#*p}"
+
+RESTRICT="test" # they're broken in the last release.
+
+MY_PATCHES=(
+ "${FILESDIR}"/0.7.5_p1321-ext.patch
+ "${FILESDIR}/"0.7.5_p1475-remove-git.patch
+)
+
+pkg_setup() {
+ has_version dev-java/icedtea[cacao] && {
+ ewarn "dev-java/icedtea was built with cacao USE flag."
+ ewarn "freenet may compile with it, but it will refuse to run."
+ ewarn "Please remerge dev-java/icedtea without cacao USE flag,"
+ ewarn "if you plan to use it for running freenet."
+ }
+ java-pkg-2_pkg_setup
+ enewgroup freenet
+ enewuser freenet -1 -1 /var/freenet freenet
+}
+
+src_unpack() {
+ unpack ${P}.zip seednodes-${DATE}.fref.bz2
+}
+
+java_prepare() {
+ cp "${FILESDIR}"/freenet-0.7.5_p1474-wrapper.conf freenet-wrapper.conf || die
+ cp "${FILESDIR}"/run.sh-20090501 run.sh || die
+
+ epatch "${MY_PATCHES[@]}"
+
+ sed -i -e "s:=/usr/lib:=/usr/$(get_libdir):g" \
+ freenet-wrapper.conf || die "sed failed"
+
+ echo "wrapper.java.classpath.1=/usr/share/freenet/lib/freenet.jar" >> freenet-wrapper.conf || die
+
+ local i=2 pkg jars jar
+ local ifs_original=${IFS}
+ IFS=","
+ for pkg in ${EANT_GENTOO_CLASSPATH} ; do
+ jars="$(java-pkg_getjars ${pkg})"
+ for jar in ${jars} ; do
+ echo "wrapper.java.classpath.$((i++))=${jar}" >> freenet-wrapper.conf || die
+ done
+ done
+ IFS=${ifs_original}
+ echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf || die
+
+ cp "${DISTDIR}"/freenet-ant-1.7.1.jar lib/ant.jar || die
+}
+
+EANT_TEST_EXTRA_ARGS="-Dtest.skip=false"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar dist/freenet.jar
+ java-pkg_newjar "${DISTDIR}"/freenet-ant-1.7.1.jar ant.jar
+
+ if has_version =sys-apps/baselayout-2*; then
+ doinitd "${FILESDIR}"/freenet
+ else
+ newinitd "${FILESDIR}"/freenet.old freenet
+ fi
+
+ systemd_dounit "${FILESDIR}"/freenet.service
+
+ dodoc AUTHORS
+ newdoc README.md README
+ insinto /etc
+ doins freenet-wrapper.conf
+ insinto /var/freenet
+ doins run.sh
+ newins "${WORKDIR}"/seednodes-${DATE}.fref seednodes.fref
+ fperms +x /var/freenet/run.sh
+ dosym java-service-wrapper/libwrapper.so /usr/$(get_libdir)/libwrapper.so
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src
+}
+
+pkg_postinst() {
+ elog " "
+ elog "1. Start freenet with /etc/init.d/freenet start."
+ elog "2. Open localhost:8888 in your browser for the web interface."
+ #workaround for previously existing freenet user
+ [[ $(stat --format="%U" /var/freenet) == "freenet" ]] || chown \
+ freenet:freenet /var/freenet
+}
+
+pkg_postrm() {
+ if ! [[ -e /usr/share/freenet/lib/freenet.jar ]] ; then
+ elog " "
+ elog "If you dont want to use freenet any more"
+ elog "and dont want to keep your identity/other stuff"
+ elog "remember to do 'rm -rf /var/freenet' to remove everything"
+ fi
+}
diff --git a/net-p2p/freenet/freenet-0.7.5_p1478.ebuild b/net-p2p/freenet/freenet-0.7.5_p1478.ebuild
new file mode 100644
index 000000000000..d37f8db162eb
--- /dev/null
+++ b/net-p2p/freenet/freenet-0.7.5_p1478.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DATE=20160521
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2 multilib systemd user
+
+DESCRIPTION="An encrypted network without censorship"
+HOMEPAGE="https://freenetproject.org/"
+SRC_URI="
+ https://github.com/${PN}/fred/archive/build0${PV#*p}.zip -> ${P}.zip
+ mirror://gentoo/seednodes-${DATE}.fref.bz2
+ mirror://gentoo/freenet-ant-1.7.1.jar"
+
+LICENSE="GPL-2+ GPL-2 MIT BSD-2 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="dev-java/bcprov:1.54
+ dev-java/commons-compress:0
+ dev-java/fec:0
+ dev-java/java-service-wrapper:0
+ dev-java/jbitcollider-core:0
+ dev-java/lzma:0
+ dev-java/lzmajio:0
+ dev-java/mersennetwister:0"
+
+DEPEND="
+ app-arch/unzip
+ >=virtual/jdk-1.7
+ ${CDEPEND}
+ test? (
+ dev-java/junit:0
+ dev-java/ant-junit:0
+ )
+ dev-java/ant-core:0"
+
+RDEPEND="
+ >=virtual/jre-1.7
+ net-libs/nativebiginteger:0
+ ${CDEPEND}"
+
+PDEPEND="net-libs/NativeThread:0"
+
+JAVA_PKG_BSFIX_NAME+=" build-clean.xml"
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
+JAVA_ANT_ENCODING="utf8"
+
+EANT_BUILD_TARGET="package"
+EANT_TEST_TARGET="unit"
+EANT_BUILD_XML="build-clean.xml"
+EANT_GENTOO_CLASSPATH="bcprov-1.54,commons-compress,fec,java-service-wrapper,jbitcollider-core,lzma,lzmajio,mersennetwister"
+EANT_EXTRA_ARGS="-Dsuppress.gjs=true -Dlib.contrib.present=true -Dlib.bouncycastle.present=true -Dlib.junit.present=true -Dtest.skip=true"
+
+S="${WORKDIR}/fred-build0${PV#*p}"
+
+RESTRICT="test" # they're broken in the last release.
+
+MY_PATCHES=(
+ "${FILESDIR}"/0.7.5_p1321-ext.patch
+ "${FILESDIR}/"0.7.5_p1475-remove-git.patch
+)
+
+pkg_setup() {
+ has_version dev-java/icedtea[cacao] && {
+ ewarn "dev-java/icedtea was built with cacao USE flag."
+ ewarn "freenet may compile with it, but it will refuse to run."
+ ewarn "Please remerge dev-java/icedtea without cacao USE flag,"
+ ewarn "if you plan to use it for running freenet."
+ }
+ java-pkg-2_pkg_setup
+ enewgroup freenet
+ enewuser freenet -1 -1 /var/freenet freenet
+}
+
+src_unpack() {
+ unpack ${P}.zip seednodes-${DATE}.fref.bz2
+}
+
+java_prepare() {
+ cp "${FILESDIR}"/freenet-0.7.5_p1474-wrapper.conf freenet-wrapper.conf || die
+ cp "${FILESDIR}"/run.sh-20090501 run.sh || die
+
+ epatch "${MY_PATCHES[@]}"
+
+ sed -i -e "s:=/usr/lib:=/usr/$(get_libdir):g" \
+ freenet-wrapper.conf || die "sed failed"
+
+ echo "wrapper.java.classpath.1=/usr/share/freenet/lib/freenet.jar" >> freenet-wrapper.conf || die
+
+ local i=2 pkg jars jar
+ local ifs_original=${IFS}
+ IFS=","
+ for pkg in ${EANT_GENTOO_CLASSPATH} ; do
+ jars="$(java-pkg_getjars ${pkg})"
+ for jar in ${jars} ; do
+ echo "wrapper.java.classpath.$((i++))=${jar}" >> freenet-wrapper.conf || die
+ done
+ done
+ IFS=${ifs_original}
+ echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf || die
+
+ cp "${DISTDIR}"/freenet-ant-1.7.1.jar lib/ant.jar || die
+}
+
+EANT_TEST_EXTRA_ARGS="-Dtest.skip=false"
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar dist/freenet.jar
+ java-pkg_newjar "${DISTDIR}"/freenet-ant-1.7.1.jar ant.jar
+
+ if has_version =sys-apps/baselayout-2*; then
+ doinitd "${FILESDIR}"/freenet
+ else
+ newinitd "${FILESDIR}"/freenet.old freenet
+ fi
+
+ systemd_dounit "${FILESDIR}"/freenet.service
+
+ dodoc AUTHORS
+ newdoc README.md README
+ insinto /etc
+ doins freenet-wrapper.conf
+ insinto /var/freenet
+ doins run.sh
+ newins "${WORKDIR}"/seednodes-${DATE}.fref seednodes.fref
+ fperms +x /var/freenet/run.sh
+ dosym java-service-wrapper/libwrapper.so /usr/$(get_libdir)/libwrapper.so
+ use doc && java-pkg_dojavadoc javadoc
+ use source && java-pkg_dosrc src
+}
+
+pkg_postinst() {
+ elog " "
+ elog "1. Start freenet with /etc/init.d/freenet start."
+ elog "2. Open localhost:8888 in your browser for the web interface."
+ #workaround for previously existing freenet user
+ [[ $(stat --format="%U" /var/freenet) == "freenet" ]] || chown \
+ freenet:freenet /var/freenet
+}
+
+pkg_postrm() {
+ if ! [[ -e /usr/share/freenet/lib/freenet.jar ]] ; then
+ elog " "
+ elog "If you dont want to use freenet any more"
+ elog "and dont want to keep your identity/other stuff"
+ elog "remember to do 'rm -rf /var/freenet' to remove everything"
+ fi
+}
diff --git a/net-p2p/freenet/metadata.xml b/net-p2p/freenet/metadata.xml
new file mode 100644
index 000000000000..fd6ed7a988a6
--- /dev/null
+++ b/net-p2p/freenet/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tommy@gentoo.org</email>
+ <name>Thomas Sachau (Tommy[D])</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">freenet/fred</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/gnut/Manifest b/net-p2p/gnut/Manifest
new file mode 100644
index 000000000000..e8c0bce4725f
--- /dev/null
+++ b/net-p2p/gnut/Manifest
@@ -0,0 +1,6 @@
+DIST gnut-0.4.28-patches.tar.bz2 8663 SHA256 c9a4e06f79bea33542576132c44f69f5acc5b68a28fc3f3e1817d166bc2c5bbb SHA512 4ce1aece0e07e895731f96eb6274d7cc2ac3cd672a1a67c0a63781b51e5fd7d3f1c9e1cdcea59a9f5926f5256ff7a03cc490c4dfde857484fbe9cacd8e999048 WHIRLPOOL ee3efe7a22ef10b1b25fa3f48450a02587bf28ea3cc6c8449c06b243520ca5a315d7abb2152b8707aeab603926de62a5d03ba8f27e3018bb3caac08b86c1344e
+DIST gnut-0.4.28.tar.gz 333625 SHA256 f82aa6287c84376b2cb5fdabe6be2c27a0f72ed25672e277c2a9b521417f0fec SHA512 6287f01c83367e34f688300b346f02ec66765a0f9409a14265d345f9482ccab46358076b6d166652791d6e7c6fb0d70e8163544b88a0b199b1c36a54e943d4a2 WHIRLPOOL 077b4f76c00710b2a08a5d670560f7d8f46a0e67d995142e39ad3be3694db05b96df2acea127dda744735317f891277603f85382045e55c133964466333ebabd
+EBUILD gnut-0.4.28-r1.ebuild 606 SHA256 d7d700c278e9d36c903ed54cacffc00a3adf3238c7802ae4e0070fec7bc35d2b SHA512 328627200b3ae735393ba076bc6e057909988d701f0ec59c48b70e3e91e611e3800e1c635ff1233451a94446a0fecf73cf861d5f7f51d1915edb737521e5063a WHIRLPOOL c128bc98632dabc0f8e90abc8d70b5c1df26b1ff702905e48474f9a5811cbb0d6558e669deaf9608bc9b334459aea1de3b32cae43e814c2c45b3e499c32699c8
+MISC ChangeLog 2454 SHA256 2da0fd8c67ef53f179b4854546bee3078120ec6788091f9ae37f2392a290fcde SHA512 51012c657fe9f6a54650c91005e31f7da57787c6af41dd8fdffe8867b10c225a9dea663f3a63171e75fea2da0ece67597d2cc4ef86806374f4ca16c22636ca98 WHIRLPOOL 84a7c643c0c4ce3518a689f3a7b8f48e3e3dfc0c2227495172463fad10c509194f21291f23b61afd1eae811b4241c2ecdc660ad4f41335b11d851cbfe6428ffa
+MISC ChangeLog-2015 2136 SHA256 0285164f0e7c5bb9c7121adb5cd1bd04a5a3d080927ef73ace6231e4dfd51d06 SHA512 80432a78fb0db7625612cf0fab1b580d190535f89d122bd9afe57780a22cef8e5f06a495c5d9b7c3f790f2f4e289dbef85d8ad9fbddd93472fe778fd53ad728d WHIRLPOOL 71b46217109fc75db92225ed1e4bbb2e0dc5189322e40311fc1ddb200b291a211ee8fefc2ae70d8afd600ddd1990c3e69c6b432fa33447e5423704456463cbf1
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-p2p/gnut/gnut-0.4.28-r1.ebuild b/net-p2p/gnut/gnut-0.4.28-r1.ebuild
new file mode 100644
index 000000000000..7132dd862d5b
--- /dev/null
+++ b/net-p2p/gnut/gnut-0.4.28-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="Text-mode gnutella client"
+SRC_URI="http://alge.anart.no/ftp/pub/gnutella/${P}.tar.gz
+ mirror://gentoo/${P}-patches.tar.bz2"
+HOMEPAGE="http://www.gnutelliums.com/linux_unix/gnut/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="x86 ppc"
+IUSE=""
+
+src_unpack() {
+ unpack ${A}
+ epatch configure.patch
+ epatch src.patch
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+ dohtml doc/*.html
+ dodoc doc/TUTORIAL AUTHORS COPYING ChangeLog GDJ HACKING \
+ INSTALL NEWS README TODO
+}
diff --git a/net-p2p/gnut/metadata.xml b/net-p2p/gnut/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-p2p/gnut/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-p2p/go-ethereum/Manifest b/net-p2p/go-ethereum/Manifest
new file mode 100644
index 000000000000..7a0c1a542f95
--- /dev/null
+++ b/net-p2p/go-ethereum/Manifest
@@ -0,0 +1,4 @@
+DIST go-ethereum-1.5.5.tar.gz 14957844 SHA256 364a55b381b5bbf60c09a0e2a9a624d9c08dacb6570725cc2801af7c35db7690 SHA512 4429d0aaceb0e6ffa92f85674ad50ddb092436b97fabb4ff09439c408a762155ae7077b0a69432cf4a2397aea2ff3c4d603713ea1cd304a831b8aa9c039314ea WHIRLPOOL 1df86ba09bece09d5956b4b90f09e2a7897307e37b68332a777714106391c8c6bc441020f2f82bc3345133efb46c2597824fe4bb637055f0d40a2a7d947c3177
+EBUILD go-ethereum-1.5.5.ebuild 646 SHA256 8bfbeb72437b160b9726a18dbfc18d87fb32a5a1b52c7f487d2ef2baaaee269c SHA512 25298e5b286b87a9a4a040127d33bbb6fccef76d30c9fd3f7fe380bfc560667f112eceda726e42491aa7d9a0210ce07fefd4efa79ab9e87afb78183c88cc9359 WHIRLPOOL ee51aa2bae32effc2d9f363cf394a6d47dc13429014b8b1c0e094bfbdb36d8461248ab9608de743a8abb3ee0cdaa80ccaffaafa1128bab04f0a73197f47d25ac
+MISC ChangeLog 2088 SHA256 5a977fb43ae291524248c592a5d6d6365a62bee8cbf79eb9e8f7f89b8b6aa6d6 SHA512 3408015989baf1e480617222d95c9413fbb038201782b150786b44cc2ba0e2fe6b532dc923086aaeb102e367a1b75a4a2d799f2ed277279d623e2d8b2a3e0bee WHIRLPOOL 6ed7671f6d7b00247e3b659380f1f845f015752330bdde4e2ae7db981b9f4b4cf14a9e010ef9932b6bc849866d281e9e7f22a5860c06478bd396197cfda53d35
+MISC metadata.xml 590 SHA256 ad69a23b85393e4f70a6594363f5674b1e4d65f435aba94089806a98f7e0490d SHA512 6a946177d4a8a65e5fca879cc48cd432661f069c1e1ac405655721ad69a88dd8749b64f2bf0ca8d899120a6d49ba57a1c933987640bf8c08634cdd59ba496fa5 WHIRLPOOL b196cf36807539f36febb2392b9b52532f3c46a67fd3685362a857997806463b3be83ca8276547c50540bd86930224a11227fcc3ca0b2b7a4a39cf6a3168ce67
diff --git a/net-p2p/go-ethereum/go-ethereum-1.5.5.ebuild b/net-p2p/go-ethereum/go-ethereum-1.5.5.ebuild
new file mode 100644
index 000000000000..2310def0f5ef
--- /dev/null
+++ b/net-p2p/go-ethereum/go-ethereum-1.5.5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Official golang implementation of the Ethereum protocol"
+HOMEPAGE="https://github.com/ethereum/go-ethereum"
+SRC_URI="https://github.com/ethereum/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+ LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="evm opencl"
+
+DEPEND="dev-lang/go:=
+ opencl? ( virtual/opencl )
+"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ use opencl && export GO_OPENCL=true
+
+ emake geth
+ use evm && emake evm
+}
+
+src_install() {
+ einstalldocs
+
+ dobin build/bin/geth
+ use evm && dobin build/bin/evm
+}
diff --git a/net-p2p/go-ethereum/metadata.xml b/net-p2p/go-ethereum/metadata.xml
new file mode 100644
index 000000000000..3056bf45f275
--- /dev/null
+++ b/net-p2p/go-ethereum/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mathy@vanvoorden.be</email>
+ <name>Mathy Vanvoorden</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="evm">Build Ethereum Virtual Machine (EVM)</flag>
+ <flag name="opencl">Add OpenCL GPU mining support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">ethereum/go-ethereum</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/go-ipfs-bin/Manifest b/net-p2p/go-ipfs-bin/Manifest
new file mode 100644
index 000000000000..62591f53c080
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/Manifest
@@ -0,0 +1,14 @@
+DIST go-ipfs_v0.4.10_linux-386.tar.gz 8134700 SHA256 d0e2bb7f725dc08407a217b93518bf150468a830a4c202f4298e834b134038f6 SHA512 97b9aca8a3bfcaa219ede33ed7ac53c0b5b75987bd3e63af5311ff9058a96e2d5cf983529c849d2191a9dee6d7907a4bf412b853aab8ea6f542c7c9c1881e136 WHIRLPOOL 8bed53f8220b446b528bbb3fcf01e8ed30f5074f7f86322b10fb459f9679381f8a436d1d1a7e4ee95fa5e40afa6db4a590b295b87eda20e27f1a9917f0fcf389
+DIST go-ipfs_v0.4.10_linux-amd64.tar.gz 8580949 SHA256 c9d4ee36c3d8ea84c56243e63ee4873f43b0fca77d5afa5053ef2c21f286e9cb SHA512 4c19392e1c144e0e95713c5a37211fbf8b0c8f483da2afb577538467a1752a9e51720d7360d38b4864efb69c8b66cb577e4f250fcdfde8e13da771efe83be14d WHIRLPOOL 277a9ea7428283db78320b68eded8fa268f06346935a9545c75dce7d525c95970129c3dc4fadb738390b380f20437d557be6bb7460b201ed6ac4ada02c45f8ce
+DIST go-ipfs_v0.4.11_linux-386.tar.gz 10036071 SHA256 e5929c5cdf3a48158b06c465a94f807aaea1b8ff0c6ddaf107b0dd28d348e9d8 SHA512 ffeb43a7baf9f74a8be7d832105ad81e04057026a06ba33425d03804ec33429021ab7ef1f7c427426326d1b87213b867bec5ac3a96f2ada6e1f090f5b36e90a3 WHIRLPOOL 6d7e0be1fca8a0e42f43515105cbffe2c6a5944497810e89577ce64cf4247271d2025ba2e7919445fbf2d9be4e113dfeb5b44e566afba3f34ae3d4f61667676c
+DIST go-ipfs_v0.4.11_linux-amd64.tar.gz 12578502 SHA256 a638ac436597ba20b1a25b289b8c89cfa31a1fc7399de66a35ba04e45562b482 SHA512 b30772902c82b1ef7271e1e498133f2e605763a648674967e27e71d5c098dbcae227852da652018f6beac984371b04b9fa77b90286dbbb3f39b6efa2a181c5f0 WHIRLPOOL d0c848f67d1b9241c680f2ff280d9bd57af5a8b383224826dcc9de9a3a574094ed946f91aaab918e3be9c6d85e54cafe4bede338dbd88590697d6f75859acb1f
+DIST go-ipfs_v0.4.1_linux-386.tar.gz 6653590 SHA256 fcac752999975327d9309f6370b06dc5c23516019ed06fb0e41a601c620ecc1a SHA512 34ffe88359a12efd3f951b967cc03a7e279270d95b8e00958cfe08c07c0669cbfbf8d01ed68f69be86e39caa20b82893ac17bf868ce56de4c486ac80bed0ab59 WHIRLPOOL 80c5f6b921df53969c5d0b7d0045bfe766bab15d2221ae21c1bec8f87f1bdc9988f53bbb70968afe9ce0b01c8d0f1394299c7c9d51539f8c82387bd8c6461454
+DIST go-ipfs_v0.4.1_linux-amd64.tar.gz 7112859 SHA256 145b32f49e971eeb1545dc36321ae52e7b4ae4362b5b8aca6e4f6ab407aa5498 SHA512 1bee2c5b744d0727b95c1151da1d3e02c0c4b1c439e8d813de740571c667f83ee6e535fb66ba74714355c5edff5bd9b19425429c65cc50eaeee813f6479e0d5e WHIRLPOOL 58f666faa7793d5a2e7ca2430e58d6e2363769cc90015ed2be0e5f37544449ac617842f45ad588a8fb6dacafb9e0299f4cf25313b4ac89dba2eb78d295f9db25
+DIST go-ipfs_v0.4.2_linux-386.tar.gz 7141495 SHA256 db015247e500289533ce5b514e8f8649d26ffd0d45d993f6941065b9759e393e SHA512 02aa3bc06727da4084219f51de8a384e4a4ab351fae17cc0bda0e1255629dd69443eb5a9665c901660490ca1116876f6ad879420edf20df02172513ddfcb3025 WHIRLPOOL 0cd26f8fb625262fa0b6dfcff0a2745b59085498bbf24f84018c939de16ee6ccdfa2817b30328aa37f50bee8b4a79c34a751ded877fe207309a540f59ae86ed9
+DIST go-ipfs_v0.4.2_linux-amd64.tar.gz 7642422 SHA256 f9802fd8f793ac65ced66153d0159596e4ea6181def17c087c90d421e274e52e SHA512 f9435ae4bd48cd7a6845aeae2bc7b4b2ce899195653b24665430598e579015fad12e9f3b47540a7fd92cc23ebc3b88bb0b575b72e96c60e047b7d697247e790b WHIRLPOOL 5e32820a501973555780fbb5548502ff5c0a956f2ec6dd7705fd048fe2c41dd54fa4415f28d400da421eae6af3344d239ec2b04811de36a66f6c31e492dd5675
+EBUILD go-ipfs-bin-0.4.1.ebuild 654 SHA256 d2e738f478f8fa8e41e6713cbd92020f3829187d9179b56b428b0b7b91c6dbd9 SHA512 9c5f46ad90748a725361c60a72205443d8bed960829a6345dfc719e0cdea9ae85d5a0a21646cfd8d1bde100a20543361fecf5e0250ad9daeb49c4d8b61b86dd3 WHIRLPOOL a9c68bed2d136759dc4483d1f98ff31bc045b9e851a92e4a1c1b31b22dbcbf5ee8ec088cde5f8c9b0521eb627ae6dcc3ff4e7f9b6b7f2056c6c7b6566045dbd8
+EBUILD go-ipfs-bin-0.4.10.ebuild 654 SHA256 cba77974acd4f3448c307e8864cb2ac90ec51958119437527ac020e275850abc SHA512 98ab288e3142f445de02e967608468c59979c9e437d52090059f0e08586aae5ab12ba178e999b67e56e71b4fd636f53c784925076f0916bdb04bdfa531cce650 WHIRLPOOL a97abdab794db5cf3f061561efd9832eb0fc3514d9973a2b378c61b3280f390c1e891773524638ab079c4932473711f3313a1223fb40e3a7421f68aea8a654b1
+EBUILD go-ipfs-bin-0.4.11.ebuild 654 SHA256 cba77974acd4f3448c307e8864cb2ac90ec51958119437527ac020e275850abc SHA512 98ab288e3142f445de02e967608468c59979c9e437d52090059f0e08586aae5ab12ba178e999b67e56e71b4fd636f53c784925076f0916bdb04bdfa531cce650 WHIRLPOOL a97abdab794db5cf3f061561efd9832eb0fc3514d9973a2b378c61b3280f390c1e891773524638ab079c4932473711f3313a1223fb40e3a7421f68aea8a654b1
+EBUILD go-ipfs-bin-0.4.2.ebuild 654 SHA256 d2e738f478f8fa8e41e6713cbd92020f3829187d9179b56b428b0b7b91c6dbd9 SHA512 9c5f46ad90748a725361c60a72205443d8bed960829a6345dfc719e0cdea9ae85d5a0a21646cfd8d1bde100a20543361fecf5e0250ad9daeb49c4d8b61b86dd3 WHIRLPOOL a9c68bed2d136759dc4483d1f98ff31bc045b9e851a92e4a1c1b31b22dbcbf5ee8ec088cde5f8c9b0521eb627ae6dcc3ff4e7f9b6b7f2056c6c7b6566045dbd8
+MISC ChangeLog 1260 SHA256 c654d82bff477be64110bfa0be76f0690b500aa385d9203c393081caee5632d1 SHA512 0a8abb20f76559ed4a222c54951b99b5ee9be32e1c9bda84025b9f0545335e062e491b837ee3ac6476fa7fafb6cadcb72762fab93122e16bfc4f47f674f5a929 WHIRLPOOL 00b21ab82e34b5210bfd1283208238fd2add0e8d5f36e4be73e4aeb7d346e28d706bceb28356dd8a2a8eb3574bf23e25ab6fa06da6aa52f5f746057bf8852ae0
+MISC metadata.xml 606 SHA256 49c3a8c04226ae0efa7eb71edbbd7bec8f876499a6de5b6354c8ce96633196c4 SHA512 3c0ae2eeeb423edc50a5961f9e9f040b33c0a343e77b47dafc1699eea65708df2365944338da691a637ea79680976dfc91346e6572c42cae94a429c0902c8065 WHIRLPOOL 328c033336fa573c9363a1d9a62af88a2824e1f2b3eed230d229adc960c54df5efa6bc741399585dfc3c5d265f904bd570e4c24b901ede90b0d823c4faf06c51
diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.1.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.1.ebuild
new file mode 100644
index 000000000000..f5047ff131e6
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="go-ipfs is the main implementation of IPFS."
+HOMEPAGE="https://ipfs.io/"
+SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz )
+ x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz )"
+# Also available arches:
+# arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE="+fuse"
+
+RDEPEND="fuse? ( sys-fs/fuse )"
+S="${WORKDIR}/go-ipfs"
+
+QA_PREBUILT="/usr/bin/ipfs"
+
+src_install() {
+ dobin ipfs
+}
diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.10.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.10.ebuild
new file mode 100644
index 000000000000..8e07ed6fc878
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.10.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="go-ipfs is the main implementation of IPFS."
+HOMEPAGE="https://ipfs.io/"
+SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz )
+ x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz )"
+# Also available arches:
+# arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE="+fuse"
+
+RDEPEND="fuse? ( sys-fs/fuse )"
+S="${WORKDIR}/go-ipfs"
+
+QA_PREBUILT="/usr/bin/ipfs"
+
+src_install() {
+ dobin ipfs
+}
diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.11.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.11.ebuild
new file mode 100644
index 000000000000..8e07ed6fc878
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.11.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="go-ipfs is the main implementation of IPFS."
+HOMEPAGE="https://ipfs.io/"
+SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz )
+ x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz )"
+# Also available arches:
+# arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE="+fuse"
+
+RDEPEND="fuse? ( sys-fs/fuse )"
+S="${WORKDIR}/go-ipfs"
+
+QA_PREBUILT="/usr/bin/ipfs"
+
+src_install() {
+ dobin ipfs
+}
diff --git a/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.2.ebuild b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.2.ebuild
new file mode 100644
index 000000000000..f5047ff131e6
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/go-ipfs-bin-0.4.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="go-ipfs is the main implementation of IPFS."
+HOMEPAGE="https://ipfs.io/"
+SRC_URI="amd64? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-amd64.tar.gz )
+ x86? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-386.tar.gz )"
+# Also available arches:
+# arm? ( https://dist.ipfs.io/go-ipfs/v${PV}/go-ipfs_v${PV}_linux-arm.tar.gz )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-* ~x86 ~amd64"
+IUSE="+fuse"
+
+RDEPEND="fuse? ( sys-fs/fuse )"
+S="${WORKDIR}/go-ipfs"
+
+QA_PREBUILT="/usr/bin/ipfs"
+
+src_install() {
+ dobin ipfs
+}
diff --git a/net-p2p/go-ipfs-bin/metadata.xml b/net-p2p/go-ipfs-bin/metadata.xml
new file mode 100644
index 000000000000..d5913933e4c9
--- /dev/null
+++ b/net-p2p/go-ipfs-bin/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>davidroman96@gmail.com</email>
+ <name>David Roman</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="fuse">Enable runtime support for <pkg>sys-fs/fuse</pkg></flag>
+ </use>
+ <longdescription lang="en">
+ IPFS is a decentralized torrent-like networking system with transparent
+ file adding/downloading.
+ </longdescription>
+</pkgmetadata>
diff --git a/net-p2p/gtk-gnutella/Manifest b/net-p2p/gtk-gnutella/Manifest
new file mode 100644
index 000000000000..e9b5999b6430
--- /dev/null
+++ b/net-p2p/gtk-gnutella/Manifest
@@ -0,0 +1,8 @@
+DIST gtk-gnutella-1.1.11.tar.bz2 19966423 SHA256 e46ffa3905831828f867709aa346cd88576075bd1299ef396962ad860e2589d5 SHA512 87d2d66b555180c0db7c360106377133b9e1f8ad8d28fc0f9a38498f3b4502a817650f9683cf92919b7d3a1b3602f7136143d2f1c920e10727576c703e233d07 WHIRLPOOL d70a4dd39ac25856fd3fbe4b4d4f2447f1ed8448e672fb64ab1e66bcc59a2e36b30112db0123aed1b52a6fa00c274d17ac47bb2ac9a775182516558e9d38dd08
+DIST gtk-gnutella-1.1.12.tar.bz2 20075956 SHA256 ca65f9c56a5e17e6cb84246d5e2db453f1c73863ef937b8a1772ff4572d562ff SHA512 3b95f66389ed45f45ff8cc1c5f4eda0d03d5a4060a083f23fd5318ec004c3e96a37a6909688828cd8de97067d18280cc533146ce6de2129c83f9aeb8a3c5a589 WHIRLPOOL a7efc554ee6aad289444aa59e73ed4b0b7701c7a87a98b2f9cd45ef1439fe53cfa8d4f9722854ea90600d37e225e3be80533971f056d9ef831fec0b151629218
+EBUILD gtk-gnutella-1.1.11-r1.ebuild 1869 SHA256 8ae03f066aa6bdf57c4833fd2e93320b2c2e276a3018f622d89dd75716ae7d7a SHA512 3df30186715ee7497e6a5f68ad38dbb1ee8dd9e04b9a9ba0d67e603df2661ad929944e21a291ddb4243866417504da64e56ac0bca5f626f76b6525e91148e700 WHIRLPOOL fff3e33745b809773108a05d73bd3d951fb6362a6ca1dec8d759b94e4163f18d7724c27674038ad2913511d27ae78ea5a310862d4504e75b67cd55aa5c9ea4a3
+EBUILD gtk-gnutella-1.1.11.ebuild 1840 SHA256 f31f6a81e06c6c6f2f4a91e2d838f7b160425383ba32e379fac9513abf70b32f SHA512 ba05eaeef63243a39fdc801f1a6fa7581506dd7721c3615f23665cf5aa43d945cfd620831b06de958af8d8180fffdc0685fedbecd4884947ab56ce386218cf52 WHIRLPOOL 41c1d89596e2018e86657728b73f878b89332fdde334cbc2f2d65ede2847e017b6f58e33dd8898d61a74bb4cb4d00570c17350a8ec3ea0ea26c0e02622246528
+EBUILD gtk-gnutella-1.1.12.ebuild 1869 SHA256 8ae03f066aa6bdf57c4833fd2e93320b2c2e276a3018f622d89dd75716ae7d7a SHA512 3df30186715ee7497e6a5f68ad38dbb1ee8dd9e04b9a9ba0d67e603df2661ad929944e21a291ddb4243866417504da64e56ac0bca5f626f76b6525e91148e700 WHIRLPOOL fff3e33745b809773108a05d73bd3d951fb6362a6ca1dec8d759b94e4163f18d7724c27674038ad2913511d27ae78ea5a310862d4504e75b67cd55aa5c9ea4a3
+MISC ChangeLog 7436 SHA256 bb390eb374b1b3d3ff18b873dabe4c72d30bb2ac40bf3fd7c8a39c79d963926b SHA512 660fc73286da22168592cf2d9db5e9e1070bc8de9991b7eb3ab0d388f0b00dada15eda0a29658c5cfd7877a7e1e574b9c720ffbdc7e90d5c4b9b84c981c52ac8 WHIRLPOOL 426fe29b197f404655b05df1c439c9e52e22ca0b8863e4c88ce47f3414a86a0776fd313252cf824528d15031b0306467f4f57ccb82ea236cffc2eec553eb8ea9
+MISC ChangeLog-2015 24687 SHA256 c8dfc417de42e1a4d3fb61db052f1748e3647e596038edddaf57ecfc1b0a1178 SHA512 283f12f05c1e26314b9fc5ab5eaa260f22e63140335d3dd310058d52da2421a09d3a7c9fd61ff48122483ec7e27aec1fe7aab1a5d5372f6b77ccdbd40f1e9015 WHIRLPOOL 9a5bdd57fd95d47fdcbb4c436576a6e24c47c00fe2c2c873df747253611ba4ab6a3c13ceb4ffdf7dfb6c19ffa8b9703f3fab919d86014f0ec7b87ea28112ee19
+MISC metadata.xml 299 SHA256 4173f9e375db3721bbf02ca502d32e01d98125b1acd6633cc5afef6689916008 SHA512 ab18fa3318fdd64a0e4bff392a88d9f58b1c611c71ee090a767a4a25f75f273dc60a7cfeb7e386e5fbed548d982788c16654584938aec8ef5f6b11cd6d5b3c61 WHIRLPOOL fca824142c235c26a89e7ee25eecfbbed70eb0766b21d090e5b87d0d42312b3680101d92c3063d18326bf9ee5822c4925036f35768f22033a612bbbb31b5ca92
diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11-r1.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11-r1.ebuild
new file mode 100644
index 000000000000..6cbf0a7e3653
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+IUSE="nls dbus ssl +gtk"
+
+DESCRIPTION="A GTK+ Gnutella client"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ dev-libs/glib:2
+ sys-libs/zlib
+ gtk? ( >=x11-libs/gtk+-2.2.1:2 )
+ dbus? ( >=sys-apps/dbus-0.35.2 )
+ ssl? ( >=net-libs/gnutls-2.2.5 )
+ nls? ( >=sys-devel/gettext-0.11.5 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ strip-linguas -i po
+
+ echo "# Gentoo-selected LINGUAS" > po/LINGUAS
+ for ling in ${LINGUAS}; do
+ echo $ling >> po/LINGUAS
+ done
+
+ default
+}
+
+src_configure() {
+ # There is no option to turn off optimization through the build.sh
+ # script.
+ sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
+
+ # The build script does not support the equivalent --enable
+ # options so we must construct the configuration by hand.
+
+ local myconf
+
+ if ! use nls; then
+ myconf="${myconf} --disable-nls"
+ fi
+
+ if ! use dbus; then
+ myconf="${myconf} --disable-dbus"
+ fi
+
+ if ! use ssl; then
+ myconf="${myconf} --disable-gnutls"
+ fi
+
+ if use gtk; then
+ myconf="${myconf} --gtk2"
+ else
+ myconf="${myconf} --topless"
+ fi
+
+ ./build.sh \
+ --configure-only \
+ --prefix="/usr" \
+ --cc=$(tc-getCC) \
+ ${myconf}
+}
+
+src_compile() {
+ # Build system is not parallel-safe, bug 500760
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/bin
+ emake INSTALL_PREFIX="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog README TODO
+
+ # Touch the symbols file into the future to avoid warnings from
+ # gtk-gnutella later on, since we will most likely strip the binary.
+ touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
+}
diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11.ebuild
new file mode 100644
index 000000000000..1afd56ee560f
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.11.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+IUSE="nls dbus ssl +gtk"
+
+DESCRIPTION="A GTK+ Gnutella client"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+
+RDEPEND="
+ dev-libs/glib:2
+ sys-libs/zlib
+ gtk? ( >=x11-libs/gtk+-2.2.1:2 )
+ dbus? ( >=sys-apps/dbus-0.35.2 )
+ ssl? ( >=net-libs/gnutls-2.2.5 )
+ nls? ( >=sys-devel/gettext-0.11.5 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ strip-linguas -i po
+
+ echo "# Gentoo-selected LINGUAS" > po/LINGUAS
+ for ling in ${LINGUAS}; do
+ echo $ling >> po/LINGUAS
+ done
+
+ default
+}
+
+src_configure() {
+ # There is no option to turn off optimization through the build.sh
+ # script.
+ sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
+
+ # The build script does not support the equivalent --enable
+ # options so we must construct the configuration by hand.
+
+ local myconf
+
+ if ! use nls; then
+ myconf="${myconf} --disable-nls"
+ fi
+
+ if ! use dbus; then
+ myconf="${myconf} --disable-dbus"
+ fi
+
+ if ! use ssl; then
+ myconf="${myconf} --disable-gnutls"
+ fi
+
+ if use gtk; then
+ myconf="${myconf} --gtk2"
+ else
+ myconf="${myconf} --topless"
+ fi
+
+ ./build.sh \
+ --configure-only \
+ --prefix="/usr" \
+ --cc=$(tc-getCC) \
+ ${myconf}
+}
+
+src_compile() {
+ # Build system is not parallel-safe, bug 500760
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/bin
+ emake INSTALL_PREFIX="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog README TODO
+
+ # Touch the symbols file into the future to avoid warnings from
+ # gtk-gnutella later on, since we will most likely strip the binary.
+ touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
+}
diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.12.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.12.ebuild
new file mode 100644
index 000000000000..6cbf0a7e3653
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.12.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+IUSE="nls dbus ssl +gtk"
+
+DESCRIPTION="A GTK+ Gnutella client"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ dev-libs/glib:2
+ sys-libs/zlib
+ gtk? ( >=x11-libs/gtk+-2.2.1:2 )
+ dbus? ( >=sys-apps/dbus-0.35.2 )
+ ssl? ( >=net-libs/gnutls-2.2.5 )
+ nls? ( >=sys-devel/gettext-0.11.5 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ strip-linguas -i po
+
+ echo "# Gentoo-selected LINGUAS" > po/LINGUAS
+ for ling in ${LINGUAS}; do
+ echo $ling >> po/LINGUAS
+ done
+
+ default
+}
+
+src_configure() {
+ # There is no option to turn off optimization through the build.sh
+ # script.
+ sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
+
+ # The build script does not support the equivalent --enable
+ # options so we must construct the configuration by hand.
+
+ local myconf
+
+ if ! use nls; then
+ myconf="${myconf} --disable-nls"
+ fi
+
+ if ! use dbus; then
+ myconf="${myconf} --disable-dbus"
+ fi
+
+ if ! use ssl; then
+ myconf="${myconf} --disable-gnutls"
+ fi
+
+ if use gtk; then
+ myconf="${myconf} --gtk2"
+ else
+ myconf="${myconf} --topless"
+ fi
+
+ ./build.sh \
+ --configure-only \
+ --prefix="/usr" \
+ --cc=$(tc-getCC) \
+ ${myconf}
+}
+
+src_compile() {
+ # Build system is not parallel-safe, bug 500760
+ emake -j1
+}
+
+src_install() {
+ dodir /usr/bin
+ emake INSTALL_PREFIX="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog README TODO
+
+ # Touch the symbols file into the future to avoid warnings from
+ # gtk-gnutella later on, since we will most likely strip the binary.
+ touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
+}
diff --git a/net-p2p/gtk-gnutella/metadata.xml b/net-p2p/gtk-gnutella/metadata.xml
new file mode 100644
index 000000000000..eb47af177eb3
--- /dev/null
+++ b/net-p2p/gtk-gnutella/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gtk-gnutella</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/gtorrentviewer/Manifest b/net-p2p/gtorrentviewer/Manifest
new file mode 100644
index 000000000000..754284cb83aa
--- /dev/null
+++ b/net-p2p/gtorrentviewer/Manifest
@@ -0,0 +1,8 @@
+AUX gtorrentviewer-0.2b-curl-headers.patch 239 SHA256 c96afdc28f624afe86ebcafa4b4d7d92a00f238b2bf086a000753e564fce71f8 SHA512 298c1ac5a5b3fae515bda4b4e0739c578cf9f6ddcb1f827288872cdd4280dec8c66d746d57f5d9f8167b7bd8fddba4f21751edcd1f23a3bfa6a5c98e5df2f003 WHIRLPOOL 1d156e47b62da4f79170914d5cb2ad6c39d8296a6da1ea2849761375c7d70cf57402156e4058f24319bd3875fe10851a06e363c67fc9fd9c2c18c9747a62dbf9
+AUX gtorrentviewer-0.2b-desktop.patch 483 SHA256 27da5f9fd22ffdbdca01a7454126f7eb65f6292a873f2aaf837e324ac0d7f8cf SHA512 fbe5154caf39212489f04b398becf92b37b41fc481bef9a2e0644fcbd2971d3939c2c6f05e009e58b05b79ad9f581239daeda98f79095c9c8c35cdfc0cb7af0e WHIRLPOOL 9ccee1425a2256926394cd5e3914f56f84515bfa63aaa78925ca3711418e8156fa05f865ecff5ccf37d093ae7b4c5ade37bec38a85810598c8012645b3424a8f
+AUX gtorrentviewer-0.2b-underlinking.patch 342 SHA256 1849eead43a7912fe83f52a72e48635e397e10d5ed8dd06813bbbbbc2226a881 SHA512 8d3584d822ea83eb44ed16b474ef448d463929c9b4b4b01ce09a334d89ffc1dde045f5564de4b0b9b1ed18597589fd8281a21b39d54bf0cf56dd6d5d75ce8f0f WHIRLPOOL 8ab62c0405a5103b951848648e3399810fab8e7e458bcd765462aa402ca6387a5588fb02ec98d49224cc798d65911963a1b0a685b0b775da1221b21a36b10b78
+DIST GTorrentViewer-0.2b.tar.gz 247584 SHA256 6e56351103f5d46a45be160baa1b7b956b4416fcdb4533b3d17a309665690c95 SHA512 4e8a0181d0492e9a88de09fe6399b9c6e4ca16913550b53597c00c2a413cd4c332b305b4b24735fa2b84bea87618ce7c22b111779f452a8d977470830d145b10 WHIRLPOOL 081245cbec27e98bf3931cd7fda06c275228028cb521eb67dbfcbdf003c7ebe88625a5addc4bba34b440babeeca1f2a0ae34b33702d593289dbe371d92d4175c
+EBUILD gtorrentviewer-0.2b.ebuild 929 SHA256 616fd463f777287581cd033f7c61c9c946c05f865befe2c994f307919843cc33 SHA512 8c6a7eb789cccb1f3a8528abd66e5296529931a1e3110299f48155c348b15ef8052d578f597b3239003ff765b847d247f9f3093235cfce729bbcf14379361c4d WHIRLPOOL 82e2858122657663254393d8ee101c3a8f29b10dfcb0e4625f59509fd71431373da7c4fc6d31eb5ef31ae123fc7cfa6171cd3e01d264f81a2d81370e467acf99
+MISC ChangeLog 2616 SHA256 7d1ebc04aa5c0a924be37dedea21deee1cd74d5c66abe5aaa54a2ed7db1d066b SHA512 6224645b0136ff50d2905ed0fde7c92a33c597d877a6cc60b4af6a7e237d6b8cf2325870bb60a556ec818b6f0610f19fc935ae73c44ad619980ef5d8af8a9800 WHIRLPOOL f9a20ea14c1211ae07660e4d924c057be2bd33dd4965943256d851725be03d44dc0abef66c805746187864292b68afea96333c803c57f0b6fefff0e696a07f3b
+MISC ChangeLog-2015 2310 SHA256 0d11cc69321f13eaae3c49588d18d404396f4d56093a05308ed66d1c2d402bde SHA512 279716bdfc9393fb2e73f2a3a5cc43657220ff0f5c778485931152a82851135b22e7324ca7604e5e865f104014e5524a61a15b63847885e0ea096e21d22c64f6 WHIRLPOOL d91159ff78a5a2738b10fdc985ee35ce322a625b7d03abcbbf86e92397c9ae84ba73ad359a11bc94f1cb52f470adcedfc5b323d0c4644edac66e29204233ed49
+MISC metadata.xml 251 SHA256 2c130d2499a984b2206b40fae682438219fd5403fff12f5afd88a825642c5b7e SHA512 6aa002666249e169350fc4fc954fbf5cf8e4ccd1095a80ce2f89d1fae77629f25da7fa95b0b1851de7aad2d75b36823ea7ec9393fde3f3b59e20e8737dd08a83 WHIRLPOOL 7b12fae42b028c774dc6dfc78f6f952c4c238a51b3a006a84eb08fb8655b4bfc5dc5a8427c36185ef2f5136deda40fb7f1a0bdb0d529797bc2e0057a83451b77
diff --git a/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-curl-headers.patch b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-curl-headers.patch
new file mode 100644
index 000000000000..66e33fb3932b
--- /dev/null
+++ b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-curl-headers.patch
@@ -0,0 +1,12 @@
+diff --git a/src/main.c b/src/main.c
+index fc51205..f46d30a 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -40,7 +40,6 @@
+ #include <errno.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include "bencode.h"
diff --git a/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-desktop.patch b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-desktop.patch
new file mode 100644
index 000000000000..8ddad12c3688
--- /dev/null
+++ b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-desktop.patch
@@ -0,0 +1,16 @@
+--- data/gtorrentviewer.desktop.in.old 2014-11-22 17:48:55.859683842 +0100
++++ data/gtorrentviewer.desktop.in 2014-11-22 17:49:25.400108137 +0100
+@@ -3,11 +3,9 @@
+ _GenericName=Torrent Viewer
+ _Comment=Viewer and Editor for .torrent files
+ Exec=gtorrentviewer %U
+-Icon=gtorrentviewer.png
++Icon=gtorrentviewer
+ StartupNotify=false
+ Terminal=false
+ Type=Application
+-Encoding=UTF-8
+-Categories=Application;Network;
++Categories=Network;
+ MimeType=application/x-bittorrent;
+-Version=0.2
diff --git a/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-underlinking.patch b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-underlinking.patch
new file mode 100644
index 000000000000..22dd373e2967
--- /dev/null
+++ b/net-p2p/gtorrentviewer/files/gtorrentviewer-0.2b-underlinking.patch
@@ -0,0 +1,14 @@
+--- configure.ac
++++ configure.ac
+@@ -51,6 +51,11 @@
+ # Checks for libraries.
+ #
+
++dnl Check for libm for ceil()
++AC_SEARCH_LIBS([ceil], [m], [], [
++ AC_MSG_ERROR([unable to find the ceil() function])
++])
++
+ # check for libcurl.
+ AC_ARG_WITH([curl-config],
+ AC_HELP_STRING([--with-curl-config=PATH], [path to curl-config (e.g. /opt/bin)]),
diff --git a/net-p2p/gtorrentviewer/gtorrentviewer-0.2b.ebuild b/net-p2p/gtorrentviewer/gtorrentviewer-0.2b.ebuild
new file mode 100644
index 000000000000..dafc8d425819
--- /dev/null
+++ b/net-p2p/gtorrentviewer/gtorrentviewer-0.2b.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+GCONF_DEBUG="yes"
+
+inherit autotools eutils gnome2
+
+MY_PN=${PN/gtorrentviewer/GTorrentViewer}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="A GTK2-based viewer and editor for BitTorrent meta files"
+HOMEPAGE="http://gtorrentviewer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gtorrentviewer/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86 ~x86-fbsd"
+
+SLOT="0"
+IUSE=""
+
+S=${WORKDIR}/${MY_P}
+
+RDEPEND="
+ net-misc/curl
+ >=x11-libs/gtk+-2.4:2
+ >=dev-libs/glib-2.4:2
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ mv configure.in configure.ac || die #426262
+
+ epatch "${FILESDIR}"/${P}-curl-headers.patch
+ epatch "${FILESDIR}"/${P}-underlinking.patch
+ epatch "${FILESDIR}"/${P}-desktop.patch
+
+ # Fix tests
+ echo "data/gtorrentviewer.desktop.in" >> po/POTFILES.in || die
+
+ eautoreconf
+ gnome2_src_prepare
+}
diff --git a/net-p2p/gtorrentviewer/metadata.xml b/net-p2p/gtorrentviewer/metadata.xml
new file mode 100644
index 000000000000..a1ee47a37850
--- /dev/null
+++ b/net-p2p/gtorrentviewer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">gtorrentviewer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/kmldonkey/Manifest b/net-p2p/kmldonkey/Manifest
new file mode 100644
index 000000000000..ee0b4a87bb3f
--- /dev/null
+++ b/net-p2p/kmldonkey/Manifest
@@ -0,0 +1,5 @@
+DIST kmldonkey-2.0.7.tar.bz2 204642 SHA256 49954b7bf7f883e31ea1999e0109f416c12d646d8f51f410190d2ae79cab76e1 SHA512 59435fc13739fae51eb6ee4c9cdbc1aaddc08251b29208e67671bc7dd9e92cacfefec62a8cab8d780c237eb126b529980d17d00ec80c2e954641b2f18c7b48d2 WHIRLPOOL 3fcaef4d4c8fdd250e959a76158a46554332f367f55b6d2a8e25060bfe075c277a8fd893279e0e3d936d0f48c1b828f9a09948fb4ba2464108bd3b7b37bd1638
+EBUILD kmldonkey-2.0.7.ebuild 744 SHA256 99ef8c58b93a91a8dfad56edbfc9cd724c5733fea6d710596a9512ade6120208 SHA512 591fcf3f0cd8920e0c3693a15424e4b034c00311010d4fb7431ea50cc7f78abac7fab38ddcc16c3009d13a7dda8d8e740983024120ca91906146c7334cb057df WHIRLPOOL 053f3c9c16d9ca964100e2ab0c090562da468cf18c8a1d6c4bfd428417dc2c7c4defcfcf32820cff7f8feba6f349c67eeb8192cf650a8ad425fd281b05adfff3
+MISC ChangeLog 2746 SHA256 b2f32898d2d5b8de59250d1ae3207ccf2c760aed57ef0cf4866313a43cdcd2c8 SHA512 a0c11118a17a007c134ed89ef18f44af6b19ba4b7eee5227930cce8e3e504097506bbaaba33b454c6cbf07001d642db60ef82a1f59f153418b29dfa43ce891d9 WHIRLPOOL a326a158d6802fe07e1c95b24a98b09ebc7d02b4782a0fca4b343bf3e58d4f3f210b6ca53590ab04a33bc741701a83c7a0cda161b39ffc3913348ce5aba0f716
+MISC ChangeLog-2015 7022 SHA256 60222077d19804e3589978c6ebe5026ff27ab08fc17c52ee5cd69097da847a5f SHA512 935b218870bc107e9ff8ab142c5a781c65523917c70bbbbad757080ccc58dac9f28d1b0e5cc9cf674531ac59b27797b9eb0fad4f2424d475ba273732382780fc WHIRLPOOL 2413b46662d6944a35658b21a48762a451eb299128afaaee93579ade79423b470b670361c468f4905c0c138bd3a867618cb39cf856f44212c965e374e8cd8964
+MISC metadata.xml 255 SHA256 129c40b6bbc7ae3de67b33141bfb7bd3d0145918b6f3a6b3eea31e85d094e0b1 SHA512 8b2fdb47579200da9614f4dd4397bfbbf59c42fb6fc0509a1875f32458a67650d7a54e5bc621acc0accf7c17c1973941719284dff783208448abd61527d644c1 WHIRLPOOL 5f6cba6fd18443ff4df7c4a036d335adae5980b208a4259a360565bed527673781e92a2e4a0153f9838998c3777b86b807581f6fa828777acd43e59629a7b10b
diff --git a/net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild b/net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild
new file mode 100644
index 000000000000..eefcb25ac1ac
--- /dev/null
+++ b/net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+QT3SUPPORT_REQUIRED="true"
+inherit kde4-base
+
+DESCRIPTION="Provides integration for the MLDonkey P2P software"
+HOMEPAGE="https://www.kde.org/"
+SRC_URI="https://api.opensuse.org/public/source/home:eduardhc/${PN}-kde4/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+DEPEND="kde-frameworks/kdelibs:4[plasma(+)]"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_Plasma=OFF
+ )
+
+ kde4-base_src_configure
+}
+
+pkg_postinst() {
+ if ! has_version net-p2p/mldonkey ; then
+ elog ${PN} is a only a client, and requires access to an instance of
+ elog net-p2p/mldonkey to function.
+ fi
+}
diff --git a/net-p2p/kmldonkey/metadata.xml b/net-p2p/kmldonkey/metadata.xml
new file mode 100644
index 000000000000..bddd8b4a2053
--- /dev/null
+++ b/net-p2p/kmldonkey/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/ktorrent/Manifest b/net-p2p/ktorrent/Manifest
new file mode 100644
index 000000000000..7585cb168081
--- /dev/null
+++ b/net-p2p/ktorrent/Manifest
@@ -0,0 +1,5 @@
+DIST ktorrent-5.1.0.tar.xz 2046916 SHA256 3c57882f78006dcec3c5fb243479e995cc541e51e6acded5bf98a09900c486a3 SHA512 7bfe3a04a2b0f62d68b41c946af34e9f6ead6aa4ff7818a9c0ce2e83629d311e9e9be5fb1689065ce2601c43bd576b27d8c6946b845d4cdf5fa6362d53e8dd25 WHIRLPOOL 4be8e029e468d714a890652e77a6c6d1261a1ccc3b2114aae547bd5df38b2745a5d0836b86c4e0029ab13470cab66789b870da3536d183c106232f7bd960697f
+EBUILD ktorrent-5.1.0.ebuild 2974 SHA256 b5b623f7a3b0df662454da00c0dfcd92d7a854951ab92feeef66700b06ec554b SHA512 49a74cef49f1fbc893f8c95ecef2c1ac47578a4b56e29525a053d4a9fb2ac05f6295544b30dc1abba83476e543fd7cfdd059188e9776aa0e54ab2641ed4fa7f6 WHIRLPOOL dfc2506fe058212ea2350f7c0ee3eb0ada6a66ca7e97f68afecc057e8a1ca5a74b57270c052cba2e1c1e957583c76cd980f990bfe741075cd4d2edf530f83ab1
+MISC ChangeLog 5331 SHA256 e285b205ef0335e3749c9676e61a196392c6d7350edec08cf4596fd0663916ca SHA512 dc6ceafc1ae43490ae7ffb1f742034b3484d0142fa13f099273d9b1b4d48d068384436fc5abbdc74cff03992889fc7f384d21b4fb65db20aa93f9aead14c971c WHIRLPOOL cae76695dcac9f94aac746cdc8daff0cdac5cd5edcb851492ce023ea900ea07a55cd0731e744c456c53ea490c23c815e67ea04738079cf2518c44009bf9854c2
+MISC ChangeLog-2015 30096 SHA256 dfd5df7784274541e526560232059f5cd4af8131f5a54648fe9136b9acc6eadc SHA512 7d7c67b945e2d709b18fffeb0a66a6d2f5206b15678b40aaeefe0cb0ecdb9cc045eddc35b904fddea5549a4afa4cbaaed1e037d1a4ffd6bef65f66a7e6e01268 WHIRLPOOL aa29342f80898a0b32d88afed6fb786dbfc2106c7cafd9cc4963441a81d47647dec2f29a0274e395dabad120af76b95ef0a8db810a8e5a625b7a32c756df1d0f
+MISC metadata.xml 1341 SHA256 c2ea214fdc45115d6e5077164a0c6f2c63d346fa31f0215c7fa18935f668c307 SHA512 dfff24b08dba8615c983c1360fe10efcb60744651d5484a8bd1a7a731697b9dd4a10126b8d66276f96a8524352b1e4ba99b28b773d292362b3f7506a45da5a80 WHIRLPOOL 8bc47933d2160b7f5b6c09fb864a3f26a4175d9230d60af8578766e29a9f46a2f8da1cc09e4f8c50661c227bb9cb5607789cba81c5f95149df777b986176d6ba
diff --git a/net-p2p/ktorrent/ktorrent-5.1.0.ebuild b/net-p2p/ktorrent/ktorrent-5.1.0.ebuild
new file mode 100644
index 000000000000..ee8be9828980
--- /dev/null
+++ b/net-p2p/ktorrent/ktorrent-5.1.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="forceoptional"
+KDE_TEST="optional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="Powerful BitTorrent client based on KDE Frameworks"
+HOMEPAGE="https://www.kde.org/applications/internet/ktorrent/"
+SRC_URI="mirror://kde/stable/${PN}/${PV/%.0}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE="+bwscheduler +downloadorder +infowidget +ipfilter +kross +logviewer +magnetgenerator
++mediaplayer rss +scanfolder +search +shutdown +stats +upnp +zeroconf"
+
+COMMON_DEPEND="
+ $(add_frameworks_dep kcmutils)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kcrash)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep knotifyconfig)
+ $(add_frameworks_dep kparts)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_frameworks_dep solid)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ =net-libs/libktorrent-2.1*:5
+ infowidget? ( dev-libs/geoip )
+ kross? (
+ $(add_frameworks_dep karchive)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep kross)
+ )
+ mediaplayer? (
+ media-libs/phonon[qt5(+)]
+ >=media-libs/taglib-1.5
+ )
+ rss? (
+ $(add_frameworks_dep kdewebkit)
+ $(add_kdeapps_dep syndication)
+ )
+ search? (
+ $(add_frameworks_dep kdewebkit)
+ $(add_qt_dep qtwebkit)
+ )
+ shutdown? ( $(add_plasma_dep plasma-workspace) )
+ stats? ( $(add_frameworks_dep kplotting) )
+ upnp? ( $(add_frameworks_dep kcompletion) )
+ zeroconf? ( $(add_frameworks_dep kdnssd) )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-libs/boost
+ sys-devel/gettext
+"
+RDEPEND="${COMMON_DEPEND}
+ ipfilter? (
+ app-arch/bzip2
+ app-arch/unzip
+ $(add_frameworks_dep ktextwidgets)
+ $(add_kdeapps_dep kio-extras)
+ )
+ !net-p2p/ktorrent:4
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_BWSCHEDULER_PLUGIN=$(usex bwscheduler)
+ -DENABLE_DOWNLOADORDER_PLUGIN=$(usex downloadorder)
+ -DENABLE_INFOWIDGET_PLUGIN=$(usex infowidget)
+ -DWITH_SYSTEM_GEOIP=$(usex infowidget)
+ -DENABLE_IPFILTER_PLUGIN=$(usex ipfilter)
+ -DENABLE_SCRIPTING_PLUGIN=$(usex kross)
+ -DENABLE_LOGVIEWER_PLUGIN=$(usex logviewer)
+ -DENABLE_MAGNETGENERATOR_PLUGIN=$(usex magnetgenerator)
+ -DENABLE_MEDIAPLAYER_PLUGIN=$(usex mediaplayer)
+ $(cmake-utils_use_find_package rss KF5Syndication)
+ -DENABLE_SCANFOLDER_PLUGIN=$(usex scanfolder)
+ -DENABLE_SEARCH_PLUGIN=$(usex search)
+ -DENABLE_SHUTDOWN_PLUGIN=$(usex shutdown)
+ -DENABLE_STATS_PLUGIN=$(usex stats)
+ -DENABLE_UPNP_PLUGIN=$(usex upnp)
+ -DENABLE_ZEROCONF_PLUGIN=$(usex zeroconf)
+ )
+# add back when ported
+# -DENABLE_WEBINTERFACE_PLUGIN=$(usex webinterface)
+ kde5_src_configure
+}
diff --git a/net-p2p/ktorrent/metadata.xml b/net-p2p/ktorrent/metadata.xml
new file mode 100644
index 000000000000..4bd864220a5c
--- /dev/null
+++ b/net-p2p/ktorrent/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+ </maintainer>
+ <use>
+ <flag name="bwscheduler">Schedule upload and download limits over a period of a week</flag>
+ <flag name="downloadorder">Specify the download order of a multi-file torrent</flag>
+ <flag name="infowidget">Displays general information about a torrent in several tabs</flag>
+ <flag name="ipfilter">Filter IP addresses through a blocklist</flag>
+ <flag name="kross">Enable kross scripting support</flag>
+ <flag name="logviewer">Displays the logging output</flag>
+ <flag name="magnetgenerator">Generates magnet URI's</flag>
+ <flag name="mediaplayer">Phonon-based media player</flag>
+ <flag name="rss">Syndication plugin for KTorrent, supporting RSS and Atom feeds</flag>
+ <flag name="scanfolder">Scan folders for torrent files and load them</flag>
+ <flag name="search">Search for torrents</flag>
+ <flag name="shutdown">Shutdown when done</flag>
+ <flag name="stats">Shows statistics about torrents in several graphs</flag>
+ <flag name="upnp">Forward ports using UPnP</flag>
+ <flag name="zeroconf">Discover peers on the local network using the Zeroconf protocol</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/litecoind/Manifest b/net-p2p/litecoind/Manifest
new file mode 100644
index 000000000000..9943ed930fc1
--- /dev/null
+++ b/net-p2p/litecoind/Manifest
@@ -0,0 +1,14 @@
+AUX 0.9.0-sys_leveldb.patch 1040 SHA256 1355674ba82966b31fd001b12e7bd1bffbfd7f1c6d8dc1679cedba032e6df642 SHA512 26b1b6f8c4fdc228c08982a3172de57e09d963745726c99e1e274f381e242467f84d23c718f8e07675c2fc938f2d6db6b50a05dbb944702238d7b0eb6205cff7 WHIRLPOOL 7d39d39f846f03ffbf3e4c9655c42f298c8196dde8ee621862483a49f386c13cfdd13221ff265745f504a33422aaafac3657b72552f55784c9296daffc248f31
+AUX litecoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
+AUX litecoin.confd 245 SHA256 32f96a43c8c2aa049151a0fbc27b290e863d1b1a3c78eef5cb054fe5bad21011 SHA512 57de4657db4f0a3873b6aac700bc78fe8ecdfacdc0acb3fee13866389fc02b7100f4e7252ceb19f76e03d1ca9353008a9ccf40fc48a1a612c6b8fa4a35bae150 WHIRLPOOL 9c54b91df1225d812011af2fe27059262a70754e8a396f91a598479a76193d36203f8825af2a8e30f21d8b91c6df5ba734217f32f33c23bf6ca7a16498f43f28
+AUX litecoin.initd-r1 833 SHA256 878e7edb8396fbbb8618326b8db37b322a5774b8c2cb3bf9aafa69f6ce53abd9 SHA512 fb594b480734934476c1ed465d0277b0144a760ad3031134cb4496a55812e2fdec9863801316b429a0f2b808fa5ab32b8e1c3010fa0905d822fbf1af776174fb WHIRLPOOL f092539a33737caa61f2181dbee0f13d01a85f70affdee99e60c8cc4261cd908d4baa97fe182e76d58f7f2f4bffbbd8554936b13cef75e433487dfeea91cdcea
+AUX litecoin.service 879 SHA256 be344624575e7e69203bd7e17abc930847e27d95217b65b74ebfcf2e59a4bbca SHA512 f05009fdf4c38d78867588d84a6031d6bed81ad74c08d97a8fae16706f04ce61926dbde775183e0219a33e3a84e5fdad92acaab62e15156f3d07c15677e0f148 WHIRLPOOL def62eeef8c032a372c0624860369a32ff27b4099fa3ff720ac908139fb2c23e1aab4f4b4e623d890d309a5114352f2feb59ae105563b462e82667a52804c17f
+AUX litecoind-0.10.2.2-fix-gnustack.patch 665 SHA256 587017f1faf6bbcaa76d198ba055570f59edb1788f5fded830fa4ee2d3d88c01 SHA512 f74dec64810d892709f1e92e00adcd8f01ff22c1d83929341f104e96899fe834c6804b02f83f4d011818f3156197664ea3023320dd15dda8cc473691854c5fa0 WHIRLPOOL 7aecef359c5f1a81fe55536529a8b9a0706735dce03d6c86b7a7c2572744ed4d38b50c3696d789988e46786303dd5edf48078461a429facdda29df3e593502ff
+AUX litecoind-0.10.2.2-memenv_h.patch 506 SHA256 4ffa1298fc2cc8b0392e76322d6415d249cee1f5b6ffa5de8c2c5b740f22c94b SHA512 f915c6b1a1b91e5131133aeae70a23dfd78bb04af80b2ffcbecf599ad10ef16e769588c9199db551d30ca6ca4f7941a0d5b498c9b6712c3f7c807dc7533f28ea WHIRLPOOL 13d24663e668343a2bb7a69d6744f076ceb0c5775aab73202008a0d96df29b0185ae27c82963c4e48638d08cf8c44420cf1723e664e54df06ede265bb4acda97
+AUX litecoind-0.10.4.0-gcc6.patch 2789 SHA256 afea918335c6deb8b1f1f0924784c60aea66233e32b351758ba7565a6cdd4017 SHA512 7c5a14c50076438d04fd7ce3b24d0c17ae23d67c043ffb381e893f2ec6c4903842638347be12ca090bef2e3fb07721bccae77c61c34018ba406e9ceba4cd0cc0 WHIRLPOOL 4c0710bc4d9978b05138b49c47205f84f205ffed4cb3a9d8a615ba3859e2d7e8b1018226eaed1023e96c25d8e1f4f6e2929bfc4170f4520b8ee9dcd0c0f10098
+AUX litecoind.logrotate 113 SHA256 dce250c9f27ed9b36fa9376d92fedf89bf6f7f523360dc5baaa65179fd1d504b SHA512 eaa9f462be8dc755b675e4d5cb3ad271e3b1053edfa06df7862fa887160c849c768d2a268a7c8b52d1cfc834c186780b71435ee65475ea6c6692c18bded48dec WHIRLPOOL 3e771d6c2dfddd291386a1ed98009f1778e561a1b8ac43507f3ca709d1c389c3b8d6db5128ade485a0b92ba56b2388727935149af391fe3ef6f9e18ec432c04e
+DIST litecoin-0.10.4.0.tar.gz 4730189 SHA256 a9adb6d2ae555afdaa2a5febb81341ac506930cf04ab95b9dc3ab99a4de0405e SHA512 ae17e754d188efb1b51a376a52fe03e43b58c5059673b7dd4ecbf4f48574290b84011525fef2e10893f53e4da3d6ad9b5577001bb40aef7080d4c2479f4714a9 WHIRLPOOL 21737a593390cd8ef41e5adb77e6cd5ccb886bdbc8d2ea96078bac99ffab5c95347cd86f1e9047b5ee528a112bfe3ae0e5ef5be3498b7aa36ec169bdfdaf4818
+EBUILD litecoind-0.10.4.0.ebuild 2543 SHA256 43f6b08e3b6d746a4e0e9c1bf0a592d6e36c8f5419aaafc72e8f5e8e369e22dd SHA512 f75bab399458e0771b6bb08c37c7c749eab7df51ab63f1e92693e0b3c6315b173e449f553df5f97ab263a6ded263107cb809748e81f8624864f8892e373b0ab7 WHIRLPOOL 8ccad2f24985ac7e3815570fb240175fefe47e38bdb8b84b3e97b2de19ae46cba2e6a52801c79cd7f8e4fd8de54cf14f0a957b325fe8fa39b688888e5d975e56
+MISC ChangeLog 4846 SHA256 08d956d8fa67223a7210ce881c06c0fd0b32b2c519afa48631afac87e869540a SHA512 a48a608f0f416ee115fa350b967e13b7e7f760f388b15c518066e497f9e1699bb5bce659a291c8f49fd3083997df883086f62790b5029f5ef28c66a1e1abbf54 WHIRLPOOL 9a752c6207a1d7752a15b5dc2405b44b1ba879212adff2f41cd5f68f18b89e2ea1f8920a48d44f55db9ba495846d6541ec12435c2a6833064abe87fb644c823d
+MISC ChangeLog-2015 2749 SHA256 e6a39384c4b66804c8b4bb73cacc764a971d3d10f32ef17e1c4e033f3a302fb1 SHA512 b4596860579fae6d6b59120b05571873984b4602b719d0a51cf3a8aa0c0bf093c77bf61d669967d5712a77f0f855ec3bc84b537faabeb49d524a97a968c621f3 WHIRLPOOL 76613fba5f31836c7ec60ee31d58b7bd05f2db03a50132344f6161fa5ea8a23c8958396d307aae3c463ffa471222def3106fa40a03fc56946fa229c8f3db3c63
+MISC metadata.xml 396 SHA256 038714a0a98c0645598fb692f4056bc94952938e01cbf499c7194e03dbf8c566 SHA512 b7bed8abba67ee6344e39e4a41991a0b1c036a51cf1ca338a8851507e8e7bcb9e3081445eaa7fb09b2b1ef352d02dbff5339faebc0becce9273bd743344d47a6 WHIRLPOOL 4d50a501da6643c3b36c57782cb9b504100e858b27ef7c30008b046b5677ef7a18a29f5dce1504c093f306f0b9c0737d9e4386a23af8bd2dedb135e8b525e576
diff --git a/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch b/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 000000000000..60e9f2b20941
--- /dev/null
+++ b/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch
@@ -0,0 +1,34 @@
+commit c38e0af3e021eb0b2aba846c77b06ca71de06b11 (personal-github/sys_leveldb, sys_leveldb)
+Author: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Mon Sep 9 03:06:17 2013 +0000
+
+ configure: Add unsupported --with-system-leveldb configure flag
+
+diff --git a/configure.ac b/configure.ac
+index 3ed4549..5a5852d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -332,10 +332,22 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
+ [ AC_MSG_RESULT(no)]
+ )
+
++dnl Check for leveldb, only if explicitly requested
+ LEVELDB_CPPFLAGS=
+ LIBLEVELDB=
+ LIBMEMENV=
+-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
++AC_ARG_WITH([system-leveldb],
++ [AS_HELP_STRING([--with-system-leveldb],
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_leveldb=$withval],
++ [system_leveldb=no]
++)
++if test x$system_leveldb != xno; then
++ LEVELDB_CPPFLAGS=
++ LIBLEVELDB=-lleveldb
++ LIBMEMENV=-lmemenv
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
diff --git a/net-p2p/litecoind/files/litecoin.conf b/net-p2p/litecoind/files/litecoin.conf
new file mode 100644
index 000000000000..c6a55f3d9133
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-p2p/litecoind/files/litecoin.confd b/net-p2p/litecoind/files/litecoin.confd
new file mode 100644
index 000000000000..4261f6e25fe2
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/litecoind
+
+# owner of liteciond process (don't change, must be existing)
+LITECOIN_USER="litecoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+LITECOIN_OPTS="${LITECOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/litecoind/files/litecoin.initd-r1 b/net-p2p/litecoind/files/litecoin.initd-r1
new file mode 100644
index 000000000000..bc7f307f47a6
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+vardir="/var/lib/litecoin"
+conffile="${vardir}/.litecoin/litecoin.conf"
+litecoind_user="${LITECOIN_USER:-nobody:nobody}"
+
+description="P2P Internet currency based on Bitcoin but easier to mine."
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/litecoind"
+command_args="${LITECOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${litecoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${litecoind_user} -m 0400 ${conffile} || return 1
+
+ if ! grep -q '^rpcpassword=' "${conffile}"; then
+ eerror "Please edit `readlink -f ${conffile}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+}
diff --git a/net-p2p/litecoind/files/litecoin.service b/net-p2p/litecoind/files/litecoin.service
new file mode 100644
index 000000000000..ae063ac48e1b
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/litecoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/litecoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="LITECOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/litecoin/litecoin.conf
+
+[Unit]
+Description=Litecoin Daemon
+After=network.target
+
+[Service]
+User=litecoin
+Environment=LITECOIN_OPTS=
+ExecStart=/usr/bin/litecoind -daemon=0 $LITECOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/litecoind/files/litecoind-0.10.2.2-fix-gnustack.patch b/net-p2p/litecoind/files/litecoind-0.10.2.2-fix-gnustack.patch
new file mode 100644
index 000000000000..cbaf66ea93e1
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoind-0.10.2.2-fix-gnustack.patch
@@ -0,0 +1,17 @@
+diff -Naur litecoin-0.10.2.2.orig/src/secp256k1/src/field_5x52_asm.asm litecoin-0.10.2.2/src/secp256k1/src/field_5x52_asm.asm
+--- litecoin-0.10.2.2.orig/src/secp256k1/src/field_5x52_asm.asm 2015-06-15 04:51:30.000000000 -0400
++++ litecoin-0.10.2.2/src/secp256k1/src/field_5x52_asm.asm 2016-01-03 08:35:26.438350565 -0500
+@@ -466,4 +466,12 @@
+ jmp common_exit_norm
+ end
+
+-
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
diff --git a/net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch b/net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch
new file mode 100644
index 000000000000..e181e4db5a91
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoind-0.10.2.2-memenv_h.patch
@@ -0,0 +1,12 @@
+diff -Naur litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp litecoin-0.10.2.2/src/leveldbwrapper.cpp
+--- litecoin-0.10.2.2.orig/src/leveldbwrapper.cpp 2015-06-15 04:51:30.000000000 -0400
++++ litecoin-0.10.2.2/src/leveldbwrapper.cpp 2015-08-28 21:30:45.968538185 -0400
+@@ -11,7 +11,7 @@
+ #include <leveldb/cache.h>
+ #include <leveldb/env.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv.h>
++#include <leveldb/helpers/memenv.h>
+
+ void HandleError(const leveldb::Status& status) throw(leveldb_error)
+ {
diff --git a/net-p2p/litecoind/files/litecoind-0.10.4.0-gcc6.patch b/net-p2p/litecoind/files/litecoind-0.10.4.0-gcc6.patch
new file mode 100644
index 000000000000..5c7e44da3d39
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoind-0.10.4.0-gcc6.patch
@@ -0,0 +1,47 @@
+From 40ce41c006787dc4a2e3b17f7abbaf8ff56c45e7 Mon Sep 17 00:00:00 2001
+From: Adrian Gallagher <thrasher@addictionsoftware.com>
+Date: Tue, 25 Oct 2016 17:48:19 -0700
+Subject: [PATCH] Litecoin: Fix build boost compilation error with C++11
+
+---
+ src/chainparams.cpp | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/chainparams.cpp b/src/chainparams.cpp
+index ba8e33d1c14..7f99e45b7ad 100644
+--- a/src/chainparams.cpp
++++ b/src/chainparams.cpp
+@@ -163,11 +163,11 @@ class CMainParams : public CChainParams {
+ vSeeds.push_back(CDNSSeedData("weminemnc.com", "dnsseed.weminemnc.com"));
+ vSeeds.push_back(CDNSSeedData("loshan.co.uk", "seed-a.litecoin.loshan.co.uk"));
+
+- base58Prefixes[PUBKEY_ADDRESS] = list_of(48);
+- base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
+- base58Prefixes[SECRET_KEY] = list_of(176);
+- base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
+- base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
++ base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,48);
++ base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
++ base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,176);
++ base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
++ base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
+
+ convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
+
+@@ -225,11 +225,11 @@ class CTestNetParams : public CMainParams {
+ vSeeds.push_back(CDNSSeedData("xurious.com", "testnet-seed.ltc.xurious.com"));
+ vSeeds.push_back(CDNSSeedData("wemine-testnet.com", "dnsseed.wemine-testnet.com"));
+
+- base58Prefixes[PUBKEY_ADDRESS] = list_of(111);
+- base58Prefixes[SCRIPT_ADDRESS] = list_of(196);
+- base58Prefixes[SECRET_KEY] = list_of(239);
+- base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
+- base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
++ base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
++ base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
++ base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
++ base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
++ base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();
+
+ convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
+
diff --git a/net-p2p/litecoind/files/litecoind.logrotate b/net-p2p/litecoind/files/litecoind.logrotate
new file mode 100644
index 000000000000..5b091aa00c4e
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/litecoin/.litecoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP litecoind
+ endscript
+}
diff --git a/net-p2p/litecoind/litecoind-0.10.4.0.ebuild b/net-p2p/litecoind/litecoind-0.10.4.0.ebuild
new file mode 100644
index 000000000000..32c939ec998e
--- /dev/null
+++ b/net-p2p/litecoind/litecoind-0.10.4.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit autotools db-use eutils flag-o-matic systemd user
+
+MyPV="${PV/_/-}"
+MyPN="litecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine"
+HOMEPAGE="https://litecoin.org/"
+SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="logrotate upnp +wallet"
+
+RDEPEND="
+ dev-libs/boost:=[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? ( app-admin/logrotate )
+ upnp? ( net-libs/miniupnpc )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ >=dev-libs/leveldb-1.18-r1
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}"
+
+pkg_setup() {
+ local UG='litecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/litecoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/0.9.0-sys_leveldb.patch
+ epatch "${FILESDIR}"/litecoind-0.10.2.2-memenv_h.patch
+ epatch "${FILESDIR}"/litecoind-0.10.2.2-fix-gnustack.patch
+ epatch "${FILESDIR}"/${P}-gcc6.patch
+ eautoreconf
+ rm -r src/leveldb
+}
+
+src_configure() {
+ # To avoid executable GNU stack.
+ append-ldflags -Wl,-z,noexecstack
+
+ local my_econf=
+ if use upnp; then
+ my_econf="${my_econf} --with-miniupnpc --enable-upnp-default"
+ else
+ my_econf="${my_econf} --without-miniupnpc --disable-upnp-default"
+ fi
+ econf \
+ $(use_enable wallet)\
+ --disable-ccache \
+ --disable-static \
+ --disable-tests \
+ --with-system-leveldb \
+ --with-system-libsecp256k1 \
+ --without-libs \
+ --with-daemon \
+ --without-gui \
+ --without-qrencode \
+ ${my_econf}
+}
+
+src_install() {
+ default
+
+ insinto /etc/litecoin
+ doins "${FILESDIR}/litecoin.conf"
+ fowners litecoin:litecoin /etc/litecoin/litecoin.conf
+ fperms 600 /etc/litecoin/litecoin.conf
+
+ newconfd "${FILESDIR}/litecoin.confd" ${PN}
+ newinitd "${FILESDIR}/litecoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/litecoin.service"
+
+ keepdir /var/lib/litecoin/.litecoin
+ fperms 700 /var/lib/litecoin
+ fowners litecoin:litecoin /var/lib/litecoin/
+ fowners litecoin:litecoin /var/lib/litecoin/.litecoin
+ dosym /etc/litecoin/litecoin.conf /var/lib/litecoin/.litecoin/litecoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 litecoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 litecoin.conf.5
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/litecoind.logrotate" litecoind
+ fi
+}
diff --git a/net-p2p/litecoind/metadata.xml b/net-p2p/litecoind/metadata.xml
new file mode 100644
index 000000000000..e5fa4a887501
--- /dev/null
+++ b/net-p2p/litecoind/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+ <use>
+ <flag name="logrotate">Use app-admin/logrotate for rotating logs</flag>
+ <flag name="wallet">Enable wallet support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">litecoin-project/litecoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/metadata.xml b/net-p2p/metadata.xml
new file mode 100644
index 000000000000..b04d29b9628e
--- /dev/null
+++ b/net-p2p/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-p2p category contains peer-to-peer networking applications.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-p2p enthält Peer-to-Peer-Software.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-p2p contiene aplicaciones peer-to-peer.
+ </longdescription>
+ <longdescription lang="ja">
+ net-p2pカテゴリーにはピア・トゥ・ピアの
+ ネットワーキング・アプリケーションが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-p2p categorie bevat peer-to-peer netwerkapplicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-p2p chứa các phần mềm mạng ngang hàng (peer-to-peer).
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-p2p contiene applicazioni peer-to-peer.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-p2p contém aplicações de rede peer-to-peer.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-p2p zawiera programy służące do wymiany plików w sieciach
+ peer-to-peer.
+ </longdescription>
+</catmetadata>
+
diff --git a/net-p2p/mktorrent-borg/Manifest b/net-p2p/mktorrent-borg/Manifest
new file mode 100644
index 000000000000..b343a32f111e
--- /dev/null
+++ b/net-p2p/mktorrent-borg/Manifest
@@ -0,0 +1,5 @@
+DIST mktorrent-0.9.9.tgz 6087 SHA256 d9dc38d13dffe817c4e20c9c489b0e46a0f2b9ae2bc0367d5e6bba8e5cdde83f SHA512 ff702383c99d5c80b4433fb279968e1f19c6315216a2b74064ba57240ecd990b674195c035278c7e54801b77ab76fbb94667d8d7938d5ce2348faf015de27c5f WHIRLPOOL 1b2ea1c5f7503912161957c05e97aadf8a3e36110970e63c2afd2e80da3c3761f483361d24d8f60ff6e66293a6db2e7746a49392d7b78345d52a89aedc1d08d9
+EBUILD mktorrent-borg-0.9.9.ebuild 621 SHA256 f87549be39f6aa89094c2a3405c88b72d7b40d5868afa0ee6c395cda1265f66c SHA512 caa01aeb6381e42d8b9aa14bbe840eefc458c572f5180c3cd61856c7b3a8d418a4e916ea3de30688be9adcb858ce0e4f4fbb34fffc5c19954755a94557df3a4e WHIRLPOOL e85ec26e22ff0b1d4714caea41e1e727f83c88271974a959a95cf51d71a9c31ea4acbc8b7932a355058b49898abeb846923ad5ce23a862f94e432c62bb48a1a7
+MISC ChangeLog 2476 SHA256 21edd57082b08ece61055ffa6920ffe5fab809b028f9b7b7c5bd3ebda6ba49cc SHA512 09163caf619439f20c08be233d30a1611c5a1d5bcb43913f91f477225cf1cbc04f6205744c92fda2aab84e799d967cf84eb0d8775321ae59a0e616e006ed6663 WHIRLPOOL 23e223708710305d29ab5d884f33d5911c63e243dafbe8504f3309dc56d9ec0db1bcc1fab9aff410d6eb5b48142983dc78330357eb6451499aec3ab09340ffc2
+MISC ChangeLog-2015 1080 SHA256 16539a3ec6a2472aa241383ad1685c49948f29d37147aa7d70c927a3da922c75 SHA512 eac15eb832df8efcfd9347543d02ea5d5b02cf5209ea8534fb4e7bcf5d578332eca1efa2a87e311d4c45fea5551d8b7e9ecdcb84b2ece799a625078c9fb1489b WHIRLPOOL cc35c75e1bf8c83b1d8fe2defd94907039bd81e5d71309057b78eac8dad9573550d4aaf01c9774299c1fa3ba80636befdd4e0227cc7b74441127c03074df65bd
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-p2p/mktorrent-borg/metadata.xml b/net-p2p/mktorrent-borg/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-p2p/mktorrent-borg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild b/net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild
new file mode 100644
index 000000000000..a7ded3a91958
--- /dev/null
+++ b/net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Console .torrent file creator. It support Multi Trackers (tier groups)"
+HOMEPAGE="http://borg.uu3.net/~borg/"
+SRC_URI="ftp://borg.uu3.net/pub/unix/mktorrent/mktorrent-${PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+S="${WORKDIR}/${PN%-borg}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i -e "s/CC=gcc/CC=$(tc-getCC)/g" \
+ -e "s/^CFLAGS =/CFLAGS +=/g" Makefile
+}
+
+src_install() {
+ newbin mktorrent mktorrent-borg || die "newbin failed"
+ dodoc CHANGES
+}
diff --git a/net-p2p/mktorrent/Manifest b/net-p2p/mktorrent/Manifest
new file mode 100644
index 000000000000..622ea6463204
--- /dev/null
+++ b/net-p2p/mktorrent/Manifest
@@ -0,0 +1,5 @@
+DIST mktorrent-1.0.tar.gz 23089 SHA256 6f8e562af6366e0d9bde76e434f740b55722c6c3c555860dbe80083f9d1d119f SHA512 f103c8860c008796c2dc604fcabce7374264fd7814237fcad5f9dab0fe10e927b0e2d9b58e7462dd198265a7d83fe30fd68313c7dce4029d8c331a6f2d4622de WHIRLPOOL 2a907fe846ae5a35dbb38fbd6707a89121d34b9658f1afa682db14da9254cc58ed376fc23c834753409769643868294b0f1354fd7d9d567ec0cff49ee713b163
+EBUILD mktorrent-1.0-r1.ebuild 773 SHA256 bd45c909f1fc5995032f4a1d1ecca89d87e31bc059dddeee6b6b7c6c506751fb SHA512 0d0bb8c9cd8c14d7c6ecbd7bc7b59576ad1a1ba2ee27afba9ad2e2231e8fd48d47f657097d27f266ebe5a708e4c1e1cac1f9ddcad00838ccba757b89771e3b84 WHIRLPOOL f85db95884a0a1749e1a38e5febcc789ad9637853ffed09ea9b70467aa7280a73ba344cb71f21d904326ee167faf02a90351eb982ceb32947f63bd638d747cf3
+MISC ChangeLog 2463 SHA256 b548588c5d8ad39292660376ebaa8c294e388fdfca969b43fb99b45396e662ea SHA512 422a9a26eaf5c440003a3e5d3cd0bd7ca6dc413311a92af91071a2d14b23b891e47b458c9122ef993491d225adfedfa317dc0dcf33ca02558529bb0ff2dc2f2c WHIRLPOOL fe93adafc08d7dcb4ff81373848ad5fe1bffb204d0e49a721e98df6b091987014c583f0b8fd9fe893831fba7fec1cc24d73f802cd4e191cbc3b55ac1c9544013
+MISC ChangeLog-2015 2307 SHA256 79170f7cabb17c0f6c7a952a2cc6ea62c2fb5a80210c717bbb71b58fa027842e SHA512 83f94b8dff89f88006348f91a44f281a5dd395e4ac2ee49f19167a73e4b515b5264f6bcbcf63b027e590e9a56766cae4dd8e76dffa600d0e1845f62ffe7b740d WHIRLPOOL b00d5ab343a325e505936119efa73d026d47e35d984c7159558cc895ed5db29b4647e5fc35a4dfc0dbc0cd8adf62d6760bdc3b93b4014a2deb53e1f11838088c
+MISC metadata.xml 246 SHA256 6a1d6e3d973c49a448546ff17b94135248934cc5520224096bcbe862f1af6811 SHA512 ccfd5352b45fa0f1013a55f9daf8ce794904dd8c0d586d6ec732df83f776d28b78ca134c0a2cd5003c9d42b0b44419754cb5b19649100949536075c39a2b543c WHIRLPOOL 9a6752f83db1613496d4d8f4057e9ceb00ea824a2ca86d80adaa38878282cb95ac653007761c2a04708234b0610c7cddaaea20a957036e5754af498dc5e7c118
diff --git a/net-p2p/mktorrent/metadata.xml b/net-p2p/mktorrent/metadata.xml
new file mode 100644
index 000000000000..36ce80cda8c8
--- /dev/null
+++ b/net-p2p/mktorrent/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">mktorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/mktorrent/mktorrent-1.0-r1.ebuild b/net-p2p/mktorrent/mktorrent-1.0-r1.ebuild
new file mode 100644
index 000000000000..fbf7e1b73e9b
--- /dev/null
+++ b/net-p2p/mktorrent/mktorrent-1.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Simple command line utility to create BitTorrent metainfo files"
+HOMEPAGE="http://mktorrent.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="threads +ssl debug"
+
+RDEPEND="ssl? ( dev-libs/openssl:0 )"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ tc-export CC
+ MAKEPARAM="USE_LONG_OPTIONS=1"
+ MAKEPARAM="${MAKEPARAM} USE_LARGE_FILES=1"
+ use debug && MAKEPARAM="${MAKEPARAM} DEBUG=1"
+ use ssl && MAKEPARAM="${MAKEPARAM} USE_OPENSSL=1"
+ use threads && MAKEPARAM="${MAKEPARAM} USE_PTHREADS=1"
+
+ emake ${MAKEPARAM}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc README
+}
diff --git a/net-p2p/mldonkey/Manifest b/net-p2p/mldonkey/Manifest
new file mode 100644
index 000000000000..7b31803ecef0
--- /dev/null
+++ b/net-p2p/mldonkey/Manifest
@@ -0,0 +1,12 @@
+AUX mldonkey.confd-2.8 887 SHA256 d395ecece23a23dcb41addf63b70220996011ceb29d8738afb3c048b666cd96e SHA512 0ec0fe4fcf87222e31852e7e254e5e054bc31b713d5e4679b2a794c6df8cf0347f9a1d3d345bb48144b13d3e8dcb38168d0be32c766b7d678a8055fc066beb4d WHIRLPOOL 9c90eda42233ee60c988fdaca0a0ddb567c0deb84ae32fd77a7ac7d947d1b2b612a691e0e32e7f3dc4263a6d201c95519422a461712aec79d4183f7256fa6e0a
+AUX mldonkey.initd 3158 SHA256 651d525c5bfaff9421183b73b80939dfc3a3d4e105d6da941258eb05a29210b0 SHA512 33530e71032be0771296fde58a46dc02859a82de5173ff71bbbcdebf879e6d7d6b597b4104db0ab2f319d3f5848db41d17cadbdd781c6f97dd23387b7f823054 WHIRLPOOL b9317e011eac450cbb5bb79820de2cd2cd0881b96148b24b5c4a2b7bddf79c225126208e5a1ca453b1925c364a559e6abe07aacd2776d11dc2aca218dba65473
+AUX ocaml-4.03.patch 5140 SHA256 e82fb67c7a29503a77104cd1c7976a6f7a9ecda14c9ee2e4a33d9bc5521df36e SHA512 19f0736c72abcbb992aa55bb7a685bc21234c6f807b0efcfb09791aee9843823779ae6c94f70a9c891b9aa0ac388618d8c775beee1244e264c0b27096e8a2399 WHIRLPOOL 2c37ef6cf9234eceb628501249ca3cdde078050a992174bca3cfeff45f39f32bdcf7a1a7c5ff1e02c1d2f066b9d329dc3704544c4800b4129061c4a9f30a76d1
+AUX ocaml4.patch 547 SHA256 465361e9b96a2fc69b61105ade1a14715bd2e93f1c2fb80a35a2ee11cb06dd37 SHA512 f99d4050613e210c2092153a7b1a45028ea26d4e90d295b1d19ed3a25b7ae656c15efca84a5f694703dca339c1a5e7baec5d71ad815f96c41620a8ed7c34422c WHIRLPOOL 77e859eba9e9cea69c5fb6d2f4ed43116dcfaee0b0e4797960b4e2a53656e42cd0a568b7b334d751956954e0f4f628de60ef6bca01e127ac421a42cb72ee6823
+DIST mldonkey-3.1.5.tar.bz2 2847382 SHA256 74f9d4bcc72356aa28d0812767ef5b9daa03efc5d1ddabf56447dc04969911cb SHA512 96e75acf91d7ecc41490f898e06d284da27404c7e567f173936d8113885a3b4b6bc93341358f92a30d3f699eef681d97ce56414a37bb02a535ad2da4d4ad13a3 WHIRLPOOL b9e15809a49cc12e69a6d1188441e9d5603ec76cb7bfe2b2e0bfce3c50abb31296904c842f487076b227f577046ccbd3ceb7cd1a601d3faa6928b1bfde8c780f
+DIST mldonkey-3.1.6.tar.bz2 2886916 SHA256 1b36b57c05a83c2e363c085bf8e80630884c6c92ecdeffc1ad5e1c39a98e043d SHA512 d0c7256c7c43934bc132183cfe0c8d85c61a874e295b86ba989f43fd4d9f3672bdf18439a9fefce52c30a6a8df08a5a464dcc21d4bf199d1b502fa344683081a WHIRLPOOL 1d5b6118dbe25fc3aad2cf9d57808cfc4c5466b4bb6b5c590c4541fdd400de0cf7ac55616f224eee763d88e08b03af26d873d9b6bf679808f7b5ade285f4d6d2
+EBUILD mldonkey-3.1.5-r1.ebuild 4405 SHA256 1db6bfbd02ad0b2daa093239f6f490d8de06a738a06c825bf892f59875cbdcab SHA512 0336f99f282cd2b1bfe318f2a09c533fc498b24f5c8af129bdb50bb4fe8c76bf249daaff8ddefba2ffb0d52677300468a32c6a96f42549e952f1117521cc7d3d WHIRLPOOL 0ab514b7fae99d98ffe1e5a32fe6420982c427682d484f6ea1a8123808b7ddafe7333d8d0a529b391cabef37be34eb74290706e8fcb2baf5813dbbeab6bab7ad
+EBUILD mldonkey-3.1.6-r1.ebuild 4505 SHA256 4bd75404bf0ffde60b3a91d04643e44f30e3753d38bdcffc3e258c5b5b06458d SHA512 5e653a7f07625c3894941dd3a8e71dd36039f867e584888a5f0d6aaa17723f393bbe86552c0f4373eb95b58e26dc05c885add6932ddaa57aeefa6f31624c585e WHIRLPOOL 0ca42224ab057db0876bec155ec7fd7f7e4f6a0ef1618d6485bed214eae075ed626841f41ca8a8d3f7aa1875aa90c7d0a8a9d921cd68ba86220a7a25f069da23
+EBUILD mldonkey-3.1.6.ebuild 4379 SHA256 807660378f2f72a28d8c6b3d82a68e42f7f84c8698fc902ffacafe126849302e SHA512 bb905d69f042ca25c34065f131bb646ecfc64343eada6a244100e79093f66578038af3654342b25c43595e7a14fb56615557b87424c191afc3d4ec058381e726 WHIRLPOOL e9d28ab4c2dde504fcfe68b22507b512c978b80bf012df8b16c59201ef5a8c4e6c8613d1491a7abcbfbd98e10c9b216d7aceeb6a61bfb75e716589acd73e66db
+MISC ChangeLog 4453 SHA256 b58d7acbd22018080feb470ce49ff1587adcbc77e3f1cf28f821a1c7b6a9923f SHA512 44af6c7d1fa2f250eb85466336ec704bd031075e845d6bac50a3d0653394b21788411cdc1eb7cb2d85247ffaa8b229afbe99a5de253b768c1407564128b3dc64 WHIRLPOOL c97ff5dcbfbc42b99042e3333db0247268f514246c5c9ac026f1febf8b1f3da3df1fbb25f51db023a622a007b3d4d410c086791b629972183cdfd1fc9965294f
+MISC ChangeLog-2015 39071 SHA256 c1ed6b1aec282601df4c8ba44349a435b42881e8daca5777f1403255561532d7 SHA512 cb3f49538750c65a410db4b61c689d8b2e1412bf7b5ce4f2a7f5a6b0157fd1c800424f1e7a03cf9bdd779c791df84d9942d6c60a9553cb45ff5cee6a16198c29 WHIRLPOOL ad788fc24545330a172b3522b91457b60546eb1471140bacbc0fc8b3bae4e60fcc4a068428359eea3edfb0fac83b50e0888042a789d152f0172aab47f6889084
+MISC metadata.xml 793 SHA256 cbf13265cfecc4eaca51c4f317f1ef3c48925b230933cf4bece91f67858e3fcf SHA512 faff7076c4e3f4c6e0972ee0f0ff1a667dc44dd5bce6444b76723c6c3c151633c2598bf2ba3fd12ba64232a7de6d56f46bb1da014b26db7b544cd4cabff2b4e8 WHIRLPOOL e7925741edb0b2fab1562be4e056747ad388a200b9e8cd24ebef9886e8de498a46fec6366661e18f0309d33456e74dd9a3b3c9ee3d871aa818783a6cac44759b
diff --git a/net-p2p/mldonkey/files/mldonkey.confd-2.8 b/net-p2p/mldonkey/files/mldonkey.confd-2.8
new file mode 100644
index 000000000000..1d1f282234f7
--- /dev/null
+++ b/net-p2p/mldonkey/files/mldonkey.confd-2.8
@@ -0,0 +1,39 @@
+# /etc/conf.d/mldonkey
+# Config file for mldonkey control script
+
+# Change the following vars only if you know
+# what you're doing, there's no checking for
+# invalid data yet!
+
+# owner of mlnet process (don't change, must be existing)
+USER="p2p"
+
+# mldonkey's working dir (must be existing)
+MLDONKEY_DIR="/home/p2p/mldonkey"
+
+# logfile (/dev/null for nowhere)
+LOG="/var/log/mldonkey.log"
+
+# set to true, if you have enabled logging to syslog in MLDonkey with
+# set log_to_syslog true
+USE_LOGGER=false
+
+# bandwidth control, values in kb/s
+LOW_DOWN="6"
+LOW_UP="2"
+HIGH_DOWN="30"
+HIGH_UP="10"
+
+# nice level, 0<x<19, more nice -> less cpuspeed consumed
+NICE="19"
+
+# mldonkey server ip, usually localhost
+SERVER="localhost"
+
+# port for webinterface, usually 4080
+PORT="4080"
+
+# to enable password restricted access,
+# uncomment and set BOTH following vars:
+#USERNAME="admin"
+#PASSWORD=""
diff --git a/net-p2p/mldonkey/files/mldonkey.initd b/net-p2p/mldonkey/files/mldonkey.initd
new file mode 100644
index 000000000000..12dd599de7be
--- /dev/null
+++ b/net-p2p/mldonkey/files/mldonkey.initd
@@ -0,0 +1,121 @@
+#!/sbin/openrc-run
+
+extra_started_commands="reload slow fast info"
+
+MLDONKEY_BINARY=${MLDONKEY_BINARY:-/usr/bin/mlnet}
+MLDONKEY_TIMEOUT=${TIMEOUT:-10}
+
+depend() {
+ need localmount net
+ ${USE_LOGGER} && use logger
+}
+
+start() {
+ if [ -z "${MLDONKEY_DIR}" ]; then
+ ewarn "mldonkey's start script has been changed. You should remove"
+ ewarn "BASEDIR and SUBDIR from /etc/conf.d/mldonkey and set MLDONKEY_DIR"
+ ewarn "to the correct value (you probably want"
+ ewarn "MLDONKEY_DIR=${BASEDIR}/${SUBDIR})"
+ MLDONKEY_DIR="${BASEDIR}/${SUBDIR}"
+ einfo "Using ${MLDONKEY_DIR} as working directory"
+ fi
+
+ if [ ! -d "${MLDONKEY_DIR}" ]; then
+ ebegin "Directory ${MLDONKEY_DIR} not existing, trying to create..."
+ mkdir -p "${MLDONKEY_DIR}" && chown ${USER}:users "${MLDONKEY_DIR}"
+ eend $? || return 1
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ cd "${MLDONKEY_DIR}"
+ export MLDONKEY_DIR
+ start-stop-daemon --start --user "${USER}" --nice "${NICE}" \
+ --exec "${MLDONKEY_BINARY}" --pidfile /var/run/"${SVCNAME}".pid \
+ --background --make-pidfile
+ eend $?
+}
+
+setup_uri() {
+ BASE="http://"
+ if [ -n "${USERNAME}" -a -n "${PASSWORD}" ]; then
+ BASE="${BASE}${USERNAME}:${PASSWORD}@"
+ fi
+ BASE="${BASE}${SERVER}:${PORT}"
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME} -- please wait"
+
+ setup_uri
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=close_fds -q
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=save -q
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" "${BASE}"/submit?q=kill -q
+
+ # give it a chance to die:
+ local timeout=${MLDONKEY_TIMEOUT}
+ while [ $timeout -gt 0 ]; do
+ if ! start-stop-daemon --test --quiet --stop \
+ --exec "${MLDONKEY_BINARY}" \
+ --pidfile /var/run/"${SVCNAME}".pid ; then
+ eend 0
+ return 0
+ fi
+ sleep 1
+ timeout=$((${timeout} - 1))
+ done
+
+ eend 1 "Failed to cleanly stop ${SVCNAME}"
+ ebegin "Forcing ${SVCNAME} to stop"
+ start-stop-daemon --stop --exec "${MLDONKEY_BINARY}" \
+ --pidfile /var/run/"${SVCNAME}".pid
+ eend $?
+}
+
+# This doesn't work for baselayout-2
+restart() {
+ svc_stop
+ sleep 5
+ svc_start
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --stop --signal HUP --oknodo \
+ --exec "${MLDONKEY_BINARY}" --pidfile /var/run/"${SVCNAME}".pid
+ eend $?
+}
+
+slow() {
+ ebegin "Reducing bandwidth to ${LOW_DOWN}k/${LOW_UP}k"
+ setup_uri
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
+ "${BASE}/submit?q=set+max_hard_download_rate+${LOW_DOWN}" -q
+ wget --spider --timeout=${MLDONKEY_TIMEOUT} \
+ "${BASE}/submit?q=set+max_hard_upload_rate+${LOW_UP}" -q
+ eend $?
+}
+
+fast() {
+ ebegin "Increasing bandwidth to ${HIGH_DOWN}k/${HIGH_UP}k"
+
+ setup_uri
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
+ "${BASE}/submit?q=set+max_hard_upload_rate+${HIGH_UP}" -q
+ wget --spider --timeout="${MLDONKEY_TIMEOUT}" \
+ "${BASE}/submit?q=set+max_hard_download_rate+${HIGH_DOWN}" -q
+ eend $?
+}
+
+
+info() {
+ setup_uri
+ local result=$(wget --timeout="${MLDONKEY_TIMEOUT}" \
+ -O - "${BASE}"/submit?q=vo 2>/dev/null | \
+ grep -C1 max_hard_upload | \
+ grep value=\" | cut -d\" -f2)
+ if [ "${result}" = "${LOW_UP}" ]; then
+ einfo "${SVCNAME} runs slow"
+ else
+ einfo "${SVCNAME} runs fast"
+ fi
+}
diff --git a/net-p2p/mldonkey/files/ocaml-4.03.patch b/net-p2p/mldonkey/files/ocaml-4.03.patch
new file mode 100644
index 000000000000..fce94c851e2d
--- /dev/null
+++ b/net-p2p/mldonkey/files/ocaml-4.03.patch
@@ -0,0 +1,145 @@
+Index: mldonkey-3.1.5/src/config/unix/os_stubs_c.c
+===================================================================
+--- mldonkey-3.1.5.orig/src/config/unix/os_stubs_c.c
++++ mldonkey-3.1.5/src/config/unix/os_stubs_c.c
+@@ -66,7 +66,7 @@ ssize_t os_read(OS_FD fd, char *buf, siz
+
+ void os_ftruncate(OS_FD fd, OFF_T len, /* bool */ int sparse)
+ {
+- int64 cursize;
++ int64_t cursize;
+ if(!fd) failwith("ftruncate32: file is closed");
+
+ cursize = os_getfdsize(fd);
+@@ -109,7 +109,7 @@ int os_getdtablesize()
+
+ *******************************************************************/
+
+-int64 os_getfdsize(OS_FD fd)
++int64_t os_getfdsize(OS_FD fd)
+ {
+ struct stat buf;
+
+@@ -127,7 +127,7 @@ int64 os_getfdsize(OS_FD fd)
+
+ *******************************************************************/
+
+-int64 os_getfilesize(char *path)
++int64_t os_getfilesize(char *path)
+ {
+ struct stat buf;
+
+Index: mldonkey-3.1.5/src/networks/donkey/donkeyGlobals.ml
+===================================================================
+--- mldonkey-3.1.5.orig/src/networks/donkey/donkeyGlobals.ml
++++ mldonkey-3.1.5/src/networks/donkey/donkeyGlobals.ml
+@@ -781,7 +781,6 @@ let set_client_name c name md4 =
+ c.client_md4 <- md4;
+ end
+
+-exception ClientFound of client
+ let find_client_by_name name =
+ try
+ H.iter (fun c ->
+Index: mldonkey-3.1.5/src/utils/cdk/zip.ml
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/cdk/zip.ml
++++ mldonkey-3.1.5/src/utils/cdk/zip.ml
+@@ -72,8 +72,6 @@ type out_file =
+ mutable of_entries: entry list;
+ of_comment: string }
+
+-exception Error of string * string * string
+-
+ (* Return the position of the last occurrence of s1 in s2, or -1 if not
+ found. *)
+
+Index: mldonkey-3.1.5/src/utils/cdk/zlibstubs.c
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/cdk/zlibstubs.c
++++ mldonkey-3.1.5/src/utils/cdk/zlibstubs.c
+@@ -191,7 +191,7 @@ value camlzip_inflateEnd(value vzs)
+
+ value camlzip_update_crc32(value crc, value buf, value pos, value len)
+ {
+- return copy_int32(crc32((uint32) Int32_val(crc),
++ return copy_int32(crc32((uint32_t) Int32_val(crc),
+ &Byte_u(buf, Long_val(pos)),
+ Long_val(len)));
+ }
+Index: mldonkey-3.1.5/src/utils/lib/fst_hash.c
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/lib/fst_hash.c
++++ mldonkey-3.1.5/src/utils/lib/fst_hash.c
+@@ -197,7 +197,7 @@ unsigned short fst_hash_checksum (unsign
+ /*****************************************************************************/
+
+ // hash file
+-int fst_hash_file (unsigned char *fth, char *file, int64 filesize)
++int fst_hash_file (unsigned char *fth, char *file, int64_t filesize)
+ {
+ FILE *fp;
+ unsigned char *buf;
+@@ -271,7 +271,7 @@ int fst_hash_file (unsigned char *fth, c
+ }
+
+
+-void fst_hash_string (unsigned char *fth, unsigned char *file, int64 filesize)
++void fst_hash_string (unsigned char *fth, unsigned char *file, int64_t filesize)
+ {
+ unsigned char * buf = file;
+ size_t len = filesize;
+Index: mldonkey-3.1.5/src/utils/lib/options.ml4
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/lib/options.ml4
++++ mldonkey-3.1.5/src/utils/lib/options.ml4
+@@ -332,7 +332,6 @@ let exit_exn = Exit
+
+
+ let unsafe_get = String.unsafe_get
+-external is_printable : char -> bool = "caml_is_printable"
+ let unsafe_set = String.unsafe_set
+
+ let escaped s =
+@@ -343,7 +342,7 @@ let escaped s =
+ (match unsafe_get s i with
+ '"' | '\\' -> 2
+ | '\n' | '\t' -> 1
+- | c -> if is_printable c then 1 else 4)
++ | c -> 1)
+ done;
+ if !n = String.length s then s
+ else
+@@ -354,16 +353,7 @@ let escaped s =
+ '"' | '\\' as c -> unsafe_set s' !n '\\'; incr n; unsafe_set s' !n c
+ | '\n' | '\t' as c -> unsafe_set s' !n c
+ | c ->
+- if is_printable c then unsafe_set s' !n c
+- else
+- let a = int_of_char c in
+- unsafe_set s' !n '\\';
+- incr n;
+- unsafe_set s' !n (char_of_int (48 + a / 100));
+- incr n;
+- unsafe_set s' !n (char_of_int (48 + a / 10 mod 10));
+- incr n;
+- unsafe_set s' !n (char_of_int (48 + a mod 10))
++ unsafe_set s' !n c
+ end;
+ incr n
+ done;
+Index: mldonkey-3.1.5/src/utils/lib/os_stubs.h
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/lib/os_stubs.h
++++ mldonkey-3.1.5/src/utils/lib/os_stubs.h
+@@ -155,8 +155,8 @@ extern OFF_T os_lseek(OS_FD fd, OFF_T po
+ extern void os_ftruncate(OS_FD fd, OFF_T len, int sparse);
+ extern ssize_t os_read(OS_FD fd, char *buf, size_t len);
+ extern int os_getdtablesize();
+-extern int64 os_getfdsize(OS_FD fd);
+-extern int64 os_getfilesize(char *path);
++extern int64_t os_getfdsize(OS_FD fd);
++extern int64_t os_getfilesize(char *path);
+ extern void os_set_nonblock(OS_SOCKET fd);
+ extern void os_uname(char buf[]);
+ extern int os_os_supported();
diff --git a/net-p2p/mldonkey/files/ocaml4.patch b/net-p2p/mldonkey/files/ocaml4.patch
new file mode 100644
index 000000000000..32882417b62c
--- /dev/null
+++ b/net-p2p/mldonkey/files/ocaml4.patch
@@ -0,0 +1,12 @@
+Index: mldonkey-3.1.5/src/utils/net/terminal.ml
+===================================================================
+--- mldonkey-3.1.5.orig/src/utils/net/terminal.ml
++++ mldonkey-3.1.5/src/utils/net/terminal.ml
+@@ -185,7 +185,6 @@ module Output = struct
+ let canal = List.assoc chan !chanmap in
+ etat.chan <- Some (chan, canal);
+ info (sprintf "connecte au canal '%s'" chan);
+- (* {| canal ALL } *)
+ with Not_found -> (* pas encore de recepteur pour ce canal *)
+ try (* on en cree un *)
+ let serveur = nsrecord.get_loc chan in
diff --git a/net-p2p/mldonkey/metadata.xml b/net-p2p/mldonkey/metadata.xml
new file mode 100644
index 000000000000..6cefea4a1841
--- /dev/null
+++ b/net-p2p/mldonkey/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+ </maintainer>
+ <longdescription>An ocaml client to access the eDonkey network.</longdescription>
+ <use>
+ <flag name="bittorrent">enable bittorrent support</flag>
+ <flag name="fasttrack">enable fasttrack support</flag>
+ <flag name="gnutella">enable gnutella and gnutella2 support</flag>
+ <flag name="guionly">enable client build only</flag>
+ <flag name="magic">enable use of libmagic</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mldonkey</remote-id>
+ <remote-id type="github">ygrek/mldonkey</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild b/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild
new file mode 100644
index 000000000000..d532cb725f30
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-3.1.5-r1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_AUTOCONF=2.5
+
+inherit flag-o-matic eutils autotools toolchain-funcs user
+
+IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
+
+DESCRIPTION="A multi-network P2P application written in Ocaml, with its own Gtk GUI, web and telnet interface"
+HOMEPAGE="http://mldonkey.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ppc ~sparc x86 ~x86-fbsd"
+
+RDEPEND="dev-lang/perl
+ dev-ml/camlp4:=
+ guionly? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6 )
+ gtk? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6[svg] )
+ gd? ( >=media-libs/gd-2.0.28[truetype] )
+ magic? ( sys-apps/file )"
+
+DEPEND="${RDEPEND}
+ >=dev-lang/ocaml-3.10.2[ocamlopt?]"
+
+MLUSER="p2p"
+
+pkg_setup() {
+ if use gtk; then
+ echo ""
+ einfo "If the compile with gui fails, and you have updated Ocaml"
+ einfo "recently, you may have forgotten that you need to run"
+ einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
+ einfo "to learn which ebuilds you need to recompile"
+ einfo "each time you update Ocaml to a different version"
+ einfo "see the Ocaml ebuild for details"
+ echo ""
+ fi
+
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ cd "${S}"/config
+ eautoconf
+ cd "${S}"
+ use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
+ eapply "${FILESDIR}/ocaml4.patch"
+ has_version '>=dev-lang/ocaml-4.03' && eapply "${FILESDIR}/ocaml-4.03.patch"
+
+ default
+}
+
+src_configure() {
+ # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
+
+ # onlygui Disable all nets support, build only chosen GUI
+
+ if use gtk || use guionly; then
+ myconf="--enable-gui=newgui2"
+ else
+ myconf="--disable-gui"
+ fi
+
+ if use guionly; then
+ myconf="${myconf} --disable-multinet --disable-donkey"
+ fi
+
+ cd "${S}"
+
+ local my_extra_libs
+ if use gd; then
+ my_extra_libs="-lpng"
+ fi
+
+ econf LIBS="${my_extra_libs}"\
+ --sysconfdir=/etc/mldonkey \
+ --sharedstatedir=/var/mldonkey \
+ --localstatedir=/var/mldonkey \
+ --enable-checks \
+ --disable-batch \
+ $(use_enable bittorrent) \
+ $(use_enable fasttrack) \
+ $(use_enable gnutella) \
+ $(use_enable gnutella gnutella2) \
+ $(use_enable gd) \
+ $(use_enable magic) \
+ ${myconf}
+}
+
+src_compile() {
+ export OCAMLRUNPARAM="l=256M"
+ emake
+
+ if ! use guionly; then
+ emake utils
+ fi;
+}
+
+src_install() {
+ local myext=""
+ use ocamlopt || myext=".byte"
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+ if ! use guionly; then
+ for i in mlnet mld_hash get_range copysources subconv; do
+ newbin $i$myext $i
+ done
+ use bittorrent && newbin make_torrent$myext make_torrent
+
+ newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
+ fperms 600 /etc/conf.d/mldonkey
+ newinitd "${FILESDIR}/mldonkey.initd" mldonkey
+ fi
+
+ if use gtk; then
+ for i in mlgui mlguistarter; do
+ newbin $i$myext $i
+ done
+ make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
+ newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
+ fi
+
+ if use doc ; then
+ cd "${S}"/distrib
+ dodoc ChangeLog *.txt
+
+ insinto /usr/share/doc/${PF}/scripts
+ doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
+
+ cd "${S}"/docs
+ dodoc *.txt *.tex *.pdf
+ dohtml *.html
+
+ cd "${S}"/docs/developers
+ dodoc *.txt *.tex
+
+ cd "${S}"/docs/images
+ insinto /usr/share/doc/${PF}/html/images
+ doins *
+ fi
+}
+
+pkg_preinst() {
+ if ! use guionly; then
+ enewuser ${MLUSER} -1 -1 /home/p2p users
+ fi
+}
+
+pkg_postinst() {
+ if ! use guionly; then
+ echo
+ einfo "If you want to start MLDonkey as a system service, use"
+ einfo "the /etc/init.d/mldonkey script. To control bandwidth, use"
+ einfo "the 'slow' and 'fast' arguments. Be sure to have a look at"
+ einfo "/etc/conf.d/mldonkey also."
+ echo
+ else
+ echo
+ einfo "Simply run mlgui to start the chosen MLDonkey gui."
+ einfo "It puts its config files into ~/.mldonkey"
+ fi
+}
diff --git a/net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild b/net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild
new file mode 100644
index 000000000000..3acb3317ffdb
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-3.1.6-r1.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_AUTOCONF=2.5
+
+inherit versionator flag-o-matic eutils autotools toolchain-funcs user
+
+IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt upnp"
+
+DESCRIPTION="A multi-network P2P application written in Ocaml, with its own Gtk GUI, web and telnet interface"
+HOMEPAGE="http://mldonkey.sourceforge.net/"
+SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-$(replace_all_version_separators '-')/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="dev-lang/perl
+ dev-ml/camlp4:=
+ guionly? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6 )
+ gtk? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6[svg] )
+ gd? ( >=media-libs/gd-2.0.28[truetype] )
+ magic? ( sys-apps/file )
+ upnp? ( net-libs/miniupnpc:= net-libs/libnatpmp:= )
+"
+
+DEPEND="${RDEPEND}
+ >=dev-lang/ocaml-3.10.2[ocamlopt?]"
+
+MLUSER="p2p"
+
+pkg_setup() {
+ if use gtk; then
+ echo ""
+ einfo "If the compile with gui fails, and you have updated Ocaml"
+ einfo "recently, you may have forgotten that you need to run"
+ einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
+ einfo "to learn which ebuilds you need to recompile"
+ einfo "each time you update Ocaml to a different version"
+ einfo "see the Ocaml ebuild for details"
+ echo ""
+ fi
+
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ cd "${S}"/config
+ eautoconf
+ cd "${S}"
+ use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
+
+ default
+}
+
+src_configure() {
+ # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
+
+ # onlygui Disable all nets support, build only chosen GUI
+
+ if use gtk || use guionly; then
+ myconf="--enable-gui=newgui2"
+ else
+ myconf="--disable-gui"
+ fi
+
+ if use guionly; then
+ myconf="${myconf} --disable-multinet --disable-donkey"
+ fi
+
+ cd "${S}"
+
+ local my_extra_libs
+ if use gd; then
+ my_extra_libs="-lpng"
+ fi
+
+ econf LIBS="${my_extra_libs}"\
+ --sysconfdir=/etc/mldonkey \
+ --sharedstatedir=/var/mldonkey \
+ --localstatedir=/var/mldonkey \
+ --enable-checks \
+ --disable-batch \
+ $(use_enable bittorrent) \
+ $(use_enable fasttrack) \
+ $(use_enable gnutella) \
+ $(use_enable gnutella gnutella2) \
+ $(use_enable gd) \
+ $(use_enable magic) \
+ $(use_enable upnp upnp-natpmp) \
+ --disable-force-upnp-natpmp \
+ ${myconf}
+}
+
+src_compile() {
+ export OCAMLRUNPARAM="l=256M"
+ emake
+
+ if ! use guionly; then
+ emake utils
+ fi;
+}
+
+src_install() {
+ local myext=""
+ use ocamlopt || myext=".byte"
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+ if ! use guionly; then
+ for i in mlnet mld_hash get_range copysources subconv; do
+ newbin $i$myext $i
+ done
+ use bittorrent && newbin make_torrent$myext make_torrent
+
+ newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
+ fperms 600 /etc/conf.d/mldonkey
+ newinitd "${FILESDIR}/mldonkey.initd" mldonkey
+ fi
+
+ if use gtk; then
+ for i in mlgui mlguistarter; do
+ newbin $i$myext $i
+ done
+ make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
+ newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
+ fi
+
+ if use doc ; then
+ cd "${S}"/distrib
+ dodoc ChangeLog *.txt
+
+ insinto /usr/share/doc/${PF}/scripts
+ doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
+
+ cd "${S}"/docs
+ dodoc *.txt *.tex *.pdf
+ dohtml *.html
+
+ cd "${S}"/docs/developers
+ dodoc *.txt *.tex
+
+ cd "${S}"/docs/images
+ insinto /usr/share/doc/${PF}/html/images
+ doins *
+ fi
+}
+
+pkg_preinst() {
+ if ! use guionly; then
+ enewuser ${MLUSER} -1 -1 /home/p2p users
+ fi
+}
+
+pkg_postinst() {
+ if ! use guionly; then
+ echo
+ einfo "If you want to start MLDonkey as a system service, use"
+ einfo "the /etc/init.d/mldonkey script. To control bandwidth, use"
+ einfo "the 'slow' and 'fast' arguments. Be sure to have a look at"
+ einfo "/etc/conf.d/mldonkey also."
+ echo
+ else
+ echo
+ einfo "Simply run mlgui to start the chosen MLDonkey gui."
+ einfo "It puts its config files into ~/.mldonkey"
+ fi
+}
diff --git a/net-p2p/mldonkey/mldonkey-3.1.6.ebuild b/net-p2p/mldonkey/mldonkey-3.1.6.ebuild
new file mode 100644
index 000000000000..82f88b95c717
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-3.1.6.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_AUTOCONF=2.5
+
+inherit versionator flag-o-matic eutils autotools toolchain-funcs user
+
+IUSE="bittorrent doc fasttrack gd gnutella gtk guionly magic +ocamlopt"
+
+DESCRIPTION="A multi-network P2P application written in Ocaml, with its own Gtk GUI, web and telnet interface"
+HOMEPAGE="http://mldonkey.sourceforge.net/"
+SRC_URI="https://github.com/ygrek/mldonkey/releases/download/release-$(replace_all_version_separators '-')/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
+
+RDEPEND="dev-lang/perl
+ dev-ml/camlp4:=
+ guionly? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6 )
+ gtk? ( >=gnome-base/librsvg-2.4.0
+ >=dev-ml/lablgtk-2.6[svg] )
+ gd? ( >=media-libs/gd-2.0.28[truetype] )
+ magic? ( sys-apps/file )"
+
+DEPEND="${RDEPEND}
+ >=dev-lang/ocaml-3.10.2[ocamlopt?]"
+
+MLUSER="p2p"
+
+pkg_setup() {
+ if use gtk; then
+ echo ""
+ einfo "If the compile with gui fails, and you have updated Ocaml"
+ einfo "recently, you may have forgotten that you need to run"
+ einfo "/usr/portage/dev-lang/ocaml/files/ocaml-rebuild.sh"
+ einfo "to learn which ebuilds you need to recompile"
+ einfo "each time you update Ocaml to a different version"
+ einfo "see the Ocaml ebuild for details"
+ echo ""
+ fi
+
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ cd "${S}"/config
+ eautoconf
+ cd "${S}"
+ use ocamlopt || sed -i -e "s/ocamlopt/idontwantocamlopt/g" "${S}/config/configure" || die "failed to disable ocamlopt"
+
+ default
+}
+
+src_configure() {
+ # the dirs are not (yet) used, but it doesn't hurt to specify them anyway
+
+ # onlygui Disable all nets support, build only chosen GUI
+
+ if use gtk || use guionly; then
+ myconf="--enable-gui=newgui2"
+ else
+ myconf="--disable-gui"
+ fi
+
+ if use guionly; then
+ myconf="${myconf} --disable-multinet --disable-donkey"
+ fi
+
+ cd "${S}"
+
+ local my_extra_libs
+ if use gd; then
+ my_extra_libs="-lpng"
+ fi
+
+ econf LIBS="${my_extra_libs}"\
+ --sysconfdir=/etc/mldonkey \
+ --sharedstatedir=/var/mldonkey \
+ --localstatedir=/var/mldonkey \
+ --enable-checks \
+ --disable-batch \
+ $(use_enable bittorrent) \
+ $(use_enable fasttrack) \
+ $(use_enable gnutella) \
+ $(use_enable gnutella gnutella2) \
+ $(use_enable gd) \
+ $(use_enable magic) \
+ ${myconf}
+}
+
+src_compile() {
+ export OCAMLRUNPARAM="l=256M"
+ emake
+
+ if ! use guionly; then
+ emake utils
+ fi;
+}
+
+src_install() {
+ local myext=""
+ use ocamlopt || myext=".byte"
+ use ocamlopt || export STRIP_MASK="*/bin/*"
+ if ! use guionly; then
+ for i in mlnet mld_hash get_range copysources subconv; do
+ newbin $i$myext $i
+ done
+ use bittorrent && newbin make_torrent$myext make_torrent
+
+ newconfd "${FILESDIR}/mldonkey.confd-2.8" mldonkey
+ fperms 600 /etc/conf.d/mldonkey
+ newinitd "${FILESDIR}/mldonkey.initd" mldonkey
+ fi
+
+ if use gtk; then
+ for i in mlgui mlguistarter; do
+ newbin $i$myext $i
+ done
+ make_desktop_entry mlgui "MLDonkey GUI" mldonkey "Network;P2P"
+ newicon "${S}"/packages/rpm/mldonkey-icon-48.png ${PN}.png
+ fi
+
+ if use doc ; then
+ cd "${S}"/distrib
+ dodoc ChangeLog *.txt
+
+ insinto /usr/share/doc/${PF}/scripts
+ doins kill_mldonkey mldonkey_command mldonkey_previewer make_buginfo
+
+ cd "${S}"/docs
+ dodoc *.txt *.tex *.pdf
+ dohtml *.html
+
+ cd "${S}"/docs/developers
+ dodoc *.txt *.tex
+
+ cd "${S}"/docs/images
+ insinto /usr/share/doc/${PF}/html/images
+ doins *
+ fi
+}
+
+pkg_preinst() {
+ if ! use guionly; then
+ enewuser ${MLUSER} -1 -1 /home/p2p users
+ fi
+}
+
+pkg_postinst() {
+ if ! use guionly; then
+ echo
+ einfo "If you want to start MLDonkey as a system service, use"
+ einfo "the /etc/init.d/mldonkey script. To control bandwidth, use"
+ einfo "the 'slow' and 'fast' arguments. Be sure to have a look at"
+ einfo "/etc/conf.d/mldonkey also."
+ echo
+ else
+ echo
+ einfo "Simply run mlgui to start the chosen MLDonkey gui."
+ einfo "It puts its config files into ~/.mldonkey"
+ fi
+}
diff --git a/net-p2p/multibit/Manifest b/net-p2p/multibit/Manifest
new file mode 100644
index 000000000000..fadb2b3e613a
--- /dev/null
+++ b/net-p2p/multibit/Manifest
@@ -0,0 +1,7 @@
+AUX auto-install.xml 862 SHA256 bbff8cbc64138bda862d34df6ef857024ccfa658ea22123b57468a558876e2e1 SHA512 54b1744d6efb74c9afad771fbab7f293ab102e7f5948ae9c47af60e5bb385419efcdce074795fb633a33d3f358d3814aa368ae7f600c55bcab791d30d6c0895f WHIRLPOOL 6efd75de5537753459d3e77054364a8b3af442b2f9306d720b1104be77b0a34be1c0aa077cf8887a2a5de189282a7fa447dd1fc7ae3b95dfce22c3fd993217d0
+AUX multibit 81 SHA256 40e5aba42864e56922c702a7c1a2d303e19d409f6c1995e5c7319ba86e3b04a1 SHA512 05a87d14a45478a677691b1318777f484892afe88f67ee0e0768273c78ef95b7ba10171db79fa27688944e253ddf572f8b2d7dc61f807a57366cbdb0cbf1b84c WHIRLPOOL b282252d81b42c5af18c24be829953fdb0bb799ff3efa8fa6e20e68de4e9de5c67abaf2a9206b3db723d15d10d6fe5e083a3231f9b177e42151d5f39773d2c7d
+DIST multibit-0.5.18-linux.jar 7993916 SHA256 a067c9638edfdf39f3e9fa154b0c6d8cfb7c58c0edd95a02c0ca903160ca3aad SHA512 788910b4a8b27f345df2cc58f8641a34d038091ffcddd69eca07c9452ed406113cf70479e6214ea52f39536d8eb21b34ecb7ab359868199223b2796b50b1b561 WHIRLPOOL d75467437d0d6eb744fce183071c1197386481ffc905d6abb02a31a6725b1e2b61c388815e0839b2120bd37029e9bf8ae76aa4ed5980ff30fb2abc041ec80549
+EBUILD multibit-0.5.18.ebuild 838 SHA256 53688c7315e40382f2953c9490b2db9cb1780ce164090b32f841ca76bc9562d9 SHA512 17919a04057e0627305fa6f4db766fc3e62c6666b5f937617813514c5480425c4837c2124b660e7be5f955e4b7cfa619cc1922af342fe3ee27f33a2e6c7c11e2 WHIRLPOOL 5b8e14466a9c6e80a36a1ea1f1b7b7fe653937bf8fbd6795878c722e0c7c0a16bedc59d9a3b7de91232d38a1fe7f3309f9655fd3c974133b3dea7162b36040f7
+MISC ChangeLog 2339 SHA256 43fedf3e033c47ae37d56cb5dc0aa9babd77e2ddb10fb6af7ad49246924782ad SHA512 4ab0b0ae53dee22534713f00cbea85e7cbb9773a9c2f094f32700364f683f2531b6c7be3b80b640a5ae27239ad9679559cc18a4acfddc465eca5fc9048b3680d WHIRLPOOL 9c0487cb4caf8a1ac804a84b38471d2a6db3ba79ac1526407b00af1be055d7c7d98ebda30ac9d68a18c66fd69b807fe62047c1497fd995e994d193fb6ca50c01
+MISC ChangeLog-2015 1053 SHA256 9e968772d1109cb76afdaafef435a297048c824ac766a77752521c962f942108 SHA512 f9b613a83ceeef622bf6a387a03610e6232f1ce8b8978e250ed98dfc2830436848783fee5f57ff5dc1329842a1a60cc9a1457ea55df87d313045e9fe48f1f197 WHIRLPOOL af6fe4a631878e95621f7b5e603a21cffd55a87d1684b31e8113be533ae41f50973a8b6b437c1a3761ca24e516a467be419c9fcd75c174610ff4c7f4eaf6b07d
+MISC metadata.xml 252 SHA256 a590e5133cd97a615db4f977b0e28e5c60c56cac76eb3d339109cdf379003b60 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65 WHIRLPOOL b209a730a169969b9e3c4d4612368bc5b30bfa5fae275d98d83ba96fd0ad01d308a8fed4f7d67a7c9fa417c624dfeb23ce89ab58923a8a0b5b1bd68ee73f288c
diff --git a/net-p2p/multibit/files/auto-install.xml b/net-p2p/multibit/files/auto-install.xml
new file mode 100644
index 000000000000..338377b9822b
--- /dev/null
+++ b/net-p2p/multibit/files/auto-install.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<AutomatedInstallation langpack="eng">
+<com.izforge.izpack.panels.HelloPanel id="UNKNOWN (com.izforge.izpack.panels.HelloPanel)"/>
+<com.izforge.izpack.panels.InfoPanel id="UNKNOWN (com.izforge.izpack.panels.InfoPanel)"/>
+<com.izforge.izpack.panels.LicencePanel id="UNKNOWN (com.izforge.izpack.panels.LicencePanel)"/>
+<com.izforge.izpack.panels.TargetPanel id="UNKNOWN (com.izforge.izpack.panels.TargetPanel)">
+<installpath>ED/opt/MultiBit</installpath>
+</com.izforge.izpack.panels.TargetPanel>
+<com.izforge.izpack.panels.ShortcutPanel id="UNKNOWN (com.izforge.izpack.panels.ShortcutPanel)"/>
+<com.izforge.izpack.panels.InstallPanel id="UNKNOWN (com.izforge.izpack.panels.InstallPanel)"/>
+<com.izforge.izpack.panels.FinishPanel id="UNKNOWN (com.izforge.izpack.panels.FinishPanel)"/>
+</AutomatedInstallation>
diff --git a/net-p2p/multibit/files/multibit b/net-p2p/multibit/files/multibit
new file mode 100644
index 000000000000..c0335cac10b8
--- /dev/null
+++ b/net-p2p/multibit/files/multibit
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+/usr/bin/java -jar /opt/MultiBit/multibit-exe.jar >/dev/null 2>&1 &
diff --git a/net-p2p/multibit/metadata.xml b/net-p2p/multibit/metadata.xml
new file mode 100644
index 000000000000..d920e3ba3e56
--- /dev/null
+++ b/net-p2p/multibit/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/multibit/multibit-0.5.18.ebuild b/net-p2p/multibit/multibit-0.5.18.ebuild
new file mode 100644
index 000000000000..7e35c93ba03b
--- /dev/null
+++ b/net-p2p/multibit/multibit-0.5.18.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Secure, lightweight, international Bitcoin wallet written in Java"
+HOMEPAGE="https://multibit.org/"
+SRC_URI="https://multibit.org/releases/${P}/${P}-linux.jar"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=virtual/jre-1.6"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}
+
+src_unpack() { :; }
+
+src_prepare() {
+ cp "${FILESDIR}"/auto-install.xml "${WORKDIR}" || die
+ sed -i "s:ED:${ED}:" auto-install.xml || die
+}
+
+src_install() {
+ dobin "${FILESDIR}"/${PN}
+
+ make_desktop_entry "${PN}" "Multibit" "/opt/MultiBit/multibit48.png" "GNOME;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/multibit;\nTerminal=false"
+
+ java -jar "${DISTDIR}"/${P}-linux.jar auto-install.xml >/dev/null 2>&1
+}
diff --git a/net-p2p/myster/Manifest b/net-p2p/myster/Manifest
new file mode 100644
index 000000000000..531b14e355c4
--- /dev/null
+++ b/net-p2p/myster/Manifest
@@ -0,0 +1,5 @@
+DIST Myster_PR8_Generic.zip 934533 SHA256 5156ea269bbdc565567eadaef1c64efed8863f10818ae2a6fab28611b5d7ed37 SHA512 2b946f72afb5df4b9b1425067669975f7e2aa048c8d798010a286e8d612e819577982663983e78f26c3b72975d3580738347515669fac94fdb32f146700bd018 WHIRLPOOL 25b82d3733c2cd2c1f4320ac79ed593b5adf4af69a3c36ad1f0a1aec73430d1533727a387d7646b48b7128397cf6ef8c0b9443eaa8d98889b9ba453a76ba1e25
+EBUILD myster-8.0-r1.ebuild 556 SHA256 8ad475025ed5dab76150bbe7fcaac5e36b02f522ba0e49cd9e54dd8cbae758cc SHA512 91935bd709bfb1a3e987b3b32d7265f29beaea9ce810ee1e226dc2964c24744d58878defe2294fc2deb42b8f64f71af0cd06c1f6be97b2208b14981e1c286bce WHIRLPOOL 31a2ed855e3d8bf9ca558293689b158e1b0e0486264c468fbfa9b0c8a6ff18cdeaad3c5be944d034cc73bd808af1b6c83394fc8039bfcf16ac97c0a4b8d27194
+MISC ChangeLog 2592 SHA256 f9c2392ef96e337e061ae72f165518a3a9b3721a6a916b225a593a6c2006ff88 SHA512 aab141bd9b6ab8129adf48cedc20dade66a5cd2468f85128decbb4250327cfd61f31c100d208fac82c18d86cc72b29b7fed79ba5bf3de93c4a1a48b1a85ef911 WHIRLPOOL cd5c0a3d847d5876d48e8f5c9a156969233a874508464329adb33f20550e203d1223409a2d9e11de6dff2143fc9f7d39fdb6278bcae12378a62ef1421f208599
+MISC ChangeLog-2015 1404 SHA256 c5ed4ca275f9c68eca29468dd4281885373f63275b6ecca05eeb6351a39f61dd SHA512 dac0bc4178dd16b252c23776dfb4cfd1718bb2c7cfc40d7132ec2fef0ca1f71afc06fb75a7559cdfb5dc5490927bb4ff6af689e54f9407c039d986ad76c3c5d8 WHIRLPOOL ad2a11f4181a759b75812a03baa85b54e82499d70eb499d99e1d3d0f2aa8d71cbb11a0d8e5f2f392b6dffc485c375749cf880ba7c3b89e35f041bac2b00bd174
+MISC metadata.xml 243 SHA256 3c27f1cd8f15f32650f584c96ae9d3f300c3a9e1d298fa0458f726fce6d87cdc SHA512 317828c9fbdae9118b45123ed22f36e2cc6fdc2b26f5ff6b953999881d0f49143023012b37f2119f40169421e84e0afe7cfc0b7833adce31aa96f5615061697d WHIRLPOOL 3797b095c596e5893118675a9d30dad6e08d016f019812cbdb9bedd0761cb22055a3fc2a120a2507d42ed4c867dd315823d4922562537369108cb65de6f48c1c
diff --git a/net-p2p/myster/metadata.xml b/net-p2p/myster/metadata.xml
new file mode 100644
index 000000000000..164317fa5965
--- /dev/null
+++ b/net-p2p/myster/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">myster</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/myster/myster-8.0-r1.ebuild b/net-p2p/myster/myster-8.0-r1.ebuild
new file mode 100644
index 000000000000..c1ad294dc128
--- /dev/null
+++ b/net-p2p/myster/myster-8.0-r1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit java-pkg-2
+
+MY_PV=${PV/.0/}
+DESCRIPTION="Myster is a decentralized file sharing network"
+HOMEPAGE="http://www.mysternetworks.com/"
+SRC_URI="mirror://sourceforge/myster/Myster_PR${MY_PV}_Generic.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.4"
+
+S="${WORKDIR}"
+
+src_install () {
+ insinto /opt/myster
+ doins -r */*
+ java-pkg_regjar "${D}"/opt/myster/*.jar
+ java-pkg_dolauncher ${PN}
+}
diff --git a/net-p2p/ncdc/Manifest b/net-p2p/ncdc/Manifest
new file mode 100644
index 000000000000..0b161bc2290e
--- /dev/null
+++ b/net-p2p/ncdc/Manifest
@@ -0,0 +1,8 @@
+DIST ncdc-1.19.1.tar.gz 354308 SHA256 a6b23381434a47f7134d9ebdf5658fd06768f9b5de498c43e0fa00d1c7229d47 SHA512 36eda8c582ddb40ef732151ecc1654eae927a6a004430d8d27528b3c57ae5e1b06c23a867d8e1624ee4365031325fd7ced2888dd64ff129431bba9ff4171f189 WHIRLPOOL eec4f206ffc15c2389855215c17dada8004200c4eaa5d54bb175296dccccd1fa9518b6a12798c72751896645ea4f77bae58708dee4743bef50c5af98e97af36e
+DIST ncdc-1.20.tar.gz 367688 SHA256 8a998857df6289b6bd44287fc06f705b662098189f2a8fe95b1a5fbc703b9631 SHA512 0f20d6584aab1e69bcb3a93271a8542c5968adee5fd198b375dc258996b60ee5f642eac5d5e91c5513e367bbfd42eda80ede9e6e93ab38279c33e8da557010a7 WHIRLPOOL 19452779f5c7559db27830cf64b079b4f98905fd9b64e98438745800a528867b444151d8d5c0f480083b1d59e73f120934d0a5bc091b815ee7b877158fe65572
+EBUILD ncdc-1.19.1.ebuild 709 SHA256 c31a7627131e1d34d613edc78d0a3e0e10ae6e43c15077d17bf309952a02ce8d SHA512 5f292e933f0760ebeeb29f3ed0d14dbf16d2674bdd102d8ec7128f206988f7afb8d5dad9e7c0794216420330c018185ed16f76dcda631867b6166af211ebbc68 WHIRLPOOL 583c0007cbc65c263a8fa88569d8c9ba5b532ab8a71b99a259367c93b492a65f6fd3dceb6f50ea3a42dd0e1d495db9942d401a37f09f7dc3095caddc5ec27a73
+EBUILD ncdc-1.20.ebuild 647 SHA256 dfa612c367125684afd74b0d8dfd3a41b8b80e1dbe0711d42320d482975f408b SHA512 02fecd8d0ad832f8a71cccd2c757d669fc24341cf2ffe36a07763dedce0275d429760176a2c654f640536e582d0a0020374e806452c0cd7e3f570dd40e16f21f WHIRLPOOL cc6915b43faffd61b3d8b9e29f4a5aa6f1dacce65b03da9f52ebf2e37d00bdd641f28ef948cab626e9c6c5cd02fb45e4e184d2600e97059a29211369afa492fe
+EBUILD ncdc-9999.ebuild 695 SHA256 e0877203ebfbb090c602327203cf87d7289f416f8a17c3eb34864e7897e21328 SHA512 4ae6a63180105862118ef725a994d67dfd6609b5a81401cf4deeddddd42ef810e1d7221167624d779acacd9958bd9759d9440a857d8e3f486f6a77580d500a46 WHIRLPOOL ae0f830b40e45a4b9ee65ec4bd473e7447718a516dc796f16068ac64a32bdab82f33e6578a184c7ffeadad4c141480ddbc50c729ad6c03c79d609e721cf32c57
+MISC ChangeLog 2756 SHA256 1c50cec15f2b009ca2b443937caa1f011a86c2e3e0176c59cbccb469cd8165a3 SHA512 59bbeeb8c980f0f3d72c3a4441ad6b685a535d17b9cc61789a305a57d40f4f00a8f536c58b7a63f1209c6da73061d0f2065e6e7fc1fb0a86882db5d8ad001b4a WHIRLPOOL e45f8865379ee4992a549666ec08d7668822a41be20526abe42342edc783e67ee9be622ac5abcf634635d85a7b95ca1c4fe05d25178945d7945abfedde853249
+MISC ChangeLog-2015 6692 SHA256 ec742498b85729731107f409adabe755b2dd94c7e2d02be85e4e6890c0e1ed17 SHA512 7e789f87d98219923b4226c133ccedc44313818ea87ddaa9252eee648a0bed3f1505c33277f15650c771ce2caa5515b333c138f7c75ff28ea2c24c6e32d79275 WHIRLPOOL 49400a99e1b2704b70189fc9391ea2aa1ea92c275419c11c3a202bed674fc2d71d735f9fb28e0a397fc40e83106b45878e897f7fac6947ff857510e96a6c391d
+MISC metadata.xml 531 SHA256 f5a3124fd688227ab00d0a70b949a68000a9450e3f148a2a47048bdf970cd1c1 SHA512 ca7f8462213f2aa1231d59e9d06b7c4243e994aae888df4cae59620f6297fc8f10c23db119737321c21771f5909e17d48ca5c117e5c684fa330ccc871bcc530a WHIRLPOOL 3203d91806a1a15ea4e5d3e1319abe8df5915f8306acba5931723bc774f007c2ee8bc601d5aeb78bd1b27dd0cac815a1fe935b72a240e961d44631cf6cf6f7f2
diff --git a/net-p2p/ncdc/metadata.xml b/net-p2p/ncdc/metadata.xml
new file mode 100644
index 000000000000..30addd3b6100
--- /dev/null
+++ b/net-p2p/ncdc/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <maintainer status="active">
+ <email>projects@yorhel.nl</email>
+ <name>Yoran Heling</name>
+ </maintainer>
+ <changelog>http://dev.yorhel.nl/ncdc/changes</changelog>
+ <doc lang="en">http://dev.yorhel.nl/ncdc/man</doc>
+ <bugs-to>http://dev.yorhel.nl/ncdc/bug</bugs-to>
+</upstream>
+</pkgmetadata>
diff --git a/net-p2p/ncdc/ncdc-1.19.1.ebuild b/net-p2p/ncdc/ncdc-1.19.1.ebuild
new file mode 100644
index 000000000000..7810c157e08a
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-1.19.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="ncurses directconnect client"
+HOMEPAGE="http://dev.yorhel.nl/ncdc"
+SRC_URI="http://dev.yorhel.nl/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE="geoip"
+
+RDEPEND="app-arch/bzip2
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ net-libs/gnutls
+ sys-libs/ncurses:0[unicode]
+ sys-libs/zlib
+ geoip? ( dev-libs/geoip )"
+DEPEND="${RDEPEND}
+ dev-util/makeheaders
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch_user && eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with geoip)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
diff --git a/net-p2p/ncdc/ncdc-1.20.ebuild b/net-p2p/ncdc/ncdc-1.20.ebuild
new file mode 100644
index 000000000000..6868ec7cf02f
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-1.20.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="ncurses directconnect client"
+HOMEPAGE="http://dev.yorhel.nl/ncdc"
+SRC_URI="http://dev.yorhel.nl/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="geoip"
+
+RDEPEND="app-arch/bzip2
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ net-libs/gnutls
+ sys-libs/ncurses:0[unicode]
+ sys-libs/zlib
+ geoip? ( dev-libs/geoip )"
+DEPEND="${RDEPEND}
+ dev-util/makeheaders
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ $(use_with geoip)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
diff --git a/net-p2p/ncdc/ncdc-9999.ebuild b/net-p2p/ncdc/ncdc-9999.ebuild
new file mode 100644
index 000000000000..b140e9e32b3a
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-9999.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools git-r3 toolchain-funcs
+
+DESCRIPTION="ncurses directconnect client"
+HOMEPAGE="http://dev.yorhel.nl/ncdc"
+EGIT_REPO_URI="git://g.blicky.net/ncdc.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="geoip"
+
+RDEPEND="app-arch/bzip2
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ net-libs/gnutls
+ sys-libs/ncurses:0[unicode]
+ sys-libs/zlib
+ geoip? ( dev-libs/geoip )"
+DEPEND="${RDEPEND}
+ dev-util/makeheaders
+ virtual/pkgconfig"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-git-version \
+ $(use_with geoip)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
diff --git a/net-p2p/nicotine+/Manifest b/net-p2p/nicotine+/Manifest
new file mode 100644
index 000000000000..df0a4d53d2b2
--- /dev/null
+++ b/net-p2p/nicotine+/Manifest
@@ -0,0 +1,5 @@
+DIST nicotine+-1.2.16.tar.bz2 3892006 SHA256 71e5b33e273daaf072dbf63839536c14d7ead9d149323d50eee09f7429e34c1d SHA512 8b5b7f99e14f28f3a1c7a77fc12662cfafa0f9ac9d3c8c2a2d1e959f96a9161005a29ad2ed07fa07ea8908b88f247f3c120b299e7183a0558994b5e96cb47f78 WHIRLPOOL 0c650df11e6f6e1c8d94f863bcb00c84f7a92a13c754977d04d1664066b64fd4b95d824001046b36299f7a53493e418562d23f6ac25c0c91ceace95a024571fb
+EBUILD nicotine+-1.2.16-r1.ebuild 1140 SHA256 d1375827f7564fa27359440bf63183532b791cb4a25f8370f21a6eebd6fc5fb0 SHA512 b39c85a70c2c460d12b74653e9c2822aa63eca9a1976bf9cb308eb8df532808ecb5fc7869afd279244833dbfb0a4431219ac4ea4c8ec0976d50b485479cd96cb WHIRLPOOL f207ad7b8dd711a44accdbe24fd82b7c1d81df837b21c1853fc165e095160084304ef9038ac3ee2284b24dc1efc7746c27a9f1e847fbc1894f1e50db1754bd4c
+MISC ChangeLog 2929 SHA256 80299e786a84b0da34ccf8f6f39f9af5fa121c52d80a529c33819531e1b50e05 SHA512 ef3de2917f4885acf48d5af0897d1c3230e788beb976f3c097c049f6b5912a0524dde8721e025627cc3afb46d68d81ad46f0fc2692d8094911d2085d0e3e8908 WHIRLPOOL 4522f3f64c890250e6ac6a6a8498e6e78bd034c036cc27aa566fae8cb21e78ada5cce9fa312d02a0c3be597f528c4702661adab546c89a9c1e46b1423b522746
+MISC ChangeLog-2015 7980 SHA256 69177019b45e2b891dcf4f035af28c92eb292a1fc6e4460c3c45694814d37ba1 SHA512 d0f25b503706db1dfb89da9288b850bb0eb8219fa9ed6a190b624906ce2a0f034c766b55a6391540747626fcf58ea1df1256b610043c650253711cd8ae26aa53 WHIRLPOOL eaedeb2e0807beaa3d48d63055ba4ed64ba61885cf0beae9dbd6b62f5f23070079bfebe03eebcea6227d68c189db7c2ed52984f0c83ed60d2207a1f127f11d51
+MISC metadata.xml 385 SHA256 8c688115c1bff9e36c7c966eb6ae5a5bd7df7e42e895768ce646d04d7fc7021c SHA512 4dbfebf58c7933eb8302e4589c30c216acd3bc3aa2ae4d2a39601aeba81bc2cfcc0a0c1a3575ef160c5517a0de077fb1a9aaeb42612a2a40d2a5c86502d645f8 WHIRLPOOL da673ee5fdb66d9b60c8462fff3430a2579553369ae9de79662c7b3e869f7e76e206cc8c18dcfaa95542ec3c87502665d400579822a16b31ce3b89a99b78f62e
diff --git a/net-p2p/nicotine+/metadata.xml b/net-p2p/nicotine+/metadata.xml
new file mode 100644
index 000000000000..cd1dc3168b44
--- /dev/null
+++ b/net-p2p/nicotine+/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">eLvErDe/nicotine-plus</remote-id>
+ <remote-id type="sourceforge">nicotine-plus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild b/net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild
new file mode 100644
index 000000000000..dd2b659a0647
--- /dev/null
+++ b/net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A fork of nicotine, a Soulseek client in Python"
+HOMEPAGE="http://nicotine-plus.sourceforge.net"
+SRC_URI="mirror://sourceforge/nicotine-plus/${P}.tar.bz2"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=dev-python/pygtk-2.12[${PYTHON_USEDEP}]
+ gnome-base/librsvg"
+
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ distutils-r1_src_prepare
+ sed -i -e 's:\(Icon=\).*:\1nicotine-plus-32px:' \
+ "${S}"/files/nicotine.desktop
+}
+
+src_install() {
+ distutils-r1_src_install
+ python_fix_shebang "${D}"
+ dosym nicotine.py /usr/bin/nicotine
+}
+
+pkg_postinst() {
+ echo
+ elog "You may want to install these packages to add additional features"
+ elog "to Nicotine+:"
+ elog
+ elog "dev-python/geoip-python Country lookup and flag display"
+ elog "media-libs/mutagen Media metadata extraction"
+ elog "net-libs/miniupnpc UPnP portmapping"
+ echo
+}
diff --git a/net-p2p/opendchub/Manifest b/net-p2p/opendchub/Manifest
new file mode 100644
index 000000000000..0f2748a72833
--- /dev/null
+++ b/net-p2p/opendchub/Manifest
@@ -0,0 +1,7 @@
+AUX opendchub-0.8.2-telnet.patch 380 SHA256 cfbb0c34409698600df55be0de69438549cf13fe7141df9d5edc7695a1bea15f SHA512 3ccbc970544c37f545dde60286ef575160d9d4bda047f5e33b57f9e332d854dab51cb34dba7f253524a1cc87086c6034940bd1250a30af26099944d99c67d271 WHIRLPOOL 5f61163958b4cf406e7a66cf157a3805740fa6e4143799f815b047d93e4414b50e9e95e6f1333bf642cbf5e302739e09cee3f6fa438a955fc6ad14d8d9972a33
+AUX opendchub_setup.sh 556 SHA256 d6c58be3ca59002265fe7489ed53ad847f26fa3a353a478b6ae9782cad7bd4c6 SHA512 392b0cca686b8a8ba43eeca43b109616ef29af38ffec1ae02e0a10fb45986a3f6141485dca708abe103080b9a38c867b0120bcf9cd83deb8f6c220b919ae29eb WHIRLPOOL 5e6f181db5ccea0c21c4c9cc1d683968aeb38236d730ad110969acda838e7f3c3858fc541c9c5c49c1179f9b99801fa78145c7f93aa34b7cc32934df3792dc1e
+DIST opendchub-0.8.2.tar.gz 188551 SHA256 c00d5859fde939741699026da9d4d5fd0b409474608353710204c3c78a8ac5bf SHA512 ccb8c5c44ee1e2f4704d681a2f4e0f9fe4035f1984744ca40665abbaa41e8faa7a03b96fe39ca47c9683b4f64b4e833c186681090ac80d82202e7f68e6cb52df WHIRLPOOL 09a3e291bac48e9ce311f42889b3d9999356536f7e9d29582ddd6f756084ff99733c9b969bbc105f2453d567b8746c2f185451e4d57e2e1b807d0be87b01d97a
+EBUILD opendchub-0.8.2.ebuild 970 SHA256 cb84d5ae3aa746f51182d5c1a82e7871fd544d8a30c1f816b62232665d5f73e0 SHA512 db425a503b5f35259ece3d7078c644568011026f22a9c6fc19a47c154ad54dbd34448f77b4fb8f83e9102f04b795d636745eda9584db9c8b5f5479896d2cac8d WHIRLPOOL c923e85dbd4d7fc8dd8da7c970ea2e998dc0f68bd40396f8eaaa1d24e1a8a9701e208d5f59548e0185697fcf1cb29eec11ffb03db689a589a6955fb64a21cb49
+MISC ChangeLog 2618 SHA256 239dd0c4205b4c87801150c109daa9afc2722387fe36331f861f60a24c58bf9d SHA512 4b1ef877958322d962bdbda76fc9243fbc418c536343aa4ac5c251271e9772f1cde025aa79ec19148cdb6cbc7701c964a7d132d3de209d5fc25d4ffefa31ca31 WHIRLPOOL d0b91e57615cfadfde5cff433d8417033072978a5c36c826f6a347f82aca95e179a9c2c2f74bcc86637276c6bd693950869ca5edd0180b2a127a4ebf71eefc85
+MISC ChangeLog-2015 2471 SHA256 37f9cc9a0c0320f91d21e756b625efb36d3262a0ff2e1f43d16d1160185c1b65 SHA512 2dfdfc86bc52ed0de942aefa9ae45c7b70f44858f1ea27d278a7190e6efc291f24f4dc11df2042e32307112834b9e83468e3e974d808895602ca7c45c4387cf1 WHIRLPOOL db798e1c2f508483ad40791f0b8542455761c7229d3d3a8b664987a3327159ac9a7c6c644654a1319c6713628c1bb43a73961691c17cfdc589f213f41838ca9a
+MISC metadata.xml 251 SHA256 e01ffda3e91ed504543f147b4234b144023d349eb39807fdaef855531e9b576c SHA512 9c335c29aef545c47822fa6c48c188e1e5f9ea1125253518078dce88639a828cbe0d6c0a7c5bfc38a662753dbb468d0fef17be88877890335e7320f44e509c62 WHIRLPOOL 799ac4e7a85b50bf1bdd1e0e662b79b14c82b05b75ae4cde19007fa683a043bfda8e7b6f056a5a9767ca7d470dcb0d86bb0227a6d0cde010f99e7a40d96d62ab
diff --git a/net-p2p/opendchub/files/opendchub-0.8.2-telnet.patch b/net-p2p/opendchub/files/opendchub-0.8.2-telnet.patch
new file mode 100644
index 000000000000..f81bf44cbc69
--- /dev/null
+++ b/net-p2p/opendchub/files/opendchub-0.8.2-telnet.patch
@@ -0,0 +1,11 @@
+--- opendchub-0.8.2/src/main.c.orig
++++ opendchub-0.8.2/src/main.c
+@@ -1073,7 +1073,7 @@
+ /* The chat command, starts with <nick> */
+ else if(*temp == '<')
+ {
+- if((user->type & (SCRIPT | UNKEYED | LINKED | NON_LOGGED)) == 0)
++ if((user->type & (SCRIPT | UNKEYED | LINKED | NON_LOGGED | NON_LOGGED_ADM)) == 0)
+ chat(temp, user);
+ }
+
diff --git a/net-p2p/opendchub/files/opendchub_setup.sh b/net-p2p/opendchub/files/opendchub_setup.sh
new file mode 100644
index 000000000000..2944a02c395e
--- /dev/null
+++ b/net-p2p/opendchub/files/opendchub_setup.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+if test ! -d $HOME/.opendchub; then
+ echo "creating config directory: $HOME/.opendchub"
+ mkdir $HOME/.opendchub
+ chmod 700 $HOME/.opendchub
+else
+ echo "$HOME/.opendchub already exists!"
+fi
+if test ! -d $HOME/.opendchub/scripts; then
+ echo "creating script directory: $HOME/.opendchub/scripts"
+ mkdir $HOME/.opendchub/scripts
+ chmod 700 $HOME/.opendchub/scripts;
+ echo "copying scripts..."
+ for i in /usr/share/opendchub/scripts/*; do
+ cp $i $HOME/.opendchub/scripts;
+ done
+else
+ echo "$HOME/.opendchub/scripts already exists!"
+fi
+echo "done!"
diff --git a/net-p2p/opendchub/metadata.xml b/net-p2p/opendchub/metadata.xml
new file mode 100644
index 000000000000..e8819ea7c73a
--- /dev/null
+++ b/net-p2p/opendchub/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">opendchub</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/opendchub/opendchub-0.8.2.ebuild b/net-p2p/opendchub/opendchub-0.8.2.ebuild
new file mode 100644
index 000000000000..2fd66e533b52
--- /dev/null
+++ b/net-p2p/opendchub/opendchub-0.8.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="hub software for Direct Connect"
+HOMEPAGE="http://opendchub.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc x86"
+IUSE="perl"
+
+RDEPEND="perl? ( dev-lang/perl )"
+DEPEND="${RDEPEND}"
+
+DOCS="NEWS TODO README AUTHORS Documentation/*"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-telnet.patch
+ eautoreconf
+}
+
+src_configure() {
+ use perl || myconf="--disable-perl --enable-switch_user"
+ econf ${myconf}
+}
+
+src_install() {
+ default
+
+ if use perl ; then
+ dobin "${FILESDIR}"/opendchub_setup.sh
+ insinto /usr/share/opendchub/scripts
+ doins Samplescripts/*
+ fi
+}
+
+pkg_postinst() {
+ if use perl ; then
+ echo
+ einfo "To set up perl scripts for opendchub to use, please run"
+ einfo "opendchub_setup.sh as the user you will be using opendchub as."
+ echo
+ fi
+}
diff --git a/net-p2p/ppcoind/Manifest b/net-p2p/ppcoind/Manifest
new file mode 100644
index 000000000000..93a9e34f1f3c
--- /dev/null
+++ b/net-p2p/ppcoind/Manifest
@@ -0,0 +1,14 @@
+AUX ppcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
+AUX ppcoin.confd 233 SHA256 fb877ae7608b5c2aaae29e522d8cfb42e51e064831c64b228b64da2b11aac64d SHA512 efb8f210143d993e922668e3daffc8bb74406be2f912729f68ebfcbcb3d44e10e0fed495963c4273a95099d37f3afc66b49616724bd827e6b4359b2e3a27d9c3 WHIRLPOOL 12e7a8e82d33b023be054c6c019cc61a5783e32e108e54358c76789e1e89ce441a095561e1a4750cb341350ef7da7a97b6ebfb06f8ec3a7fcd2809e27d5eb110
+AUX ppcoin.initd 2452 SHA256 fa5cad6c54fb6cac4074f23d40c369ea7afbe3e83280a104850983fde1578e79 SHA512 200562252dcb716ff79b2f32de142e5857cc997585a0c96d9f1c89cdced9f46598f15d11616b5ebb368b4e5915ed707be02af6227fe47dc46c022f80583d586d WHIRLPOOL 8347a6d3fd2816a0359cd9424c1ba40e832670271a325a042bab9c9471c36a2ffaa20e2f986e8c7484d5e24bb30cf6a8a11603d8d40bc7277068326a531a9c39
+AUX ppcoin.initd-r1 827 SHA256 08e1267e030db31befd86362e1afe2435c727004f1434f268b0c6721c53e5728 SHA512 8bcf80e668ea549bb1eb641f66ec2349f5e3f32131312eabbfa086586004bacd95527d196d8bbb6b76dd88f6112c633a7b1e418ce50f8f0f33786db0cad20d4d WHIRLPOOL d245d0cf703845f8beb6c2d06713c877c225281c9b26899cb9e1d063aed0e88302fd169a36725e3eea71e80e17dec4bfae9c6c546bfd5b06269ba042392117fb
+AUX ppcoin.service 859 SHA256 df6e7f616816a07efb4d3d627d1ee80699f541bdcbafce7ba7aef2640291bce9 SHA512 8395ef4f5b026757f4202c78eb55b6978d2cdec49f6db801bb6daddea8d8a524afacf53368a78c3a7055ce5cc4ada53ac6c88567b02951fa7a722e5dd9ebd3c1 WHIRLPOOL bbd546e3d7043132f65117e567fe0f0b756f60093184e67316398cc8589f46a5029d9118431a4fa2d5e9e834c1f2beb180f0e5e20f8d7a8ae1fa96273b278076
+AUX ppcoind-0.4.0-boost_chrono.patch 303 SHA256 b46afa25e5f59bbc2c76bb5483ff96be4ed80b00de5d0397c5ff5b3fd82deb23 SHA512 0967f2455e6390ddcf6f38ba2d5f1290e41198ef8d4afa94e21de07771eedfbe89ee6af0c19cd76c0264bcfbe958d6dc0baedc96bef1e8badf613061eba99b6a WHIRLPOOL 9a0e708b7830ff9dfdc01dbf5c0fe79f0d814588b545d6b54381c611c67ca911485d7074d36e2b11dfbed294d0ac8d66bb58e1f8fd7572e2d3c58e68c3fd226c
+AUX ppcoind-0.4.0-gcc6.patch 410 SHA256 a9cae09b9c7e7ae93e65dfdcad94ecebe6e4e9acdb517792d7b86bd53ec13ed3 SHA512 6153d2a3ede27453589e6bc081a36a8962234076b8f87077f41bd9ba913c2c6cd2bfaaba010464d89a7f77e7e1e3682e87164835a24d1145e910f46c66095c25 WHIRLPOOL 9f41377a7e711c8a7ab1042a8360ddc93e1bdb1be13c93fce7cb1915f973920f36ec858e5558497c59b5fd1b258068a37ba9d385554e17b468f0a048938fd67b
+AUX ppcoind.logrotate 107 SHA256 5aefed737e73b6393e2f004318b34429616a35187131bade4743a1c8aa7e7d91 SHA512 bf36d07a6dcebcc50ac7e0b74433333902df6ef22396a876b96289cca90882720ed95ef0cc8fbf3abeea6800cbe2386e56b27bb798922f3be98134dee1caed69 WHIRLPOOL 68521503b26df24b66dd20a9ef3174ffc1427abf483185b709d46fc54d148250e4a85ee887e292398063205737640b7accd7365cd707ea5c3e80b72b503e3880
+DIST ppcoin-0.4.0.tar.gz 12652477 SHA256 561076e8d4e82085d577eb717b9f8b52571556fea2b8181fa8eb6039218d3f06 SHA512 755890e32048f8cdfb9f93706eff952ae2876be394c0a76cf93a79562a28fe03c74c829c97b9234fbc27c03e4b706373f55723564ca7b91a4ff908ca072299c4 WHIRLPOOL eaacd820045fe2a343c45698674096a15228605418cffe61fc9e31eaf330dbb29635d6dbae534a90677fe035a598c7b061c0c3fa05c747514c24cfc24addeef4
+EBUILD ppcoind-0.4.0-r1.ebuild 2515 SHA256 5ab860ab8f73ee7e797cb454ed25624c3619c7057415c5c691d7adb4109c694a SHA512 b73ee2760216447eb0bab425e5c32fdcc2bb454bd737c1b8af635ec6bc3deceb10421ac6b3acaed494da063a0770756698dd1f136d3b008d677a8266d1bed460 WHIRLPOOL 13a663a71f0d3fda0eba24dcb82a7308eacdb1a7b1bd47c104f354c58e71feba2a2e22b09655aa5c1363b7b97461658424152bb148e83345a1db64dd0b89ce7b
+EBUILD ppcoind-0.4.0.ebuild 2619 SHA256 aa9a5a81d946cad0661f59e1b5536a04f632f1407af042bce1cbdec0b6c48255 SHA512 b7e3ac5b89461c3faad3ad3685b7310dc441249a7a149a1c23fcab53788fd913fc908d21e64b1d634a1b0b23a37ba27216487f09f18081081c41c0ff0bb994ae WHIRLPOOL 121ef15bab12fbffff60254dbc1bdded3c4d166659bec736749c56f374f834b2447a0632c42bda7b111f7d07a980cdfb7beccb8a90f3ce3b0eb3cdf30f7a63df
+MISC ChangeLog 2601 SHA256 46693555021331302c13046661ff8f0a089e9b745dc21f82aed1010fea0da4d9 SHA512 732c0489b58b687de596458b11adca41d46d6d36f31ea723142f77644ab7d530ff77ccc4884d5711a0e15a680d507e6c124fb206324ece0fbb7ab635f12eedd9 WHIRLPOOL ae11f8fb65139c7eb2bc3bf9b5db0acc8ff62f6eaa4fddeb4e159ba307e66097acb3bcdf98b92127fa7d0f034abb3b4745670fcbafff70b9206cc8d5e1b18ba5
+MISC ChangeLog-2015 1249 SHA256 f0af3b798c0a5066c1448c2c970264a18a3fe059a6affcf7757a32b0d0468998 SHA512 94c0c44b218cd0b0a27e581697ba92ac4fc80c47d5c3367473b1d3f98e4301c36a1106c64b1e7c609f2bc14a1571abb83cbf4230eb9171b2a2219f959d5af4bc WHIRLPOOL 2ab9750f1c6142b137a73f940b4a3ee5c337a8b07f27a64740128294ed5cfa359a10b5b7007a9aee6db1891430fb2f8c0bf6ed3515cda99e4f7c02a530c1e892
+MISC metadata.xml 332 SHA256 1fc81b2a94caca658b7bc209ecf54da156f261138394d36a35c4cbffa15871c3 SHA512 430c6665189005260d6a07fc0e8185c1ec896177b405a261a851a77a77e58bc35fa693896deedd68589e1d42f48299815cd7e1d9e42e9e54bf2be36d23fcfa84 WHIRLPOOL 3d54fae187d8852730d943da653e5ce8ab58c05ec579c6ba8aa09e2bbf79d918b7a5cacfd91ce6c1fd4c11cc1e2ec20a64533640f68439b4bb4afa71db8da30b
diff --git a/net-p2p/ppcoind/files/ppcoin.conf b/net-p2p/ppcoind/files/ppcoin.conf
new file mode 100644
index 000000000000..c6a55f3d9133
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-p2p/ppcoind/files/ppcoin.confd b/net-p2p/ppcoind/files/ppcoin.confd
new file mode 100644
index 000000000000..81fbf49e9f38
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/ppcoind
+
+# owner of ppciond process (don't change, must be existing)
+PPCOIN_USER="ppcoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+PPCOIN_OPTS="${PPCOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/ppcoind/files/ppcoin.initd b/net-p2p/ppcoind/files/ppcoin.initd
new file mode 100644
index 000000000000..e739dc7dba4e
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/openrc-run
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/ppcoin"
+CONFFILE="${VARDIR}/.ppcoin/ppcoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [[ "${PPCOIN_USER}" == "" ]] ; then
+ eerror "Please edit /etc/conf.d/ppcoind"
+ eerror "A user must be specified to run ppcoind as that user."
+ eerror "Modify USER to your needs (you may also add a group after a colon)"
+ return 1
+ fi
+ if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${PPCOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/ppcoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${PPCOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${PPCOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/ppcoind"
+ eerror "Specified group must exist!"
+ return 1
+ fi
+ fi
+ if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
+ eerror "Please edit `readlink -f ${CONFFILE}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+ if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
+ eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting PPcoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping PPcoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${PPCOIN_USER}" --name ppcoind \
+ --pidfile /var/run/ppcoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/ppcoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${PPCOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${PPCOIN_USER}" \
+ --name ppcoind --pidfile /var/run/ppcoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${PPCOIN_USER}" --name ppcoind \
+ --pidfile /var/run/ppcoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/ppcoind \
+ --chuid "${PPCOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${PPCOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${PPCOIN_USER}" \
+ --name ppcoind \
+ --pidfile /var/run/ppcoind.pid
+ eend $?
+}
diff --git a/net-p2p/ppcoind/files/ppcoin.initd-r1 b/net-p2p/ppcoind/files/ppcoin.initd-r1
new file mode 100644
index 000000000000..8023f1f0d378
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+vardir="/var/lib/ppcoin"
+conffile="${vardir}/.ppcoin/ppcoin.conf"
+ppcoind_user="${PPCOIN_USER:-nobody:nobody}"
+
+description="Cryptocurrency forked from Bitcoin which aims to be energy efficiency."
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/ppcoind"
+command_args="${PPCOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${ppcoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${ppcoind_user} -m 0400 ${conffile} || return 1
+
+ if ! grep -q '^rpcpassword=' "${conffile}"; then
+ eerror "Please edit `readlink -f ${conffile}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+}
diff --git a/net-p2p/ppcoind/files/ppcoin.service b/net-p2p/ppcoind/files/ppcoin.service
new file mode 100644
index 000000000000..3a83178fe04e
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/ppcoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/ppcoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="PPCOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/ppcoin/ppcoin.conf
+
+[Unit]
+Description=PPcoin Daemon
+After=network.target
+
+[Service]
+User=ppcoin
+Environment=PPCOIN_OPTS=
+ExecStart=/usr/bin/ppcoind -daemon=0 $PPCOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/ppcoind/files/ppcoind-0.4.0-boost_chrono.patch b/net-p2p/ppcoind/files/ppcoind-0.4.0-boost_chrono.patch
new file mode 100644
index 000000000000..390d5c7c94b1
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoind-0.4.0-boost_chrono.patch
@@ -0,0 +1,10 @@
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -30,6 +30,7 @@
+ -l boost_filesystem$(BOOST_LIB_SUFFIX) \
+ -l boost_program_options$(BOOST_LIB_SUFFIX) \
+ -l boost_thread$(BOOST_LIB_SUFFIX) \
++ -l boost_chrono$(BOOST_LIB_SUFFIX) \
+ -l db_cxx$(BDB_LIB_SUFFIX) \
+ -l ssl \
+ -l crypto
diff --git a/net-p2p/ppcoind/files/ppcoind-0.4.0-gcc6.patch b/net-p2p/ppcoind/files/ppcoind-0.4.0-gcc6.patch
new file mode 100644
index 000000000000..76bad3feb5a4
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoind-0.4.0-gcc6.patch
@@ -0,0 +1,11 @@
+--- a/src/net.cpp
++++ b/src/net.cpp
+@@ -51,7 +51,7 @@ CAddress addrLocalHost(CService("0.0.0.0", 0), nLocalServices);
+ CAddress addrSeenByPeer(CService("0.0.0.0", 0), nLocalServices);
+ static CNode* pnodeLocalHost = NULL;
+ uint64 nLocalHostNonce = 0;
+-array<int, THREAD_MAX> vnThreadsRunning;
++boost::array<int, THREAD_MAX> vnThreadsRunning;
+ static SOCKET hListenSocket = INVALID_SOCKET;
+ CAddrMan addrman;
+
diff --git a/net-p2p/ppcoind/files/ppcoind.logrotate b/net-p2p/ppcoind/files/ppcoind.logrotate
new file mode 100644
index 000000000000..4ea060b0f0f7
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/ppcoin/.ppcoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP ppcoind
+ endscript
+}
diff --git a/net-p2p/ppcoind/metadata.xml b/net-p2p/ppcoind/metadata.xml
new file mode 100644
index 000000000000..f08d8cf453eb
--- /dev/null
+++ b/net-p2p/ppcoind/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="logrotate">Use app-admin/logrotate for rotating logs</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ppcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/ppcoind/ppcoind-0.4.0-r1.ebuild b/net-p2p/ppcoind/ppcoind-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..1a5131498abd
--- /dev/null
+++ b/net-p2p/ppcoind/ppcoind-0.4.0-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DB_VER="4.8"
+
+inherit db-use eutils systemd user
+
+MyPV="${PV/_/-}"
+MyPN="ppcoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="Cryptocurrency forked from Bitcoin which aims to be energy efficiency"
+HOMEPAGE="http://peercoin.net/"
+SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples ipv6 logrotate upnp"
+
+RDEPEND="
+ dev-libs/boost:=[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? (
+ app-admin/logrotate
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+DOCS=( ../README README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc6.patch
+ "${FILESDIR}"/${P}-boost_chrono.patch
+)
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+pkg_setup() {
+ local UG='ppcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/ppcoin "${UG}"
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -C src -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+#Tests are broken
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_ppcoin
+# ./test_ppcoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/ppcoin
+ doins "${FILESDIR}/ppcoin.conf"
+ fowners ppcoin:ppcoin /etc/ppcoin/ppcoin.conf
+ fperms 600 /etc/ppcoin/ppcoin.conf
+
+ newconfd "${FILESDIR}/ppcoin.confd" ${PN}
+ newinitd "${FILESDIR}/ppcoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/ppcoin.service"
+
+ keepdir /var/lib/ppcoin/.ppcoin
+ fperms 700 /var/lib/ppcoin
+ fowners ppcoin:ppcoin /var/lib/ppcoin/
+ fowners ppcoin:ppcoin /var/lib/ppcoin/.ppcoin
+ dosym /etc/ppcoin/ppcoin.conf /var/lib/ppcoin/.ppcoin/ppcoin.conf
+
+ newman contrib/debian/manpages/bitcoind.1 ppcoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 ppcoin.conf.5
+
+ einstalldocs
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,gitian-descriptors,gitian-downloader,pyminer,wallettools}
+
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/ppcoind.logrotate" ppcoind
+ fi
+}
diff --git a/net-p2p/ppcoind/ppcoind-0.4.0.ebuild b/net-p2p/ppcoind/ppcoind-0.4.0.ebuild
new file mode 100644
index 000000000000..f0cc1712c908
--- /dev/null
+++ b/net-p2p/ppcoind/ppcoind-0.4.0.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit db-use eutils systemd user
+
+MyPV="${PV/_/-}"
+MyPN="ppcoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="Cryptocurrency forked from Bitcoin which aims to be energy efficiency"
+HOMEPAGE="http://peercoin.net/"
+SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples ipv6 logrotate upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? (
+ app-admin/logrotate
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+pkg_setup() {
+ local UG='ppcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/ppcoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc6.patch
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
+ fi
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+#Tests are broken
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_ppcoin
+# ./test_ppcoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/ppcoin
+ doins "${FILESDIR}/ppcoin.conf"
+ fowners ppcoin:ppcoin /etc/ppcoin/ppcoin.conf
+ fperms 600 /etc/ppcoin/ppcoin.conf
+
+ newconfd "${FILESDIR}/ppcoin.confd" ${PN}
+ newinitd "${FILESDIR}/ppcoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/ppcoin.service"
+
+ keepdir /var/lib/ppcoin/.ppcoin
+ fperms 700 /var/lib/ppcoin
+ fowners ppcoin:ppcoin /var/lib/ppcoin/
+ fowners ppcoin:ppcoin /var/lib/ppcoin/.ppcoin
+ dosym /etc/ppcoin/ppcoin.conf /var/lib/ppcoin/.ppcoin/ppcoin.conf
+
+ dodoc ../README
+ dodoc README.md
+ newman contrib/debian/manpages/bitcoind.1 ppcoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 ppcoin.conf.5
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,gitian-descriptors,gitian-downloader,pyminer,wallettools}
+
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/ppcoind.logrotate" ppcoind
+ fi
+}
diff --git a/net-p2p/primecoin-qt/Manifest b/net-p2p/primecoin-qt/Manifest
new file mode 100644
index 000000000000..2e9c8dbfdc9e
--- /dev/null
+++ b/net-p2p/primecoin-qt/Manifest
@@ -0,0 +1,6 @@
+AUX primecoin-sys_leveldb.patch 6836 SHA256 460e6d013d897d108c8c0234dc0a5f57b114b050c586f8877ef8ad7c3f1f6dba SHA512 b7dd42bf2a83528db7b828fd95e93a9c025cb84ea3844591a4012fd2504a785cbdc589ceff6324664a44087d09a133c05eed186c4dfa82b534257224ff0f906f WHIRLPOOL b6a178d084d9f877c82cba21301071e542e39e63865dcb0179d2a2b3d6e1d72d2ae9263a3332c4512298d29850023e5b8b1249f86520d8ad3c55fcd339a46013
+DIST primecoin-0.1.2.tar.gz 16521236 SHA256 d0f3c6a91b4d505f25e9284bcca85e420cf09d0e6cf71e5a001b7e1367ef46d0 SHA512 cff71b0e6459c4e534e78acef9491090d05c0cb864a068c0a3cb289310a1ee13fd69c7b61a7d6cb9732af54fbcf1fa4e77db8c8528a09bbdafd36421fdf7aff1 WHIRLPOOL 5031efa135dcf08975a06a037179863ad180920e0c55e0ec5d1863b4b24d005ce829fa0e0f081120d3610bc0abd1d3919db477a33e32ec6d0d353b7177480eb1
+EBUILD primecoin-qt-0.1.2-r1.ebuild 3124 SHA256 62dc28f031f1fbaa7a5604772e7d472692129da7468c1068ba55de6b53b60615 SHA512 9df5b5353d2e5ca794852b861cceac83d3b3e6ae7afbbbbe16239920c42cfe7b22cca1eef23b32bb43454101ba872e5b7a97933ce85b88e84ff97bd88b229d54 WHIRLPOOL c405b74b133c4c3991bb1d56662882e6ece864d1aebd7088bfa58bd241cff26d540b65e383cab4167167d849d94a840680b8a2fef45d5df6a5ea6c954c73d5f3
+MISC ChangeLog 2367 SHA256 ace5fdba9d03d497811cc199afffaed32832e29898881acee66a1f1fa3336a39 SHA512 287e30845a4d70194511a4fccf653aa8d7a6cfb0d4d5bc16abbe57b808695cd233d47606d811554d6f2bd0b4f3af300a942d7155babf2d1d3120d4cb8a39f2fa WHIRLPOOL 871de2df6c9850ac9fdb567caf8359bf6a8bb2f9d8f5685274b9cde1b1a8e48f412d4354e45ab80ebe1292c90f20cc0192464e067b2462948e6c3012d27a521a
+MISC ChangeLog-2015 720 SHA256 db9d5964c363ce3953c16ac762b1c22e561aeb4961c7e76366c71c5e6b63994b SHA512 77abcdd152d29cb991712166f7434312734072fe3f80b499f8b79a6d37c15c89b77da60b2ef04f7e28d54c57b18d9c83f2c9a8f8f071d8435aab3c75a7ecc98d WHIRLPOOL dcec6193c0c0128969a391c551a4bf3be71850b24d0a7d0bef7744bc13de79fec946aedd78f49b749c9aadae6450fe4c7b8e2559c4972e8293496b512c730d76
+MISC metadata.xml 343 SHA256 c52dd7e13acf09fa52085173aacc336744859cbbf292e775c010734a018be1af SHA512 1f2a6bc2551bbe24ff5f9a90c7246bfd069992d53171a507f40795e389bc24e4e5da2fefa26507a3fb33c4ac272f5474d184026fd2ee18f88048e60b0c9be3f9 WHIRLPOOL 7a0111ac3150058dd9506b083c57bf50b0efb3eeca530df5df7f47cbef4c3a0c92caae9c4a9e68d4f7de3a6db6fc82ada0fd44e9362460358328312dbea61b73
diff --git a/net-p2p/primecoin-qt/files/primecoin-sys_leveldb.patch b/net-p2p/primecoin-qt/files/primecoin-sys_leveldb.patch
new file mode 100644
index 000000000000..39d0aa63fb77
--- /dev/null
+++ b/net-p2p/primecoin-qt/files/primecoin-sys_leveldb.patch
@@ -0,0 +1,176 @@
+diff -Naur primecoin-0.1.2-linux.orig/src/bitcoin-qt.pro primecoin-0.1.2-linux/src/bitcoin-qt.pro
+--- primecoin-0.1.2-linux.orig/src/bitcoin-qt.pro 2013-08-05 08:37:14.000000000 -0400
++++ primecoin-0.1.2-linux/src/bitcoin-qt.pro 2013-11-30 16:39:48.464770389 -0500
+@@ -4,7 +4,7 @@
+ VERSION = 0.8.3
+ INCLUDEPATH += src src/json src/qt
+ QT += network
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -98,25 +98,29 @@
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff -Naur primecoin-0.1.2-linux.orig/src/src/leveldb.cpp primecoin-0.1.2-linux/src/src/leveldb.cpp
+--- primecoin-0.1.2-linux.orig/src/src/leveldb.cpp 2013-08-05 08:37:20.000000000 -0400
++++ primecoin-0.1.2-linux/src/src/leveldb.cpp 2013-11-30 16:41:25.632773774 -0500
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -43,8 +45,12 @@
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff -Naur primecoin-0.1.2-linux.orig/src/src/makefile.unix primecoin-0.1.2-linux/src/src/makefile.unix
+--- primecoin-0.1.2-linux.orig/src/src/makefile.unix 2013-08-05 08:37:21.000000000 -0400
++++ primecoin-0.1.2-linux/src/src/makefile.unix 2013-11-30 17:20:06.545854617 -0500
+@@ -111,8 +111,7 @@
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -121,7 +120,6 @@
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -141,25 +139,44 @@
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o \
+ obj/prime.o \
+ obj/checkpointsync.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
++
+ all: primecoind
+
+ test check: test_primecoin FORCE
+ ./test_primecoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -170,24 +187,22 @@
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
+-primecoind: $(OBJS:obj/%=obj/%)
+- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
++obj/%.o: %.cpp
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
++primecoind: $(OBJS)
++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+ obj-test/%.o: test/%.cpp
+- $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+ test_primecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
diff --git a/net-p2p/primecoin-qt/metadata.xml b/net-p2p/primecoin-qt/metadata.xml
new file mode 100644
index 000000000000..cd3b3f842d7c
--- /dev/null
+++ b/net-p2p/primecoin-qt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">primecoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild b/net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..c8230c811d78
--- /dev/null
+++ b/net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="af_ZA ar bg bs ca_ES ca cs cy da de el_GR en eo es_CL es et eu_ES fa_IR fa fi fr_CA fr gu_IN he hi_IN hr hu it ja la lt lv_LV nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW"
+
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+MyPV="${PV/_/-}"
+MyPN="primecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="Cryptocurrency forked from Bitcoin which aims to be energy efficiency"
+HOMEPAGE="http://primecoin.org/"
+SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dbus ipv6 kde +qrcode upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ qrcode? (
+ media-gfx/qrencode
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+DOCS="doc/README.md doc/release-notes.md"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch
+ rm -r src/leveldb
+
+ cd src || die
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e qt/locale/bitcoin_$lan.ts ]; then
+ ewarn "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls qt/locale/*.ts)
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts"
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'qt/bitcoin.qrc'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ OPTS=()
+
+ use dbus && OPTS+=("USE_DBUS=1")
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use qrcode && OPTS+=("USE_QRCODE=1")
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX")
+ fi
+
+ #The primecoin codebase is mostly taken from bitcoin-qt
+ eqmake4 bitcoin-qt.pro "${OPTS[@]}"
+}
+
+#Tests are broken
+#src_test() {
+# cd src || die
+# emake -f makefile.unix "${OPTS[@]}" test_primecoin
+# ./test_primecoin || die 'Tests failed'
+#}
+
+src_install() {
+ qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "share/pixmaps/primecoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Primecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/primecoin;\nTerminal=false"
+
+ newman contrib/debian/manpages/bitcoin-qt.1 ${PN}.1
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ newins contrib/debian/bitcoin-qt.protocol ${PN}.protocol
+ fi
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/primecoind/Manifest b/net-p2p/primecoind/Manifest
new file mode 100644
index 000000000000..378ba51a813d
--- /dev/null
+++ b/net-p2p/primecoind/Manifest
@@ -0,0 +1,12 @@
+AUX primecoin-sys_leveldb.patch 6836 SHA256 460e6d013d897d108c8c0234dc0a5f57b114b050c586f8877ef8ad7c3f1f6dba SHA512 b7dd42bf2a83528db7b828fd95e93a9c025cb84ea3844591a4012fd2504a785cbdc589ceff6324664a44087d09a133c05eed186c4dfa82b534257224ff0f906f WHIRLPOOL b6a178d084d9f877c82cba21301071e542e39e63865dcb0179d2a2b3d6e1d72d2ae9263a3332c4512298d29850023e5b8b1249f86520d8ad3c55fcd339a46013
+AUX primecoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
+AUX primecoin.confd 251 SHA256 a6aed5bde7b688ccdbeff88b67e5f912f031ca65fb9cc5c0ce0ddc3d00fd7ac2 SHA512 e291ae30a35b19e29982615875003c0d9c81b70e79f023ad4ada0166ba9199df5dd17d7f72750d9fe681e2c7ccfa5696e9f34a661449fa4a1210690e4d4c0d4e WHIRLPOOL a36b5e113598c68c947b829822d5f0f4f8a1944dda2905a73268f2ec48ff47b1dd2af4833c22e7acda92de52125e671cb6d8b847c3421658d044c16170aeeb87
+AUX primecoin.initd 2542 SHA256 b1f4d84e01621d53565b4ece24b8d23792a93a68d53cb7f34dd163458e97d2e0 SHA512 6125ce365b17345db342cb41010786e9565ddddbf1da28ef1faeaf6d7d70bdbc7e6e17395c69099be90739f34318e3d515474d0c77d772e78cc6ca0ec83c9946 WHIRLPOOL c78de164bf7ff4c84bff16b5b828a3e226abe2dbfec457202c952d4d5f34bfe8437e41b886ff60ab9dbebb8432521d5810c6a41df21fface4caa56791abf23fb
+AUX primecoin.initd-r1 837 SHA256 2e2f61bff2040d58ac55657b11388f1b8a0da9373412f469ea1f5144ab4bf1d7 SHA512 ec177c18803f7922c9cdc4501d4df89368dcce8eba917c9f117a445dd9040c63580b999aa462b45cf54f06d9db0ae1d1f4970a74841331c9764ffea017d46527 WHIRLPOOL 6e2cfb14fa620a88adc1a5842c36c319eed7359a67759677b15adbd7240bb744f9093c3a71194657548493583390323ff704e9fca09c195a5b6a2d5eb759b6db
+AUX primecoin.service 889 SHA256 f38b0b67a950b1b43dce4906aeece22bd186ddc198bce0b9136edc5bf4149fd3 SHA512 5b37b776f419bf9da51952e9a4b3bc7f8879297d1e6d8d551ea4658a8daf7f2f5138bd018443a514ee7787b8c6265fadc409bbc9bdb1d58a8df34ae312dbfd0f WHIRLPOOL 503a5e730cd9cee91308d8d79a0ed59f3ef0fe7dbd1c673c82deb5f12cf3c7c07de498d31b996c9fe0523ebba50752c792f8b636896b01b04718de2e929512d9
+AUX primecoind.logrotate 116 SHA256 fb78530aad1491be7c75dede40e82809020b438f272a6a8506ba74eb9af0691b SHA512 ad6873f47e73a305e3b44fc0a6e9ef430a2e82392ff6c5230f365aaa1b1d64afc8d97094006dc2b57b8b9245288f3e144ecdccb5913d98d7171fcd6a216022e9 WHIRLPOOL 0d6c4b3fcbe60de559febe9d8029de177821c0aceec31fdae3b9b907aebc24ffc4f1b7ecc2102a8ae486f25ac00fd479a1b349ce2ed39a1e6fb85a620b30a97e
+DIST primecoin-0.1.2.tar.gz 16521236 SHA256 d0f3c6a91b4d505f25e9284bcca85e420cf09d0e6cf71e5a001b7e1367ef46d0 SHA512 cff71b0e6459c4e534e78acef9491090d05c0cb864a068c0a3cb289310a1ee13fd69c7b61a7d6cb9732af54fbcf1fa4e77db8c8528a09bbdafd36421fdf7aff1 WHIRLPOOL 5031efa135dcf08975a06a037179863ad180920e0c55e0ec5d1863b4b24d005ce829fa0e0f081120d3610bc0abd1d3919db477a33e32ec6d0d353b7177480eb1
+EBUILD primecoind-0.1.2-r1.ebuild 3035 SHA256 67ab71d3597b6bfdf785e07f6f1030be0b617f594655c41a9d06103b7994c6c7 SHA512 a1f8479393b56fa516641941817f85d98804be5db6615fea0a7bac6d8337d88e5073926f94a82db2cd7526b7606cd7f297b7256e71f7beae80d325ac9cfd3eb8 WHIRLPOOL f283324199f5e5b66d2384815f577e47fa4843450285b408a61a1cc35a204031c7ad62825a88bdcd0293fc2d186c9d04c2e05a64ad0a0479b7a28ce04291a985
+MISC ChangeLog 2678 SHA256 977573a41218123820d705ceafcde7e68ef443bd7e2eaf5ca8e448f782b881f5 SHA512 f11b25b8b930d71e1f6635fa6b52afe8ba3a47d5155421a64dee9fd12d234a5ab1a39f35cbe7cf81e9193ff9aed0693427453f0ff6227ccc9d5ca54c2627f819 WHIRLPOOL 2f40ead9580fb31e74ea6b54ce3419cc2c41e41e0899f3683e9719112337a623441c62c3b3dc1706425652055aa9f27631ffdd9fafdfbbd3627dba6e5bc09273
+MISC ChangeLog-2015 1173 SHA256 8ff6f15ec68fe6b1eb7fc7745679b17185441359b96b381bdf810e1bf8386682 SHA512 62397e08e30bd3c1db6e24626a1197be0c47b467ebe549ea81a68fb6c1a7b8e0080005cfdfac88f1b1dc56a862099a95525082acb58a2889ab9e03ee9ea3dac9 WHIRLPOOL 76fd1d80f06cd8272c10e903823b3919ed5dd8ede2c7b863ba04b6d7d68663fc8fbedab8b9f81036f7a80c0e51d585589d4ab5f5c43d42341f3ba167c48faa2b
+MISC metadata.xml 335 SHA256 e482988119e97fa0138e04cd8a7f1a4a694651a753c3f35394f3c74e1afb4d61 SHA512 9903b33b23cafb7b00e86e624c95ec056e4f162e9dab89c39b3cb53abe3694dfa6f5dccee38f591aef9d075f46612c865579ea1ec8342cacd622a130baf606f1 WHIRLPOOL 6aa49498c1710ca594cf9868474d24dc9f7a386f6061b97a8bf08be97a88d88e5959e5699ae0ca66e806d0b3cfc09be867ce34bee66a9c09469e7d45ab05ea5c
diff --git a/net-p2p/primecoind/files/primecoin-sys_leveldb.patch b/net-p2p/primecoind/files/primecoin-sys_leveldb.patch
new file mode 100644
index 000000000000..39d0aa63fb77
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin-sys_leveldb.patch
@@ -0,0 +1,176 @@
+diff -Naur primecoin-0.1.2-linux.orig/src/bitcoin-qt.pro primecoin-0.1.2-linux/src/bitcoin-qt.pro
+--- primecoin-0.1.2-linux.orig/src/bitcoin-qt.pro 2013-08-05 08:37:14.000000000 -0400
++++ primecoin-0.1.2-linux/src/bitcoin-qt.pro 2013-11-30 16:39:48.464770389 -0500
+@@ -4,7 +4,7 @@
+ VERSION = 0.8.3
+ INCLUDEPATH += src src/json src/qt
+ QT += network
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -98,25 +98,29 @@
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff -Naur primecoin-0.1.2-linux.orig/src/src/leveldb.cpp primecoin-0.1.2-linux/src/src/leveldb.cpp
+--- primecoin-0.1.2-linux.orig/src/src/leveldb.cpp 2013-08-05 08:37:20.000000000 -0400
++++ primecoin-0.1.2-linux/src/src/leveldb.cpp 2013-11-30 16:41:25.632773774 -0500
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -43,8 +45,12 @@
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff -Naur primecoin-0.1.2-linux.orig/src/src/makefile.unix primecoin-0.1.2-linux/src/src/makefile.unix
+--- primecoin-0.1.2-linux.orig/src/src/makefile.unix 2013-08-05 08:37:21.000000000 -0400
++++ primecoin-0.1.2-linux/src/src/makefile.unix 2013-11-30 17:20:06.545854617 -0500
+@@ -111,8 +111,7 @@
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -121,7 +120,6 @@
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -141,25 +139,44 @@
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o \
+ obj/prime.o \
+ obj/checkpointsync.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
++
+ all: primecoind
+
+ test check: test_primecoin FORCE
+ ./test_primecoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -170,24 +187,22 @@
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
+-primecoind: $(OBJS:obj/%=obj/%)
+- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
++obj/%.o: %.cpp
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
++primecoind: $(OBJS)
++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+ obj-test/%.o: test/%.cpp
+- $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+ test_primecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
diff --git a/net-p2p/primecoind/files/primecoin.conf b/net-p2p/primecoind/files/primecoin.conf
new file mode 100644
index 000000000000..c6a55f3d9133
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-p2p/primecoind/files/primecoin.confd b/net-p2p/primecoind/files/primecoin.confd
new file mode 100644
index 000000000000..6dd0defc0cea
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/primecoind
+
+# owner of primeciond process (don't change, must be existing)
+PRIMECOIN_USER="primecoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+PRIMECOIN_OPTS="${PRIMECOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/primecoind/files/primecoin.initd b/net-p2p/primecoind/files/primecoin.initd
new file mode 100644
index 000000000000..37a24b8a6b71
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/openrc-run
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/primecoin"
+CONFFILE="${VARDIR}/.primecoin/primecoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [[ "${PRIMECOIN_USER}" == "" ]] ; then
+ eerror "Please edit /etc/conf.d/primecoind"
+ eerror "A user must be specified to run primecoind as that user."
+ eerror "Modify USER to your needs (you may also add a group after a colon)"
+ return 1
+ fi
+ if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${PRIMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/primecoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${PRIMECOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${PRIMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/primecoind"
+ eerror "Specified group must exist!"
+ return 1
+ fi
+ fi
+ if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
+ eerror "Please edit `readlink -f ${CONFFILE}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+ if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
+ eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Primecoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping Primecoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${PRIMECOIN_USER}" --name primecoind \
+ --pidfile /var/run/primecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/primecoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${PRIMECOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${PRIMECOIN_USER}" \
+ --name primecoind --pidfile /var/run/primecoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${PRIMECOIN_USER}" --name primecoind \
+ --pidfile /var/run/primecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/primecoind \
+ --chuid "${PRIMECOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${PRIMECOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${PRIMECOIN_USER}" \
+ --name primecoind \
+ --pidfile /var/run/primecoind.pid
+ eend $?
+}
diff --git a/net-p2p/primecoind/files/primecoin.initd-r1 b/net-p2p/primecoind/files/primecoin.initd-r1
new file mode 100644
index 000000000000..936902b342af
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.initd-r1
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+vardir="/var/lib/primecoin"
+conffile="${vardir}/.primecoin/primecoin.conf"
+primecoind_user="${PRIMECOIN_USER:-nobody:nobody}"
+
+description="Bitcoin crypto-currency wallet for automated services"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/primecoind"
+command_args="${PRIMECOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${primecoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${primecoind_user} -m 0400 ${conffile} || return 1
+
+ if ! grep -q '^rpcpassword=' "${conffile}"; then
+ eerror "Please edit `readlink -f ${conffile}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+}
diff --git a/net-p2p/primecoind/files/primecoin.service b/net-p2p/primecoind/files/primecoin.service
new file mode 100644
index 000000000000..8fd2ecaba5a2
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/primecoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/primecoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="PRIMECOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/primecoin/primecoin.conf
+
+[Unit]
+Description=Primecoin Daemon
+After=network.target
+
+[Service]
+User=primecoin
+Environment=PRIMECOIN_OPTS=
+ExecStart=/usr/bin/primecoind -daemon=0 $PRIMECOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/primecoind/files/primecoind.logrotate b/net-p2p/primecoind/files/primecoind.logrotate
new file mode 100644
index 000000000000..84623c46f961
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/primecoin/.primecoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP primecoind
+ endscript
+}
diff --git a/net-p2p/primecoind/metadata.xml b/net-p2p/primecoind/metadata.xml
new file mode 100644
index 000000000000..ddbf34a0deff
--- /dev/null
+++ b/net-p2p/primecoind/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="logrotate">Use app-admin/logrotate for rotating logs</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">primecoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild b/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..6a57982eb96b
--- /dev/null
+++ b/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit bash-completion-r1 db-use eutils systemd user
+
+MyPV="${PV/_/-}"
+MyPN="primecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine"
+HOMEPAGE="http://primecoin.org/"
+SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples ipv6 logrotate upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? (
+ app-admin/logrotate
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+pkg_setup() {
+ local UG='primecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/primecoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch
+ rm -r src/leveldb
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
+ fi
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+#Tests are broken with and without our primecoin-sys_leveldb.patch.
+#When tests work, make sure to inherit toolchain-funcs
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_primecoin
+# ./test_primecoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/primecoin
+ doins "${FILESDIR}/primecoin.conf"
+ fowners primecoin:primecoin /etc/primecoin/primecoin.conf
+ fperms 600 /etc/primecoin/primecoin.conf
+
+ newconfd "${FILESDIR}/primecoin.confd" ${PN}
+ newinitd "${FILESDIR}/primecoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/primecoin.service"
+
+ keepdir /var/lib/primecoin/.primecoin
+ fperms 700 /var/lib/primecoin
+ fowners primecoin:primecoin /var/lib/primecoin/
+ fowners primecoin:primecoin /var/lib/primecoin/.primecoin
+ dosym /etc/primecoin/primecoin.conf /var/lib/primecoin/.primecoin/primecoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 primecoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 primecoin.conf.5
+
+ sed -i -e 's/bitcoin/primecoin/g' contrib/bitcoind.bash-completion
+ newbashcomp contrib/bitcoind.bash-completion ${PN}.bash-completion
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/primecoind.logrotate" primecoind
+ fi
+}
diff --git a/net-p2p/pybitmessage/Manifest b/net-p2p/pybitmessage/Manifest
new file mode 100644
index 000000000000..a852837a7bfc
--- /dev/null
+++ b/net-p2p/pybitmessage/Manifest
@@ -0,0 +1,8 @@
+AUX noninteractive-build.patch 513 SHA256 34100033ac55d699d9fdda0db02610504b574bd6fd6dcbf96419c3b48c69860b SHA512 c4542db2557bfff82d7494b2e0540f485cc1a20c649eae0435f7d9fcdaf6b094c27cf91a2ce7fe1fc275a2774a846a5341b0cd7b96e5d1fe5946a7d2a0cca51d WHIRLPOOL f68b49e843759f38b87761a67511cead648b3f8c02416a0ca24607931b11ff76751c39b3071c284c59517d7cfd4d3f7d82929468a559fd767cc14eb7c2350df3
+DIST pybitmessage-0.4.2.tar.gz 547565 SHA256 c69cef72adbdfa2a0ff8c5c7e5d15e640bf3283b9089c388ea48e893d564a573 SHA512 5e783243db4f507ec221092f6da18d25bb15a8c83f28aab7c1796a063d2608c0115c9d636cc73b66a09264a4ff69dda9ba373eff81640b1dd9595100dcdc4917 WHIRLPOOL 22c1ca5e5132248dc8492bd1ea327e81b8567b0ec271c774a07141579a63365dd4cc7fbd066dbba6153ce471057cead1f0763b4ae209789991b7c3b2cb5ebaa4
+DIST pybitmessage-0.6.2.tar.gz 1053815 SHA256 bc209725ef7c1b913ec8560557e3e862a11f664bd8c5fd2eea5adcd915acc2c6 SHA512 4aaa0f6b1cc04de01154bb5c90416901e51abb4465c62269ab07abb7da980ac07f2f548ae7a3780da9f3efe89d3b841b004996c5e33bc2638e58efcbecc8baef WHIRLPOOL 490be7f22a4d5494313c79fb5af396b08344e18bfecbe9c33243b70b9546f177a59a88b403306356fa328c3a559865a355edaf6a998a1dfc9f0caa6f85544d8e
+EBUILD pybitmessage-0.4.2.ebuild 1491 SHA256 544b776314b5f63d93fc693012bcb0cc02c21736dcbd3414c922986352a4371f SHA512 158c5280052bcc4d359f96232e712c85167b088253b08c623c1453e8e8d261edcea09c4c8ae0f9fc72ffeaee63ec8084c6391b1989e6f293adf1bfe98f5fc1cf WHIRLPOOL 74282f31924d54043fc87ef4b719e869b225ce890933e2711375cbe0acbfbc01470c832b1fdc85dbbfebd23471104b2dbd250467e8d0bb234d3971e66abfef69
+EBUILD pybitmessage-0.6.2-r2.ebuild 1924 SHA256 adf519c786823a3aba1249f5bb258186f6f6cdddcf9ff91a737094a0b8319bc1 SHA512 03938e00b3ccff7fb61f602416584f024a862717ee99e4f7f13083da58771451f418b7169653669163d8a7c5348718c40564970a1fc8ab3c3d78322611117154 WHIRLPOOL deb19ad915a7a2a2f9872d62e2a7ee1e88cdbd2bda5ed57da8d656bb7557e0c336bf94b320ef7a066b1648d215eb787f4d58756ae4a8cbe778c001eb9e6b2eb0
+MISC ChangeLog 3550 SHA256 522682648b97be567e702c07c6b2270a056fac5e8037e56b0210dcec98b0d0a1 SHA512 ea5926b2b51df61d92ed3b1bb0224705fb93dd696372b5610b45c2a323f595cb61c451f27be1e6f5a739baf0997b3dc1927d42d1cd8db1001588f3a06572e4b6 WHIRLPOOL 0c6af4bf96dc441315f10aeb979b7f5d8fd8283c278d7c5aae7623f4e7337caf34e9b1dfa4b702e540d622de359f052e682c68f19ae8fb0331192f5d768bd7ed
+MISC ChangeLog-2015 1706 SHA256 2617648ebc1886eb96c1cc0f40236d329354386a9a7e3988913fb4fc18d0fdc7 SHA512 abc1ca021e72b5a78d9701a6bc29ca966c57b1f5498099800620fda94b389513e9d8207b7fa30157345c6ebab3ead2f4771e3058d3404263d3a51d511392ea75 WHIRLPOOL e6d2c39290b8812349e4c0a05adec3302ff99e2a25f2d674a7d870e0ca42e63c13c66bc452f0df544baa5deb9507f8777c401f4d249cfd270f9c77f9ccade669
+MISC metadata.xml 1125 SHA256 508a22c81815d9dc4c88c3f6ca130925ec22ecb034883df8539272193b243c93 SHA512 04950f304ca8c087baa7dc370ff08da07bae555481798848d2ddddda33de318be83fc6a648428ff72419af857dd9bd1bdf0b43866b40e149f33dd834e9c7d9cb WHIRLPOOL bf6d0cb69f42317dacc4cd8b71b42aa5ec0ac07006f71a68cd5f99a0b9faa658cab026999a3d1ed098673cc4215af0ce9e3c2e1791c89ef733d2ef85619f1a45
diff --git a/net-p2p/pybitmessage/files/noninteractive-build.patch b/net-p2p/pybitmessage/files/noninteractive-build.patch
new file mode 100644
index 000000000000..889711a7dce2
--- /dev/null
+++ b/net-p2p/pybitmessage/files/noninteractive-build.patch
@@ -0,0 +1,18 @@
+Temporary workaround for a build system that wants you to press
+"Return" interactively.
+
+https://github.com/Bitmessage/PyBitmessage/issues/993
+
+diff --git a/setup.py b/setup.py
+index 2c769a6..166ab14 100644
+--- a/setup.py
++++ b/setup.py
+@@ -163,7 +163,7 @@ if __name__ == "__main__":
+ print "Press Return to continue"
+ try:
+ nothing = raw_input()
+- except NameError:
++ except EOFError,NameError:
+ pass
+
+ here = os.path.abspath(os.path.dirname(__file__))
diff --git a/net-p2p/pybitmessage/metadata.xml b/net-p2p/pybitmessage/metadata.xml
new file mode 100644
index 000000000000..72a9c8187385
--- /dev/null
+++ b/net-p2p/pybitmessage/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription lang="en">
+ Bitmessage is a P2P communications protocol used to send encrypted
+ messages to another person or to many subscribers. It is
+ decentralized and trustless, meaning that you need-not inherently
+ trust any entities like root certificate authorities. It uses
+ strong authentication which means that the sender of a message
+ cannot be spoofed, and it aims to hide "non-content" data, like
+ the sender and receiver of messages, from passive eavesdroppers
+ like those running warrantless wiretapping programs.
+ </longdescription>
+ <upstream>
+ <bugs-to>
+ https://github.com/Bitmessage/PyBitmessage/issues
+ </bugs-to>
+ <doc lang="en">
+ https://bitmessage.org/wiki/PyBitmessage_Help
+ </doc>
+ <remote-id type="github">Bitmessage/PyBitmessage</remote-id>
+ </upstream>
+ <use>
+ <flag name="opencl">
+ Uses <pkg>dev-python/pyopencl</pkg> for GPU acceleration.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild b/net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild
new file mode 100644
index 000000000000..b9c9b12407d1
--- /dev/null
+++ b/net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils python-r1 gnome2-utils
+
+DESCRIPTION="P2P communications protocol"
+HOMEPAGE="https://bitmessage.org"
+SRC_URI="https://github.com/Bitmessage/PyBitmessage/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ dev-libs/openssl[-bindist]
+ dev-python/PyQt4[${PYTHON_USEDEP}]"
+
+S=${WORKDIR}/PyBitmessage-${PV}
+
+src_compile() { :; }
+
+src_install () {
+ cat >> "${T}"/${PN}-wrapper <<-EOF
+ #!/usr/bin/env python
+ import os
+ import sys
+ sys.path.append("@SITEDIR@")
+ os.chdir("@SITEDIR@")
+ os.execl('@PYTHON@', '@EPYTHON@', '@SITEDIR@/bitmessagemain.py')
+ EOF
+
+ touch src/__init__.py || die
+
+ install_python() {
+ python_moduleinto ${PN}
+ python_domodule src/*
+ sed \
+ -e "s#@SITEDIR@#$(python_get_sitedir)/${PN}#" \
+ -e "s#@EPYTHON@#${EPYTHON}#" \
+ -e "s#@PYTHON@#${PYTHON}#" \
+ "${T}"/${PN}-wrapper > ${PN} || die
+ python_doscript ${PN}
+ }
+
+ python_foreach_impl install_python
+
+ dodoc README.md debian/changelog
+ doman man/*
+
+ newicon -s 24 desktop/icon24.png ${PN}.png
+ newicon -s scalable desktop/can-icon.svg ${PN}.svg
+ domenu desktop/${PN}.desktop
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/pybitmessage/pybitmessage-0.6.2-r2.ebuild b/net-p2p/pybitmessage/pybitmessage-0.6.2-r2.ebuild
new file mode 100644
index 000000000000..df49b8e4e32a
--- /dev/null
+++ b/net-p2p/pybitmessage/pybitmessage-0.6.2-r2.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+# See https://github.com/Bitmessage/PyBitmessage/pull/952 for
+# why ipv6 is needed at the moment.
+PYTHON_REQ_USE="ipv6,sqlite"
+
+inherit distutils-r1 gnome2-utils
+
+MY_PN="PyBitmessage"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="P2P communications protocol"
+HOMEPAGE="https://bitmessage.org/"
+SRC_URI="https://github.com/Bitmessage/${MY_PN}/archive/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl ncurses opencl qt4 sound"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+
+# Some of these can be determined from src/depends.py.
+# The sound deps were found in src/bitmessageqt/__init__.py.
+# And src/openclpow.py imports numpy directly, so throw that in too.
+#
+# All of the dependencies that are behind USE flags are detected
+# and enabled automagically, so maybe it would be better if we
+# required them unconditionally?
+RDEPEND="${DEPEND}
+ dev-python/msgpack[${PYTHON_USEDEP}]
+ !libressl? ( dev-libs/openssl:0[-bindist] )
+ libressl? ( dev-libs/libressl )
+ ncurses? ( dev-python/pythondialog[${PYTHON_USEDEP}] )
+ opencl? (
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyopencl[${PYTHON_USEDEP}]
+ )
+ qt4? ( dev-python/PyQt4[${PYTHON_USEDEP}] )
+ sound? ( || (
+ media-sound/gst123
+ media-sound/alsa-utils
+ media-sound/mpg123
+ ) )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/noninteractive-build.patch")
+
+src_install () {
+ distutils-r1_src_install
+ dodoc README.md
+
+ # The man page is not installed because it's basically empty.
+
+ if use qt4 ; then
+ newicon -s 24 desktop/icon24.png "${PN}.png"
+ newicon -s scalable desktop/can-icon.svg "${PN}.svg"
+ domenu "desktop/${PN}.desktop"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/qbittorrent/Manifest b/net-p2p/qbittorrent/Manifest
new file mode 100644
index 000000000000..821daa70a7cb
--- /dev/null
+++ b/net-p2p/qbittorrent/Manifest
@@ -0,0 +1,9 @@
+DIST qbittorrent-3.3.10.tar.xz 2959380 SHA256 2c657ceacdc84033da044a0a9ecba7e0fdb35858324dc097546f989166f1a8d2 SHA512 4f4e7071fa6db75ed2b5fbf5f17d5a9634aa5f2ed9fbcec52e6a0112967f5832e998384c7ff4962b1e00a0f847fa5d39bcdba36f997b5b895c7688e0dd247516 WHIRLPOOL 950b49d7a15aa7cf16dfe2bbfba72959e91f21f85ba589ce85be370b8b21c03fb389d404ed46ad2c802e3a57660094fe644b20df9bc3a0714cb5d9ea965e1b97
+DIST qbittorrent-3.3.12-cmake-3.8.patch.gz 18330 SHA256 8172d04af3621ed0859ff541ae6c6e73f469125e0b7defd591191ab8c233e658 SHA512 e5aa6aa32f12c47a28658b2382faca88b64be1c198c69ad88f4fcd9f18d2db7a4e71c170dffd142b5af0184105b04dc2409417761db8859f622d42af7d25b060 WHIRLPOOL a68723a52858aed3e0474e0ccc3bcde7a451b388c8cd30ea5548f53e950902e234cb7e9cc32a86c75e367c4cad33a40beab52619de0a1f27442b89a10c25e67f
+DIST qbittorrent-3.3.12.tar.xz 2989604 SHA256 56528c47f09b316ecf682e3896157c76c18898ef996728b0c5186e05a711466f SHA512 537ded71c75b3ab3fe014d77b5c4f8069ebb7a1aa94b5190b16e9ee910bfb70d462e5a3a536ba9222a97d8cceac00af0d33a92b7414b17724694d364fc2374df WHIRLPOOL 9f3b7cb85885691ea747b2569690aa3d1189798be6000e9ec2c8af65ccd86010be877af10b540422233f5b8c253bf221fad0fea6fdc9a0b5dcbc3cedf50613bd
+EBUILD qbittorrent-3.3.10.ebuild 1143 SHA256 456ebc7325327db1f1d1b038133beec898c92934d64a6b6bbf11995d0dbcca6e SHA512 61cb17043dbce205655b77e1c0012b7666b15cb48427344b57c17ad770fe95225eabcffd1d09fe4043bd9a10a9c448938a8f10802f89453bce8b884ba698fa1e WHIRLPOOL dec4961d20b0d9011ca3813ca853b4b3da782a58b1e94442c08992ea6dbf5804a49f5d6a1234ce90aea7bddb25786097d9dd3cba923f561c7b97d6e811975e21
+EBUILD qbittorrent-3.3.12.ebuild 1271 SHA256 fe043fa87998e4c7c106a98e0d37c59e9b19150cf58cf1324743e2237d048ed7 SHA512 d9c51c941f70188ece4a0eccdcb72520c04fb0e08270aa3dff9cc7d44f7033d0e4bd9ac45d8a0231c6a7287bc26fff6f084b51390de36ef704855e107436ce3f WHIRLPOOL 4cc0bb6e9b890a8c23d06abdcf143a94ef3754343f885795c3f23196615dfc96ebef435873faa79bd14c59a77b1b92f3d8554f7670bd0dfe0c6534e7581c010d
+EBUILD qbittorrent-9999.ebuild 1142 SHA256 3efb30ed6ef8a448ee58e2d357d30fe640302bdb449c4634d1cb6eef74b7741e SHA512 43e4c4fe3b11c708ba69e3fd8c1fdfe954c4f0c035b4209d4a78e99fa1e7d37ea0e7dcdd73de74b4c691d17b1a987cc02c55429e81bb7bdc05f47070134c3d46 WHIRLPOOL 9ebe30f3423cac78bb8289d84bfb022a822f3625275f639eac841ba8982af69f315377d9fcf24f9873a9f2cdfd411c5bf90fc3a792f0a1bfc54ac10043fbbde6
+MISC ChangeLog 6485 SHA256 51231493196f2cc40fc1694d37d523c7a0655a5829fe1377166aa664a3a5bca3 SHA512 ba632cc51536c468fe5f8a16359b4b202d8555b12d7cb2fed0c2005f0e96ea540c91e93c29f3efc6ebe546290812fb9b2497b8217d96c070506aa34e61d33bf9 WHIRLPOOL e60ba9887bccd2d4c341436f5239295af7c6995658e128a3e317330b231781af687b6a9e6bdaa699caf0f240b8dbf3ebcb8f0b0a912f562e90747e60407573e4
+MISC ChangeLog-2015 42305 SHA256 8f6966bb488506981770b475e1d8ecd358be38443a5a7aed21a01322cb8ffd8d SHA512 0ccca0b46e2b34918746869484455a4e3216760fde4f959083646633cf22ec40dca153197d4b0a5603aca2b83cc1a8c51a9aaedc5ecac37bd6d285fdf20a8628 WHIRLPOOL b2d3e248049eb72d243b256cfd7a2085520d58b1e16c2259f8861ced04fadc800aebdad6a30763269398b7697be445422f796f83a91ad483be63ad5eb242d76a
+MISC metadata.xml 563 SHA256 bdde38ab74aa974f4ed26b07745d97f2c8c26a5370056a005ea1a89e5ffd8333 SHA512 23f8dfd139eed877c504f7661e98168c561385930afe5b910bb60040d01b33820f25b8a9f6048001fae462bddc2199532ebd05fefe4937639f4c68e906d59462 WHIRLPOOL 48b52ddb96251e163a0fdd10f44df07c406ba521fee4a583312d3f91ce27edf0c5d2c3261eff2644869a8e0e13f10252e77d054159cd423fbf69650e2708ed51
diff --git a/net-p2p/qbittorrent/metadata.xml b/net-p2p/qbittorrent/metadata.xml
new file mode 100644
index 000000000000..06c858a44ece
--- /dev/null
+++ b/net-p2p/qbittorrent/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <use>
+ <flag name="webui">Enable the Web UI</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">qbittorrent/qBittorrent</remote-id>
+ <remote-id type="sourceforge">qbittorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/qbittorrent/qbittorrent-3.3.10.ebuild b/net-p2p/qbittorrent/qbittorrent-3.3.10.ebuild
new file mode 100644
index 000000000000..8ae2e0ecdeef
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-3.3.10.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="http://www.qbittorrent.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
+else
+ MY_P=${P/_}
+ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="amd64 arm ~ppc64 x86"
+ S=${WORKDIR}/${MY_P}
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+dbus debug webui +X"
+REQUIRED_USE="dbus? ( X )"
+
+RDEPEND="
+ >=dev-libs/boost-1.62.0-r1:=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5[ssl]
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5,X?]
+ dev-qt/qtxml:5
+ >=net-libs/libtorrent-rasterbar-1.0.6
+ sys-libs/zlib
+ dbus? ( dev-qt/qtdbus:5 )
+ X? (
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md TODO )
+
+src_configure() {
+ mycmakeargs=(
+ -DQT5=ON
+ -DSYSTEM_QTSINGLEAPPLICATION=ON
+ -DDBUS=$(usex dbus)
+ -DGUI=$(usex X)
+ -DWEBUI=$(usex webui)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-p2p/qbittorrent/qbittorrent-3.3.12.ebuild b/net-p2p/qbittorrent/qbittorrent-3.3.12.ebuild
new file mode 100644
index 000000000000..5f905e2ad776
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-3.3.12.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="https://www.qbittorrent.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
+else
+ MY_P=${P/_}
+ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~kensington/distfiles/${P}-cmake-3.8.patch.gz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+ S=${WORKDIR}/${MY_P}
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+dbus debug webui +X"
+REQUIRED_USE="dbus? ( X )"
+
+RDEPEND="
+ >=dev-libs/boost-1.62.0-r1:=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5[ssl]
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5,X?]
+ dev-qt/qtxml:5
+ >=net-libs/libtorrent-rasterbar-1.0.6
+ sys-libs/zlib
+ dbus? ( dev-qt/qtdbus:5 )
+ X? (
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md TODO )
+
+PATCHES=( "${WORKDIR}"/${P}-cmake-3.8.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DQT5=ON
+ -DSYSTEM_QTSINGLEAPPLICATION=ON
+ -DDBUS=$(usex dbus)
+ -DGUI=$(usex X)
+ -DWEBUI=$(usex webui)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-p2p/qbittorrent/qbittorrent-9999.ebuild b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
new file mode 100644
index 000000000000..867cc4a2d2a1
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="https://www.qbittorrent.org/"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
+else
+ MY_P=${P/_}
+ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+ S=${WORKDIR}/${MY_P}
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+dbus debug webui +X"
+REQUIRED_USE="dbus? ( X )"
+
+RDEPEND="
+ >=dev-libs/boost-1.62.0-r1:=
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5[ssl]
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5,X?]
+ dev-qt/qtxml:5
+ >=net-libs/libtorrent-rasterbar-1.0.6
+ sys-libs/zlib
+ dbus? ( dev-qt/qtdbus:5 )
+ X? (
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS Changelog CONTRIBUTING.md README.md TODO )
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSTEM_QTSINGLEAPPLICATION=ON
+ -DDBUS=$(usex dbus)
+ -DGUI=$(usex X)
+ -DWEBUI=$(usex webui)
+ )
+ cmake-utils_src_configure
+}
diff --git a/net-p2p/retroshare/Manifest b/net-p2p/retroshare/Manifest
new file mode 100644
index 000000000000..4998fbe21967
--- /dev/null
+++ b/net-p2p/retroshare/Manifest
@@ -0,0 +1,9 @@
+AUX retroshare-0.6.3-fix-comment.patch 820 SHA256 04f5bb990cceb7b7e6690003d9727f751d2a54fd9efd361b84509abf0622500e SHA512 d27e7a655a0848a1e5feb11778df8e3b1a6a1a6fdde09848d78cb4550842e7b9a581491c7040ce1642773db6b0429f67ff3069c6fc6d6938c20d97e91af5c6bb WHIRLPOOL 1999bf7596341356f647499f32283732f115fabad81d5ab0f0e112ed80a9b3813304564c1d5c59987067224bf28a77e9ea819b3937009deac340b8fbd5ec4d19
+DIST retroshare-0.6.2.tar.gz 18523943 SHA256 76a3ae2f2089b14562d5be34602f5ae3c73a8549aecee246ea5e67d03018de2b SHA512 7b935321f436d72948c5c0286ef5e0236bd52d1b25f00980a3b3644ae4acbde043063279f90f6bc0356363bceda484aba57e160f34f013dde120b4f6969ef6c7 WHIRLPOOL 054f5ec8dbf70c89dabaccb50265bbf2a97fe1b2eab6c6a13d0b86f0dd1d4e4097e4eacf163fa75f4cd1225307e4c2d214dddb364de7a29b809c1dc0f767c32e
+DIST retroshare-0.6.3.tar.gz 19699359 SHA256 ddb64aa5148fdc950d4426f52f1cbb11578619b1242614e3c4ca4792ee5ce30b SHA512 ee699ddc71aba3d20498d46e8183953b948896709d1469a5d5374b7c9b7955e460326b1ea3fe6f87e7235c5d2d5e8f042161410a0990b2dd2a44b42551fb5757 WHIRLPOOL 38b78b920b4be88a313d3edad4e299c05667597a1945cd3455cbf2545a673f38ceb5b2cc4703a13b2f6a199b3ea72823934650446d51c144c0efdb946dd0a1d6
+EBUILD retroshare-0.6.2.ebuild 3606 SHA256 13c54eea6f0823b4abb6bbeaceb0352bf777b944ae102c3c9abb65cef53380f3 SHA512 cc7b3a218a362d36ea8b4aae6978cbd2c9394924dda1d172feccc3445cf7e73245e38dccd00213d5f67645c07fbf37a4ecf1b1dca24c5d93e5b3050272d5a28b WHIRLPOOL 3bfeecb9693d69fd46bf31e3bd7e74853384251372a2417de707914ac632648035ab2d625cfa965f3348b6b5901f5bee642e5874267b86880085f61c93b042e4
+EBUILD retroshare-0.6.3.ebuild 3926 SHA256 4838b4b4c59cf4b659db2dd115ae722af76b4631db0ecb28510c9653bbb7960b SHA512 5f0007f05015f26000614da3ede681db96ab800651a425ee2f11706d02dfa6d546651f268b0db1fe764317aba392a4770f38f50e15eb6e420eb911fd088dfc72 WHIRLPOOL 944b233512983f4ecb74465252b77735e690634ad3f1a5a0f824c17801e35e4b4b71e8c1c0c135a1343c67d6139a9b88748b7bb7ad3304f193c4e73cb872f54c
+EBUILD retroshare-0.6.9999.ebuild 3677 SHA256 1605423ced83dcfd20921dbe09c917a0c7b867273de220ba24d5e4b7df5f517d SHA512 4d194c1dc3e0b9000448fa1297d23d873406ec64ed5a30c8571155bf9fd74d815ef115b4df2274e64b12e3b891ae082ae1fb6500accb85bf2e351b1a8557e407 WHIRLPOOL 50cbdf3618f56f378ec9fada4e54a4d10e2f2d8098c1609cf013cc96493419e6d8db08324edcd3c90d3be1fbf08649cc6c542e59980c2d9e6f058767ab065d69
+MISC ChangeLog 6272 SHA256 d23db8bc61d00a94a18cf5728f7662bd6f3ea3496177225d4952b51ad8c7cab3 SHA512 8a2e3c28f95e8dcc7a3518b5cf9b708dda13d8455adb0970de22e66c6b2c44e934c44b3703fdaf7bddd812677ee57d09516266954285240a14776409e5ad3f06 WHIRLPOOL 29d5bdd70d62b0bfa7213c35006fd2f6e3c872f8dc544103cf6bce032ae901d7da10d830e7f63b6fbf57b70296aecc25f7a14fdc8901ce1df9d44ba176e1c366
+MISC ChangeLog-2015 2111 SHA256 9dd493206ef786ed5512126c1400372e37d4b6c37ba922205d48aa1e1658f5ef SHA512 9d85e7ceec1d62edde2bcb34193385f3bd276b300b7646a07dfe9b4b04d94b07364bb4bd8fc2f006cc302325022dd029cf64f49cd8d77384465100f6d62d5ae3 WHIRLPOOL 5770d827830097e98793b753057aa28c7a0b0a434316ef924207b5689bad04c7730b22fc42e798e2fa50c49bc81b4dba84d2f4753c0f97988e88a161e648f1d8
+MISC metadata.xml 1209 SHA256 a3e1e519f0ca4651b1635961a46096cc1e0cdc30783d80833ec259d7897c97fe SHA512 5cc0be6c279660138cfd37d25ab01cf680e4519556334102d927bd6a034c652bc81465bb35f17dfba76f0d9bce4c5a6a63362b54b2fc66b4c357ca8728b80797 WHIRLPOOL 084c3164b1cebe048a0a036494dd6141572ea98373ab5574116845a5a52806357f1033ff4211e15d6e4eadefaa92ba2ce31a14852286e608f17fa8005b087572
diff --git a/net-p2p/retroshare/files/retroshare-0.6.3-fix-comment.patch b/net-p2p/retroshare/files/retroshare-0.6.3-fix-comment.patch
new file mode 100644
index 000000000000..20652f180cd6
--- /dev/null
+++ b/net-p2p/retroshare/files/retroshare-0.6.3-fix-comment.patch
@@ -0,0 +1,19 @@
+commit b686771a38c93339ece773bd5ae4d0db1fa629b7
+Author: Gleb Nemshilov <gleb@fastmail.com>
+Date: Sun Aug 6 14:27:26 2017 +0700
+
+ fix C++ comment to avoid compilation error
+
+diff --git a/supportlibs/pegmarkdown/utility_functions.c b/supportlibs/pegmarkdown/utility_functions.c
+index 08f910274..9445de420 100644
+--- a/supportlibs/pegmarkdown/utility_functions.c
++++ b/supportlibs/pegmarkdown/utility_functions.c
+@@ -26,7 +26,7 @@ element *reverse(element *list) {
+ element *new = NULL;
+ element *next = NULL;
+ #warning Phenom (2017-07-21): I don't know if it is a real memLeak for new. If not remove this warning and add a comment how it is deleted.
+- // cppcheck-suppress memleak
++ /* cppcheck-suppress memleak */
+ while (list != NULL) {
+ next = list->next;
+ new = cons(list, new);
diff --git a/net-p2p/retroshare/metadata.xml b/net-p2p/retroshare/metadata.xml
new file mode 100644
index 000000000000..b92e67f30115
--- /dev/null
+++ b/net-p2p/retroshare/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+ RetroShare is a Open Source cross-platform, Friend-2-Friend and
+ secure decentralised communication platform.
+ It lets you to securely chat and share files with your friends
+ and family, using a web-of-trust to authenticate peers and OpenSSL
+ to encrypt all communication.
+ RetroShare provides filesharing, chat, messages, forums and
+ channels
+ </longdescription>
+ <use>
+ <flag name="cli">Enables the CLI version of RetroShare</flag>
+ <flag name="feedreader">Enables the Feedreader plugin</flag>
+ <flag name="gnome-keyring">Enables potentially insecure autologin capability via Gnome Keyring</flag>
+ <flag name="gui">Enables the GUI version of RetroShare</flag>
+ <flag name="voip">Enables VOIP plugin</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://sourceforge.net/p/retroshare/bugs</bugs-to>
+ <remote-id type="sourceforge">retroshare</remote-id>
+ <remote-id type="github">RetroShare/RetroShare</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/retroshare/retroshare-0.6.2.ebuild b/net-p2p/retroshare/retroshare-0.6.2.ebuild
new file mode 100644
index 000000000000..86ae46473b4a
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.6.2.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gnome2-utils qmake-utils versionator
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.net"
+SRC_URI="https://github.com/RetroShare/RetroShare/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+# pegmarkdown can also be used with MIT
+LICENSE="GPL-2 GPL-3 Apache-2.0 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="cli feedreader gnome-keyring +gui voip"
+REQUIRED_USE="
+ || ( cli gui )
+ feedreader? ( gui )
+ voip? ( gui )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlcipher
+ dev-libs/openssl:0
+ dev-qt/qtcore:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtscript:5
+ dev-qt/qtxml:5
+ net-libs/libmicrohttpd
+ net-libs/libupnp:0
+ sys-libs/zlib
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ )
+ gui? (
+ dev-qt/designer:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ )
+ voip? (
+ media-libs/opencv[-qt4(-)]
+ media-libs/speex
+ virtual/ffmpeg[encode]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/RetroShare-${PV}"
+
+src_prepare() {
+ local dir
+
+ sed -i \
+ -e "s|/usr/lib/retroshare/extensions6/|/usr/$(get_libdir)/${PN}/extensions6/|" \
+ libretroshare/src/rsserver/rsinit.cc \
+ || die "sed on libretroshare/src/rsserver/rsinit.cc failed"
+
+ rs_src_dirs="libbitdht/src openpgpsdk/src libresapi/src libretroshare/src supportlibs/pegmarkdown"
+ use cli && rs_src_dirs="${rs_src_dirs} retroshare-nogui/src"
+ use feedreader && rs_src_dirs="${rs_src_dirs} plugins/FeedReader"
+ use gui && rs_src_dirs="${rs_src_dirs} retroshare-gui/src"
+ use voip && rs_src_dirs="${rs_src_dirs} plugins/VOIP"
+
+ # Force linking to sqlcipher ONLY
+ sed -i \
+ -e '/isEmpty(SQLCIPHER_OK) {/aerror(libsqlcipher not found)' \
+ retroshare-gui/src/retroshare-gui.pro \
+ retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed'
+
+ # Avoid openpgpsdk false dependency on qtgui
+ sed -i '2iQT -= gui' openpgpsdk/src/openpgpsdk.pro
+
+ eapply_user
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ pushd "${S}/${dir}" >/dev/null || die
+ eqmake5 $(use gnome-keyring && echo CONFIG+=rs_autologin)
+ popd >/dev/null || die
+ done
+}
+
+src_compile() {
+ local dir
+
+ for dir in ${rs_src_dirs} ; do
+ emake -C "${dir}"
+ done
+
+ unset rs_src_dirs
+}
+
+src_install() {
+ local i
+ local extension_dir="/usr/$(get_libdir)/${PN}/extensions6/"
+
+ use cli && dobin retroshare-nogui/src/RetroShare06-nogui
+ use gui && dobin retroshare-gui/src/RetroShare06
+
+ exeinto "${extension_dir}"
+ use feedreader && doexe plugins/FeedReader/*.so*
+ use voip && doexe plugins/VOIP/*.so*
+
+ insinto /usr/share/RetroShare06
+ doins libbitdht/src/bitdht/bdboot.txt
+
+ doins -r libresapi/src/webui
+
+ dodoc README.md
+ make_desktop_entry RetroShare06
+ for i in 24 48 64 128 ; do
+ doicon -s ${i} "data/${i}x${i}/apps/retroshare06.png"
+ done
+}
+
+pkg_preinst() {
+ local ver
+ for ver in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 0.5.9999 ${ver}; then
+ elog "You are upgrading from Retroshare 0.5.* to ${PV}"
+ elog "Version 0.6.* is backward-incompatible with 0.5 branch"
+ elog "and clients with 0.6.* can not connect to clients that have 0.5.*"
+ elog "It's recommended to drop all your configuration and either"
+ elog "generate a new certificate or import existing from a backup"
+ break
+ fi
+ done
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/retroshare/retroshare-0.6.3.ebuild b/net-p2p/retroshare/retroshare-0.6.3.ebuild
new file mode 100644
index 000000000000..8e7f93647e41
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.6.3.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gnome2-utils qmake-utils versionator
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.net"
+SRC_URI="https://github.com/RetroShare/RetroShare/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+# pegmarkdown can also be used with MIT
+LICENSE="GPL-2 GPL-3 Apache-2.0 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="cli feedreader gnome-keyring +gui voip"
+REQUIRED_USE="
+ || ( cli gui )
+ feedreader? ( gui )
+ voip? ( gui )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlcipher
+ dev-libs/openssl:0
+ dev-qt/qtcore:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtscript:5
+ dev-qt/qtxml:5
+ net-libs/libmicrohttpd
+ net-libs/libupnp:0
+ sys-libs/zlib
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ )
+ gui? (
+ dev-qt/designer:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ )
+ voip? (
+ media-libs/opencv[-qt4(-)]
+ media-libs/speex
+ virtual/ffmpeg[encode]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/RetroShare-${PV}"
+
+src_prepare() {
+ local dir
+
+ sed -i \
+ -e "s|/usr/lib/retroshare/extensions6/|/usr/$(get_libdir)/${PN}/extensions6/|" \
+ libretroshare/src/rsserver/rsinit.cc \
+ || die "sed on libretroshare/src/rsserver/rsinit.cc failed"
+
+ rs_src_dirs="libbitdht/src openpgpsdk/src libresapi/src libretroshare/src supportlibs/pegmarkdown"
+ use cli && rs_src_dirs="${rs_src_dirs} retroshare-nogui/src"
+ use feedreader && rs_src_dirs="${rs_src_dirs} plugins/FeedReader"
+ use gui && rs_src_dirs="${rs_src_dirs} retroshare-gui/src"
+ use voip && rs_src_dirs="${rs_src_dirs} plugins/VOIP"
+
+ # Force linking to sqlcipher ONLY
+ sed -i \
+ -e '/isEmpty(SQLCIPHER_OK) {/aerror(libsqlcipher not found)' \
+ retroshare-gui/src/retroshare-gui.pro \
+ retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed'
+
+ # Avoid openpgpsdk false dependency on qtgui
+ sed -i '2iQT -= gui' openpgpsdk/src/openpgpsdk.pro || die
+
+ # Fix version
+ sed -i -e '/RS_BUILD_NUMBER/s/2/3/' libretroshare/src/retroshare/rsversion.in || die
+
+ # Fix comment not allowed in C++11
+ eapply "${FILESDIR}/${P}-fix-comment.patch"
+
+ eapply_user
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ pushd "${S}/${dir}" >/dev/null || die
+ eqmake5 $(use gnome-keyring && echo CONFIG+=rs_autologin)
+ popd >/dev/null || die
+ done
+}
+
+src_compile() {
+ local dir
+
+ for dir in ${rs_src_dirs} ; do
+ emake -C "${dir}"
+ done
+
+ unset rs_src_dirs
+}
+
+src_install() {
+ local i
+ local extension_dir="/usr/$(get_libdir)/${PN}/extensions6/"
+
+ use cli && dobin retroshare-nogui/src/retroshare-nogui
+ use gui && dobin retroshare-gui/src/retroshare
+
+ exeinto "${extension_dir}"
+ use feedreader && doexe plugins/FeedReader/*.so*
+ use voip && doexe plugins/VOIP/*.so*
+
+ insinto /usr/share/retroshare
+ doins libbitdht/src/bitdht/bdboot.txt
+
+ doins -r libresapi/src/webui
+
+ dodoc README.md
+ make_desktop_entry retroshare
+ for i in 24 48 64 128 ; do
+ doicon -s ${i} "data/${i}x${i}/apps/retroshare.png"
+ done
+}
+
+pkg_preinst() {
+ local ver
+ for ver in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 0.5.9999 ${ver}; then
+ elog "You are upgrading from Retroshare 0.5.* to ${PV}"
+ elog "Version 0.6.* is backward-incompatible with 0.5 branch"
+ elog "and clients with 0.6.* can not connect to clients that have 0.5.*"
+ elog "It's recommended to drop all your configuration and either"
+ elog "generate a new certificate or import existing from a backup"
+ break
+ fi
+ if version_is_at_least 0.6.0 ${ver}; then
+ elog "Main executable was renamed upstream from RetroShare06 to retroshare"
+ break
+ fi
+ done
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/retroshare/retroshare-0.6.9999.ebuild b/net-p2p/retroshare/retroshare-0.6.9999.ebuild
new file mode 100644
index 000000000000..2a62dc7dc3dc
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.6.9999.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGIT_REPO_URI="https://github.com/RetroShare/RetroShare.git"
+inherit eutils git-r3 gnome2-utils qmake-utils versionator
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.net"
+
+# pegmarkdown can also be used with MIT
+LICENSE="GPL-2 GPL-3 Apache-2.0 LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+
+IUSE="cli feedreader gnome-keyring +gui voip"
+REQUIRED_USE="
+ || ( cli gui )
+ feedreader? ( gui )
+ voip? ( gui )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlcipher
+ dev-libs/openssl:0
+ dev-qt/qtcore:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtscript:5
+ dev-qt/qtxml:5
+ net-libs/libmicrohttpd
+ net-libs/libupnp:0
+ sys-libs/zlib
+ gnome-keyring? ( gnome-base/libgnome-keyring )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ )
+ gui? (
+ dev-qt/designer:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ )
+ voip? (
+ media-libs/opencv[-qt4(-)]
+ media-libs/speex
+ virtual/ffmpeg[encode]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ local dir
+
+ sed -i \
+ -e "s|/usr/lib/retroshare/extensions6/|/usr/$(get_libdir)/${PN}/extensions6/|" \
+ libretroshare/src/rsserver/rsinit.cc \
+ || die "sed on libretroshare/src/rsserver/rsinit.cc failed"
+
+ rs_src_dirs="libbitdht/src openpgpsdk/src libresapi/src libretroshare/src supportlibs/pegmarkdown"
+ use cli && rs_src_dirs="${rs_src_dirs} retroshare-nogui/src"
+ use feedreader && rs_src_dirs="${rs_src_dirs} plugins/FeedReader"
+ use gui && rs_src_dirs="${rs_src_dirs} retroshare-gui/src"
+ use voip && rs_src_dirs="${rs_src_dirs} plugins/VOIP"
+
+ # Force linking to sqlcipher ONLY
+ sed -i \
+ -e '/isEmpty(SQLCIPHER_OK) {/aerror(libsqlcipher not found)' \
+ retroshare-gui/src/retroshare-gui.pro \
+ retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed'
+
+ # Avoid openpgpsdk false dependency on qtgui
+ sed -i '2iQT -= gui' openpgpsdk/src/openpgpsdk.pro || die
+
+ eapply_user
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ pushd "${S}/${dir}" >/dev/null || die
+ eqmake5 $(use gnome-keyring && echo CONFIG+=rs_autologin)
+ popd >/dev/null || die
+ done
+}
+
+src_compile() {
+ local dir
+
+ for dir in ${rs_src_dirs} ; do
+ emake -C "${dir}"
+ done
+
+ unset rs_src_dirs
+}
+
+src_install() {
+ local i
+ local extension_dir="/usr/$(get_libdir)/${PN}/extensions6/"
+
+ use cli && dobin retroshare-nogui/src/retroshare-nogui
+ use gui && dobin retroshare-gui/src/retroshare
+
+ exeinto "${extension_dir}"
+ use feedreader && doexe plugins/FeedReader/*.so*
+ use voip && doexe plugins/VOIP/*.so*
+
+ insinto /usr/share/retroshare
+ doins libbitdht/src/bitdht/bdboot.txt
+
+ doins -r libresapi/src/webui
+
+ dodoc README.md
+ make_desktop_entry retroshare
+ for i in 24 48 64 128 ; do
+ doicon -s ${i} "data/${i}x${i}/apps/retroshare.png"
+ done
+}
+
+pkg_preinst() {
+ local ver
+ for ver in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 0.5.9999 ${ver}; then
+ elog "You are upgrading from Retroshare 0.5.* to ${PV}"
+ elog "Version 0.6.* is backward-incompatible with 0.5 branch"
+ elog "and clients with 0.6.* can not connect to clients that have 0.5.*"
+ elog "It's recommended to drop all your configuration and either"
+ elog "generate a new certificate or import existing from a backup"
+ break
+ fi
+ if version_is_at_least 0.6.0 ${ver}; then
+ elog "Main executable was renamed upstream from RetroShare06 to retroshare"
+ break
+ fi
+ done
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/rtorrent/Manifest b/net-p2p/rtorrent/Manifest
new file mode 100644
index 000000000000..eb1db8798260
--- /dev/null
+++ b/net-p2p/rtorrent/Manifest
@@ -0,0 +1,13 @@
+AUX rtorrent-0.9.1-ncurses.patch 416 SHA256 043f85f5e77de132f5a8aeccc894f11fad961f237a5c092dd38e163620f6e40e SHA512 bc36d56880fbfb99d6e5cb19688d733d79a89c8aec88913f5962ea72503e4103b34eb2a67be76bbe80c35beda972f6fc5dbf1947f89624bf5e117774688e7cf8 WHIRLPOOL 211bff140ee9094fde6b9f21a0a853c26d79f79a9727203ee7d96b010795620d5d7eb01d683cfceee0a31c5d0c0701a85054b259f7c21c35ebac0ccd9de4fe53
+AUX rtorrent-0.9.4-tinfo.patch 1137 SHA256 8c12b5715baec6afc362fa82743b3660ce1ab92edd1bc47048e4af3478f63318 SHA512 5f571daa1bdaa8823bbbf52c66df3ff88be487e3fdaa8ea4f45c26b13336995a4a81a712766a8181bc85746e458652bb11c4dcc28d76da3137025e52e614c179 WHIRLPOOL d44ec1195fb41e43683313083d1f90276f080515cb2e0be68d132a2c1874326b5db23e8dbc0c5063f5a19ecafbb42ea0f09fa551850346e37ab5bf63038bd0a6
+AUX rtorrent-0.9.6-cppunit-pkgconfig.patch 857 SHA256 110dfab5a48adc16f0fa5104a6911332dddf1fdee5784f03c57debfdb5435e4d SHA512 94cf317ef2ec8dae361fa82df156bee153f58c927bdc4f203c5318ba839f8a7024021a4d2e90771b067f313c8ff524659b41aaa386b1a2341561f196c97fc03f WHIRLPOOL ba1861da398803e93518d4b1a02f978df7d67ddf3281310ffd9e98dabf58855c6b19f9ddb7a6c98d60253e9e9faaa1fc5f2fa06a21e9d62ae840de22641106b4
+AUX rtorrent.1 18204 SHA256 bac10215777c9a22826f56f6218b21734306e30e179deeab47164a845b01dae9 SHA512 f2d3fb87fd7c321822ce9e61cc334682f9692e3f86b42cb3d7d5826dec53d56e631e20455e0ea1e53448c11386988a6e7a70a91ed2923f90852956ad3fdafcfe WHIRLPOOL 6e98f2ce7660cf00fd8a7fb8d9cfcb2f44867a18d3376c6434aef0cf61703c5939743f7194ee76de3bb7b1dccf5fd8a4461047f96c210c5b13afee58048ee76e
+AUX rtorrentd.conf 13 SHA256 6725e7a3ed74f1432bd6b317f2aec7f9609bc20dd81dbbfcc632342c9f99177b SHA512 f241452b812a1837660f9ad52881feacc02825e82ea7ac19acc662b4219dd58997ea908275b8c9ee78ed791babf79c1a91069dc6d5b5fb3c461e3026cdeab73f WHIRLPOOL 11f799ee54cc3f4ae535fca30d4f41748149c6869a2217f7c67e03ffab87792e5d5679d6fcc69697b8ffab60690e7187262e57bc68afea0a3244a24095db2235
+AUX rtorrentd.init 702 SHA256 0c5999447341924265eb520ae378b5871949dbf19c70699fbbd34c2c78d18475 SHA512 6ac954e78dfa29a56ccfb53f666a96b7e93ec919b613f609ce16e312d44ab7c3adb849af826695494a92f882fb051f3e7c8a97d1b283ea9ac8673333ef8f8ab6 WHIRLPOOL 41e118f3a2825752f37af32807f4c32c79d4ac4631ceca8afa61798d104e6036aeb631e8ba7842523b4546a5ac41d61cf8b391e2db5bc0e76ba15ae532ac3982
+AUX rtorrentd_at.service 308 SHA256 f3de3506146e3dac6698028378d51a9f62a2fa8957173b250bf607bc6ceb57e8 SHA512 cc707500af2dbb0cc0c8297512807f9312445cf70de00bcf2f7267388834f1d0454eaaa9a8b52387e5f84288400286414225c55af0f560f61a8d0858971a8615 WHIRLPOOL 8060403740dec4d92c8527c1b5b5d5902fbcdb43f20d2639e3fc644bc7bbd73c890c76d1f85c3bec9ab9e8a7d5fe74e779b8bdaaa3f8a52c234e8ce4de417778
+DIST rtorrent-0.9.6.tar.gz 610845 SHA256 1e69c24f1f26f8f07d58d673480dc392bfc4317818c1115265b08a7813ff5b0e SHA512 704f7b79d5bc78b817da21a6886662a5a97fde210a110c50f708bdc18e1dcf3ef5c5f4e2740261d41221cfc69c19926bf34e10057adf10601da9e6e06b2cef75 WHIRLPOOL df5878014087d894e9796508627ec508ff5d042c78cc09e8d9ae57a7f9556bb549f9900e3995a7296420438ca0edda245907f8ae0c71d5a0ae28c3af7a6f992e
+EBUILD rtorrent-0.9.6-r1.ebuild 1666 SHA256 ef7875bc1d8c5dc34bf52c3294729030ba394664f31259a33536996cb5b392b9 SHA512 424d4be8a4e1fdda05649911df8c2f6334ac746b28124b42de2aa08ed5c0195927683fea477dc265a6098180ad0df032a5a5a05e797656cc00e195ad4fc30607 WHIRLPOOL 7849ea0aa4e083646e02eeb75dfbcd1574a7e0a0176bedf6639c225c104bf7c630a73fa28d849af6e2fd6ea8db280e13d98010ef124e4ee46160afb0e471f096
+EBUILD rtorrent-0.9.6.ebuild 1607 SHA256 65df8be3e41caa2916f752792b10c9e9cbe138a4ada3a31d8b65566339fcea43 SHA512 8fe7ab26bd876073b09ae926e979a32d926374a411a70753b7133731f5a381ec2577df095689fa9fc7d759792e62dae7734324e24446b3c01f4f97322f17f04b WHIRLPOOL a34343707fbf59286e33d087b23b4452106cab797a8c2371ea9c3e15de5a93a10537b7a983941db9c09c054b6e46c29c065c3840985fa723d9b2e204fa11c8b7
+MISC ChangeLog 4603 SHA256 4f54e944391ea3138ded299645d00aec5e37d4ac53d000259c72b7a66fd15e04 SHA512 7468aca2ff09fe11064213d6fd25b2946b2dcdf7fcad7cbcaa23ecbcdd2e670d83aceb80e48dcec0bfbf9c904cce3f58f88c4632a4e09458b67760927acb035c WHIRLPOOL c90988ac796a33ee5e35a81172fa8cddc1614fd2a89401c9b594dddb81efa0c75ab6919d8f8682fe6ffa531c6b98a057d1e3a9ed7644f8a3d9bb75f3e5964e7b
+MISC ChangeLog-2015 30299 SHA256 56a50fc40703456a109c21b62c768a999c8baf18684ff35658fda55e08cc2790 SHA512 661d2db8b47ec1f7463e62e412f2a9d67b01536d4401eafa77521af7805c4d3caf61249de9cee8585d0555c32dc65dd8a21127eeef8251caef3f93b8c5199785 WHIRLPOOL d6e32052df092c0ba95955c7f07f7bfb4fd39d5fbad593949c0ca69d9aa85cf676ec728c5d4745b0443fb799b1bcb2743fcda2cfc574603856f4e0b864fb8e27
+MISC metadata.xml 565 SHA256 cc54c7299c8cc77dbef242d12ff9a8bdb43d1305d05c93758f923864d99a13d6 SHA512 7ab72e3c6f7fdf9113f1888000f4779986d1f154c226dc1053fb681484214297ebed1c1d6413e0c7bf24a1701036c90e619ffdae9edbb30152fc8c43eeb41b6a WHIRLPOOL 48ccdd5eccaf1c95937618be063e42d2d116df3a54c40c534b90774534bdabb0aaa8fd97e6dc2beeb820c732d9439305cd86d9105ba90a14b5cf92e6ce3dd31a
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch b/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
new file mode 100644
index 000000000000..260cd9a38425
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.1-ncurses.patch
@@ -0,0 +1,10 @@
+--- src/display/canvas.h
++++ src/display/canvas.h
+@@ -48,5 +48,5 @@ class Canvas {
+ public:
+ typedef std::vector<Attributes> attributes_list;
+
+- Canvas(int x = 0, int y = 0, int width = 0, int height = 0);
++ Canvas(int x = 0, int y = 0, int width = 1, int height = 1);
+ ~Canvas() { delwin(m_window); }
+ void refresh() { wnoutrefresh(m_window); }
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch b/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
new file mode 100644
index 000000000000..21ee708782b3
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.4-tinfo.patch
@@ -0,0 +1,37 @@
+bug 462788
+
+ configure.ac | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 430c15d..50ce687 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,15 +31,21 @@ TORRENT_WITHOUT_STATVFS()
+ TORRENT_WITHOUT_STATFS()
+
+ AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
+-AX_WITH_CURSES()
+-
+-if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
+- AC_MSG_ERROR([requires either NcursesW or Ncurses library])
+-fi
++PKG_CHECK_MODULES([CURSES],[ncursesw],[
++ AC_DEFINE(HAVE_NCURSESW_CURSES_H, 1)
++ ],
++ [PKG_CHECK_MODULES([CURSES],[ncurses],[
++ AC_DEFINE(HAVE_NCURSES_H, 1)
++ ],
++ [AX_WITH_CURSES()
++ if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
++ AC_MSG_ERROR([requires either NcursesW or Ncurses library])
++ fi])
++ ])
+
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-LIBS="$PTHREAD_LIBS $CURSES_LIB $LIBS"
++LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
+
+ PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
+ CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch b/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
new file mode 100644
index 000000000000..753f4cb8a7f3
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent-0.9.6-cppunit-pkgconfig.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/620908
+
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac 2017-08-17 08:52:49.596897308 -0500
++++ b/configure.ac 2017-08-17 08:54:57.171515415 -0500
+@@ -4,7 +4,6 @@
+
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS(config.h)
+-AM_PATH_CPPUNIT(1.9.6)
+
+ AC_PROG_CXX
+ AC_PROG_LIBTOOL
+@@ -43,9 +42,11 @@
+ fi])
+ ])
+
+-CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CURSES_CFLAGS"
+-LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $LIBS"
++PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
++
++CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
++CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $CURSES_CFLAGS"
++LIBS="$PTHREAD_LIBS $CURSES_LIB $CURSES_LIBS $CPPUNIT_LIBS $LIBS"
+
+ PKG_CHECK_MODULES([libcurl], libcurl >= 7.15.4,
+ CXXFLAGS="$CXXFLAGS $libcurl_CFLAGS";
diff --git a/net-p2p/rtorrent/files/rtorrent.1 b/net-p2p/rtorrent/files/rtorrent.1
new file mode 100644
index 000000000000..9ad120816c12
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrent.1
@@ -0,0 +1,560 @@
+.\" This manpage has been automatically generated by docbook2man
+.\" from a DocBook document. This tool can be found at:
+.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
+.\" Please send any bug reports, improvements, comments, patches,
+.\" etc. to Steve Cheng <steve@ggi-project.org>.
+.TH "RTORRENT" "1" "14 May 2009" "BitTorrent client for ncurses" ""
+
+.SH NAME
+rtorrent \- a BitTorrent client for ncurses
+.SH SYNOPSIS
+
+\fBrtorrent\fR [ \fB-h\fR ] [ \fB-n\fR ] [ \fB-o key1=opt1,...\fR ] [ \fB-O key=opt\fR ] [ \fBURL | FILE\fR\fI ...\fR ]
+
+.SH "DESCRIPTION"
+.PP
+\fBrtorrent\fR is a BitTorrent client for ncurses, using
+the \fBlibtorrent\fR library. The client and library is
+written in C++ with emphasis on speed and efficiency, while delivering
+equivalent features to those found in GUI based clients in an ncurses
+client.
+.PP
+Most of the options below have their own default unit in addition to
+supporting B, K, M and G suffixes.
+.SH "KEYBOARD CONTROL"
+.PP
+.SS "GLOBAL KEYS"
+.TP
+\fB^q\fR
+Initiate shutdown, press again to force the shutdown and
+skip sending the stop signal to trackers.
+.TP
+\fBup | down | left | right arrow keys\fR
+.TP
+\fB^P | ^N | ^B | ^F\fR
+Select entries or change windows. The right arrow key or ^F is often
+used for viewing details about the selected entry, while the left
+arrow key or ^B often returns to the previous screen.
+.TP
+\fBa | s | d\fR
+Increase the upload throttle by 1/5/50 KB.
+.TP
+\fBA | S | D\fR
+Increase the download throttle by 1/5/50 KB.
+.TP
+\fBz | x | c\fR
+Decrease the upload throttle by 1/5/50 KB.
+.TP
+\fBZ | X | C\fR
+Decrease the download throttle by 1/5/50 KB.
+.SS "MAIN VIEW KEYS"
+.TP
+\fB->\fR
+View download.
+.TP
+\fB1 - 7\fR
+Change view.
+.TP
+\fB^S\fR
+Start download.
+.TP
+\fB^D\fR
+Stop an active download, or remove a stopped download.
+.TP
+\fB^K\fR
+Close a torrent and its files.
+.TP
+\fB^E\fR
+Set the 'create/resize queued' flags on all files in a torrent. This
+is necessary if the underlying files in a torrent have been deleted or
+truncated, and thus rtorrent must recreate them.
+.TP
+\fB^R\fR
+Initiate hash check of torrent.
+.TP
+\fB^O\fR
+Change the destination directory of the download. The torrent must be
+closed.
+.TP
+\fB^X\fR
+Call commands or change settings.
+.TP
+\fB^B\fR
+Set download to perform initial seeding. Only use when
+you are the first and only seeder so far for the download.
+.TP
+\fB+ | -\fR
+Change the priority of the download.
+.TP
+\fBbackspace\fR
+Add torrent using a URL or file path. Use
+\fBtab\fR to view directory content and do
+auto-complete.
+.TP
+\fBl\fR
+View log. Exit by pressing the space-bar.
+.TP
+\fBU\fR
+Delete the file the torrent is tied to, and clear the association.
+.TP
+\fBI\fR
+Toggle whether torrent ignores ratio settings.
+.SS "DOWNLOAD VIEW KEYS"
+.TP
+\fB->\fR
+View torrent file list. Use the space-bar to change the file priority
+and \fB*\fR to change the priority of all
+files. Use \fB/\fR to collapse the directories. OUTDATED
+.TP
+\fB1 | 2\fR
+Adjust max uploads.
+.TP
+\fB3 | 4\fR
+Adjust min peers.
+.TP
+\fB5 | 6\fR
+Adjust max peers.
+.TP
+\fBu\fR
+Display transfering blocks.
+.TP
+\fBi\fR
+Display chunk rarity.
+.TP
+\fBo\fR
+Display the tracker list. Cycle the trackers in a group with the
+space-bar.
+.TP
+\fBp\fR
+View peer and torrent information.
+.TP
+\fBt | T\fR
+Initiate tracker request. Use capital T to force the request, ignoring
+the "min interval" set by the tracker.
+.TP
+\fBk\fR
+Disconnect peer.
+.TP
+\fB*\fR
+Choke/Snub peer.
+.SH "OPTIONS"
+.TP
+\fB-b \fIa.b.c.d\fB\fR
+Bind listening socket and outgoing connections to this network
+interface address.
+.TP
+\fB-d \fIdirectory\fB\fR
+Set the default download directory. Defaults to "./".
+.TP
+\fB-h\fR
+Display help and exit.
+.TP
+\fB-i \fIa.b.c.d\fB\fR
+Set the address reported to the tracker.
+.TP
+\fB-n\fR
+Don't load ~/.rtorrent.rc on startup.
+.TP
+\fB-o key1=opt1,...\fR
+.TP
+\fB-O key=opt\fR
+Set any number of options, see the SETTINGS section. The options given
+here override the resource files. Use capital \fB-O\fR
+to allow comma in the option.
+.TP
+\fB-p \fIa-b\fB\fR
+Try to open a listening port in the range \fBa\fR up to
+and including \fBb\fR\&.
+.TP
+\fB-s \fIdirectory\fB\fR
+Session management will be enabled and the torrent files for all open
+downloads will be stored in this directory. Only one instance of
+rtorrent should be used with each session directory, though at the
+moment no locking is done. An empty string will disable the session
+directory.
+.SH "GENERAL SETTINGS"
+.PP
+.TP
+\fBbind = \fIa.b.c.d\fB\fR
+Bind listening socket and outgoing connections to this network
+interface address.
+.TP
+\fBip = \fIa.b.c.d\fB\fR
+.TP
+\fBip = \fIhostname\fB\fR
+Set the address reported to the tracker.
+.TP
+\fBport_range = \fIa-b\fB\fR
+Try to open a listening port in the range \fBa\fR up to
+and including \fBb\fR\&.
+.TP
+\fBport_random = \fIyes | no\fB\fR
+Open the listening port at a random position in the port range.
+.TP
+\fBcheck_hash = \fIyes | no\fB\fR
+Perform hash check on torrents that have finished downloading.
+.TP
+\fBdirectory = \fIdirectory\fB\fR
+Set the default download directory. Defaults to "./".
+.TP
+\fBsession = \fIdirectory\fB\fR
+Session management will be enabled and the torrent files for all open
+downloads will be stored in this directory. Only one instance of
+rtorrent can be used per session directory. An empty string will
+disable the session directory.
+.TP
+\fBhttp_proxy = \fIurl\fB\fR
+Use a http proxy. Use an empty string to disable.
+.TP
+\fBencoding_list = \fIencoding\fB\fR
+Add a preferred filename encoding to the list. The encodings are
+attempted in the order they are inserted, if none match the torrent
+default is used.
+.TP
+\fBencryption = \fIoption\fB,\fI\&...\fB\fR
+Set how rtorrent should deal with encrypted Bittorrent connections. By
+default, encryption is disabled, equivalent to specifying the option
+\fBnone\fR\&. Alternatively, any number of the following
+options may be specified:
+
+\fBallow_incoming\fR (allow incoming encrypted connections),
+\fBtry_outgoing\fR (use encryption for outgoing connections),
+\fBrequire\fR (disable unencrypted handshakes),
+\fBrequire_RC4\fR (also disable plaintext transmission after the
+initial encrypted handshake),
+\fBenable_retry\fR (if the initial outgoing connection fails, retry
+with encryption turned on if it was off or off if it was on),
+\fBprefer_plaintext\fR (choose plaintext when peer offers a choice
+between plaintext transmission and RC4 encryption, otherwise RC4 will be used).
+.TP
+\fBpeer_exchange = \fIyes | no\fB\fR
+Enable/disable peer exchange for torrents that aren't marked private. Disabled by default.
+.TP
+\fBschedule = \fIid\fB,\fIstart\fB,\fIinterval\fB,\fIcommand\fB\fR
+Call \fBcommand\fR every \fBinterval\fR
+seconds, starting from \fBstart\fR\&. An
+\fBinterval\fR of zero calls the task once, while a
+\fBstart\fR of zero calls it immediately. Currently
+\fBcommand\fR is forwarded to the option handler.
+\fBstart\fR and \fBinterval\fR may
+optionally use a time format, \fBdd:hh:mm:ss\fR\&. F.ex to
+start a task every day at \fB18:00\fR, use
+\fB18:00:00,24:00:00\fR\&.
+.TP
+\fBschedule_remove = \fIid\fB\fR
+Delete \fBid\fR from the scheduler.
+.TP
+\fBstart_tied =\fR
+Start torrents that are tied to filenames that have been re-added.
+.TP
+\fBstop_untied =\fR
+.TP
+\fBclose_untied =\fR
+.TP
+\fBremove_untied =\fR
+Stop, close or remove the torrents that are tied to filenames that
+have been deleted. Clear the association with the 'U' key.
+.TP
+\fBclose_low_diskspace = \fIspace\fB\fR
+Close any active torrents on filesystems with less than
+\fBspace\fR diskspace left. Use with
+the \fBschedule\fR option. A default scheduled event
+with id \fBlow_diskspace\fR is set to 500Mb.
+.TP
+\fBload = \fIfile\fB\fR
+.TP
+\fBload_verbose = \fIfile\fB\fR
+.TP
+\fBload_start = \fIfile\fB\fR
+.TP
+\fBload_start_verbose = \fIfile\fB\fR
+Load and possibly start a file, or possibly multiple files by using the
+wild-card "*". This is meant for use with
+\fBschedule\fR, though ensure that the
+\fBstart\fR is non-zero. The loaded file will be tied
+to the filename provided.
+.TP
+\fBimport = \fIfile\fB\fR
+.TP
+\fBtry_import = \fIfile\fB\fR
+Load a resource file. \fBtry_import\fR does not throw
+torrent::input_error exception on bad input.
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB\fR
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB\fR
+.TP
+\fBstop_on_ratio = \fImin_ratio\fB,\fImin_upload\fB,\fImax_ratio\fB\fR
+Stop torrents when they reach the given upload ratio
+\fBmin_ratio\fR in percent. If the optional
+\fBmin_upload\fR is given, require a total
+upload amount of this many bytes as well. If the optional
+\fBmax_ratio\fR is given, stop the torrent
+when reaching this ratio regardless of the total upload
+amount. Exclude certain torrent by pressing
+\fBShift+I\fR in the downlist list.
+Use with the \fBschedule\fR option.
+.TP
+\fBon_insert = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_erase = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_open = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_close = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_start = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_stop = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_queued = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_removed = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_hash_done = \fIid\fB,\fIcommand\fB\fR
+.TP
+\fBon_finished = \fIid\fB,\fIcommand\fB\fR
+Call a command on a download when its state changes. Only a subset of
+commands are available.
+.SH "THROTTLE SETTINGS"
+.TP
+\fBupload_rate = \fIKB\fB\fR
+.TP
+\fBdownload_rate = \fIKB\fB\fR
+Set the maximum global uploand and download rates.
+.TP
+\fBmin_peers = \fIvalue\fB\fR
+.TP
+\fBmax_peers = \fIvalue\fB\fR
+Set the minimum and maximum number of peers to allow in each download.
+.TP
+\fBmin_peers_seed = \fIvalue\fB\fR
+.TP
+\fBmax_peers_seed = \fIvalue\fB\fR
+Set the minimum nad maximum number of peers to allow while seeding, or
+-1 (default) to use max_peers.
+.TP
+\fBmax_uploads = \fIvalue\fB\fR
+Set the maximum number of simultaneous uploads per download.
+.TP
+\fBmax_uploads_div = \fIvalue\fB\fR
+.TP
+\fBmax_downloads_div = \fIvalue\fB\fR
+Change the divider used to calculate the max upload and download slots
+to use when the throttle is changed. Disable by
+setting \fB0\fR\&.
+.TP
+\fBmax_uploads_global = \fIvalue\fB\fR
+.TP
+\fBmax_downloads_global = \fIvalue\fB\fR
+Max upload and download slots allowed. Disable by
+setting \fB0\fR\&.
+.TP
+\fBthrottle_up = \fIname\fB, \fIupload_rate\fB\fR
+.TP
+\fBthrottle_down = \fIname\fB, \fIdownload_rate\fB\fR
+Define secondary throttle and/or set the given upload or download rate. Attach to a download with the d.set_throttle_name=name command
+or switch throttles with Ctrl-T. Download must be stopped when changing throttles. Note that secondary throttles only work if the
+global upload/download is throttled. Setting a download to use the \fBNULL\fR throttle makes the download unthrottled
+even when there is a global throttle. Note that this special case bypasses the global throttle entirely, and as such its rate and
+transfer amounts are not included in the global statistics.
+.TP
+\fBthrottle_ip = \fIname\fB, \fIhost\fB\fR
+.TP
+\fBthrottle_ip = \fIname\fB, \fInetwork/prefix\fB\fR
+.TP
+\fBthrottle_ip = \fIname\fB, \fIstart\fB, \fIend\fB\fR
+Use the given secondary throttle for a host, CIDR network or IP range. All peers with a matching IP will use this throttle instead
+of the global throttle or a custom download throttle. The name may be \fBNULL\fR to make these peers unthrottled, with
+the same caveats as explained above.
+.SH "TRACKER RELATED SETTINGS"
+.PP
+Tracker related settings.
+.TP
+\fBenable_trackers = \fIyes\fB\fR
+Set to \fBno\fR to disable all tracker requests. Useful
+for disabling rtorrent with the \fBschedule\fR command.
+.TP
+\fBtracker_dump = \fIfilename\fB\fR
+Dump tracker requests to \fBfilename\fR, disable by
+supplying an empty string. Only torrents loaded while
+\fBtracker_dump\fR contains a non-empty string will be
+logged at the moment, although disabling it will work as expected.
+.TP
+\fBtracker_numwant = \fInumber\fB\fR
+Set the numwant field sent to the tracker, which indicates how many
+peers we want. A negative value disables this feature.
+.TP
+\fBuse_udp_trackers = \fIyes\fB\fR
+Use UDP trackers. Disable if you are behind a firewall, etc, that does
+not allow connections to UDP trackers.
+.TP
+\fBdht = \fIdisabled|off|auto|on\fB\fR
+Support for querying the distributed hash table (DHT) to find peers for trackerless
+torrents or when all trackers are down. Set to \fBdisable\fR to completely
+disable DHT, \fBoff\fR (default) to enable DHT but to not start the
+DHT server, \fBauto\fR to automatically start and stop the DHT server
+as needed or \fBon\fR for permanently keeping the DHT server running.
+When set to automatic, the DHT server will start up when the first non-private torrent
+is started, and will stop 15-30 minutes after the last non-private torrent is
+stopped (or when rTorrent quits). For DHT to work, a session directory must be set (for
+saving the DHT cache).
+.TP
+\fBdht_port = \fInumber\fB\fR
+Set the UDP listen port for DHT. Defaults to 6881.
+.TP
+\fBdht_add_node = \fIhost[:port]\fB\fR
+Not intended for use in the configuration file but as one-time option in the
+client or on the command line to bootstrap an empty DHT node table. Contacts
+the given node and attempts to bootstrap from it if it replies.
+The port is optional, with port 6881 being used by default.
+.TP
+\fBhttp_capath = \fIpath\fB\fR
+.TP
+\fBhttp_cacert = \fIfilename\fB\fR
+Set the certificates to use in http requests. See Curl's
+CURLOPT_CAPATH and CURLOPT_CAINFO options for further information.
+.SH "USER-INTERFACE SETTINGS"
+.PP
+Display related settings.
+.TP
+\fBview_add = \fIname\fB\fR
+Create a new view.
+.TP
+\fBview_sort = \fIname\fB\fR
+.TP
+\fBview_sort = \fIname\fB,\fIseconds\fB\fR
+Sort a view according the the criteria set by
+\fBview_sort_current\fR\&. If the optional argument is
+supplied, the view is not sorted if a change happened during the last
+\fBseconds\fR\&. This command is meant to be used with
+\fBschedule\fR\&.
+.TP
+\fBview_sort_new = \fIname\fB,\fI\&...\fB\fR
+.TP
+\fBview_sort_current = \fIname\fB,\fI\&...\fB\fR
+Set the sorting criteria for when new elements inserted or
+\fBview_sort\fR is called. The list can contain any
+number of criteria, including zero, from the following:
+
+\fBname\fR, \fBname_reverse\fR,
+\fBstopped\fR, \fBstarted\fR,
+\fBcomplete\fR, \fBincomplete\fR,
+\fBstate_changed\fR,
+\fBstate_changed_reverse\fR
+.TP
+\fBkey_layout = \fIqwerty|azerty|qwertz|dvorak\fB\fR
+Change the key-bindings.
+.SH "FILE-SYSTEM SETTINGS"
+.PP
+File-system related settings.
+.TP
+\fBmax_file_size = \fIsize\fB\fR
+Set the maximum size a file can have. Disable by
+passing \fB-1\fR\&.
+.TP
+\fBsplit_file_size = \fIsize\fB\fR
+Split files in a torrent larger than \fBsize\fR into
+seperate files. Disable by passing \fB-1\fR\&.
+.TP
+\fBsplit_suffix = \fIstring\fB\fR
+Set the suffix used on split files. Defaults
+to \fB\&.part\fR\&.
+.SH "DOWNLOAD SETTINGS"
+.PP
+Settings that require a download as a target, the options need to be
+called through f.ex \fBon_finished\fR\&.
+.TP
+\fBcreate_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
+.TP
+\fBdelete_link = \fItype\fB,\fIpath\fB,\fIsuffix\fB\fR
+Create or delete a symbolic link. The link path is the concatenation
+of \fBpath\fR, the result of
+the \fBtype\fR on the download,
+and \fBsuffix\fR\&.
+
+Available types are; \fBbase_path\fR uses the base path
+of the download, \fBbase_filename\fR uses the base
+filename of the download, \fBtied\fR uses the path of
+the file the download is tied to, see \fBstart_tied\fR\&.
+.SH "ADVANCED SETTINGS"
+.PP
+This list contains settings users shouldn't need to touch, some may
+even cause crashes or similar if incorrectly set.
+.TP
+\fBhash_read_ahead = \fIMB\fB\fR
+Configure how far ahead we ask the kernel to read when doing hash
+checking. The hash checker uses madvise(..., MADV_WILLNEED) for the
+requests.
+.TP
+\fBhash_interval = \fIms\fB\fR
+Interval between attempts to check the hash when the chunk is not in
+memory, in milliseconds.
+.TP
+\fBhash_max_tries = \fItries\fB\fR
+Number of attempts to check the hash while using the mincore status,
+before forcing. Overworked systems might need lower values to get a
+decent hash checking rate.
+.TP
+\fBsafe_sync = \fIyes|no\fB\fR
+Always use MS_SYNC rather than MS_ASYNC when syncing chunks. This may
+be nessesary in case of filesystem bugs like NFS in linux ~2.6.13.
+.TP
+\fBmax_open_files = \fIvalue\fB\fR
+Number of files to simultaneously keep open. LibTorrent dynamically
+opens and closes files as necessary when mapping files to
+memory. Default is based on sysconf(_SC_OPEN_MAX).
+You probably only think you know what this option does, so don't touch
+it.
+.TP
+\fBmax_open_sockets = \fIvalue\fB\fR
+Number of network sockets to simultaneously keep open. This value is
+set to a reasonable value based on \fBsysconf(_SC_OPEN_MAX)\fR\&.
+.TP
+\fBmax_open_http = \fIvalue\fB\fR
+Number of sockets to simultaneously keep open. This value is set
+to \fB32\fR by default.
+.TP
+\fBmax_memory_usage = \fIbytes\fB\fR
+Set the max amount of memory space used to mapping file chunks. This
+may also be set using \fBulimit -m\fR where 3/4 will be
+allocated to file chunks.
+.TP
+\fBsend_buffer_size = \fIvalue\fB\fR
+.TP
+\fBreceive_buffer_size = \fIvalue\fB\fR
+Adjust the send and receive buffer size for socket.
+.TP
+\fBumask = \fI0022\fB\fR
+Set the umask for this process, which is applied to all files created
+by the program.
+.TP
+\fBcwd = \fIdirectory\fB\fR
+Changes the working directory of the process using
+\fBchdir\fR\&.
+.TP
+\fBsession_on_completion = \fIyes\fB\fR
+Controls if the session torrent is saved when a torrent finishes. By
+default on.
+.TP
+\fBsession_lock = \fIyes\fB\fR
+Controls if a lock file is created in the session directory on startup.
+.TP
+\fBsession_save = \fR
+Save the session files for all downloads.
+.TP
+\fBtos = \fIdefault|lowdelay|throughput|reliability|mincost\fB\fR
+.TP
+\fBtos = \fIhex\fB\fR
+Change the TOS of peer connections, by default set to
+\fBthroughput\fR\&. If the option is set to
+\fBdefault\fR then the system default TOS is used. A
+hex value may be used for non-standard settings.
+.TP
+\fBhandshake_log = \fIyes\fB\fR
+Enable logging of the peer handshake. This generates a large number of
+log messages, but may be useful to debug connection problems.
+.SH "AUTHORS"
+.PP
+
+Jari "Rakshasa" Sundell <jaris@ifi.uio.no>
diff --git a/net-p2p/rtorrent/files/rtorrentd.conf b/net-p2p/rtorrent/files/rtorrentd.conf
new file mode 100644
index 000000000000..5ff2328b2544
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd.conf
@@ -0,0 +1 @@
+USER="$USER"
diff --git a/net-p2p/rtorrent/files/rtorrentd.init b/net-p2p/rtorrent/files/rtorrentd.init
new file mode 100644
index 000000000000..9672759a7bf4
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd.init
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net ypbind nis
+ after slapd mysqld postgresql
+}
+
+start() {
+ PWHOME="$(getent passwd $USER | awk -F: '{ print $6 }')"
+
+ ebegin "Starting rtorrent"
+ env TERM="xterm" \
+ start-stop-daemon \
+ --start \
+ --make-pidfile \
+ --pidfile /var/run/rtorrentd.pid \
+ --background \
+ --user $USER \
+ --env HOME="${PWHOME:-/home/$USER}" \
+ --name rtorrent \
+ --exec /usr/bin/screen -- -D -m -S rtorrentd /usr/bin/rtorrent
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rtorrent"
+ start-stop-daemon --stop --signal 15 \
+ --pidfile /var/run/rtorrentd.pid
+ eend $?
+}
diff --git a/net-p2p/rtorrent/files/rtorrentd_at.service b/net-p2p/rtorrent/files/rtorrentd_at.service
new file mode 100644
index 000000000000..991ba930c7f8
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd_at.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=rTorrent
+Requires=network.target local-fs.target
+
+[Service]
+Type=forking
+RemainAfterExit=yes
+KillMode=none
+User=%I
+ExecStart=/usr/bin/screen -d -m -S rtorrentd /usr/bin/rtorrent
+ExecStop=/usr/bin/screen -S rtorrentd -X quit
+WorkingDirectory=/home/%I/
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/rtorrent/metadata.xml b/net-p2p/rtorrent/metadata.xml
new file mode 100644
index 000000000000..4038cab8495c
--- /dev/null
+++ b/net-p2p/rtorrent/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ <name>Jason Zaman</name>
+ </maintainer>
+
+ <longdescription lang="en">
+ Console BitTorrent client using ncurses based on libtorrent written in C++.
+ </longdescription>
+
+ <use>
+ <flag name="daemon">Uses <pkg>app-misc/screen</pkg> to daemonize this application</flag>
+ </use>
+
+ <upstream>
+ <remote-id type="github">rakshasa/rtorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
new file mode 100644
index 000000000000..483629ab5db4
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.6-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="daemon debug ipv6 selinux test xmlrpc"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=dev-libs/libsigc++-2.2.2:2
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c )"
+RDEPEND="${COMMON_DEPEND}
+ daemon? ( app-misc/screen )
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+src_prepare() {
+ # bug #358271
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
+ "${FILESDIR}"/${PN}-0.9.4-tinfo.patch \
+ "${FILESDIR}"/${PN}-0.9.6-cppunit-pkgconfig.patch
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ if use daemon; then
+ newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
+ systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
+ fi
+}
diff --git a/net-p2p/rtorrent/rtorrent-0.9.6.ebuild b/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
new file mode 100644
index 000000000000..6de316711cbf
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.6.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="https://rakshasa.github.io/rtorrent/"
+SRC_URI="http://rtorrent.net/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="daemon debug ipv6 selinux test xmlrpc"
+
+COMMON_DEPEND="~net-libs/libtorrent-0.13.${PV##*.}
+ >=dev-libs/libsigc++-2.2.2:2
+ >=net-misc/curl-7.19.1
+ sys-libs/ncurses:0=
+ xmlrpc? ( dev-libs/xmlrpc-c )"
+RDEPEND="${COMMON_DEPEND}
+ daemon? ( app-misc/screen )
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/cppunit
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+src_prepare() {
+ # bug #358271
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.1-ncurses.patch \
+ "${FILESDIR}"/${PN}-0.9.4-tinfo.patch
+
+ # https://github.com/rakshasa/rtorrent/issues/332
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # configure needs bash or script bombs out on some null shift, bug #291229
+ CONFIG_SHELL=${BASH} econf \
+ --disable-dependency-tracking \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_with xmlrpc xmlrpc-c)
+}
+
+src_install() {
+ default
+ doman doc/rtorrent.1
+
+ if use daemon; then
+ newinitd "${FILESDIR}/rtorrentd.init" rtorrentd
+ newconfd "${FILESDIR}/rtorrentd.conf" rtorrentd
+ systemd_newunit "${FILESDIR}/rtorrentd_at.service" "rtorrentd@.service"
+ fi
+}
diff --git a/net-p2p/saku/Manifest b/net-p2p/saku/Manifest
new file mode 100644
index 000000000000..2956e04c41c0
--- /dev/null
+++ b/net-p2p/saku/Manifest
@@ -0,0 +1,7 @@
+AUX saku 496 SHA256 36d62a16923c4634ea531c04d56cd34664a09e06a39392efaefe7876be831cc1 SHA512 4a88d8132e503a85a9146807f6af3bfaeab1830c73beb2fc9f63eb8440c8c6fb0245c74476115167b08c429df80e5a8df741b7cf6c02d8f9e0f403f79206fc53 WHIRLPOOL 40a14e0492aa69cd89b979b454a5095acef1305ff17d55a510d682b34af4e605a6541e9241d018737d88bc4fcc8cb8d050bd5c5aafdc36c3928fea6944d379d4
+AUX saku.ini 638 SHA256 28df8f75c9f18cfa5a90d811d0c9f7d4f807489b7f6e76310e1dec7900451d7f SHA512 18e91a7b3cbc0bf7f0142be20a2b3f6dde91c5b24ab1ed2fd6a6a6821bda65d52f5347d3de7a2d799473564d578540643fff0ef95df29ab786cd01c09b6f7dff WHIRLPOOL 69ef7136ce16cd5028efd78a54a49f23927f1bbf42be618b370f340a7a6cd84bfc72d3920d6349fd7a3591096dfe82ead5b00fba766e939ebf159801bd58c930
+DIST saku-3.11.0.tar.gz 239772 SHA256 295fbd77aff51cb8967172f71000f26c37cbe133649b7ad2c050e161a8e61c39 SHA512 e6cb37fa555a43d69523a90d1039dcd9bdbc4e4d14e7a4063849cfcaf3a67f1947bd7e5341f97726030eddf53915304ad948f67ce7fb1cb2b6344e1556cc8467 WHIRLPOOL 9865ac033aa779ac772e63ea32fb629d5850958907a91b0c7a4fcfb6dac3a92fa8ede0084c878d806d9e08c1cdc7f4446de5b1afa7f6ff9750ac9395dbad530f
+EBUILD saku-3.11.0-r2.ebuild 928 SHA256 c1fec6cef78cc73ddd6f5239655ac3cc739831f727c70a5d074c1cde52f19940 SHA512 faea7f3e08d5746c42ef7af966b8eb072aa36a86385393fab887404f004ba76e84138e36cf072e9124384ca115d7de3105bb989895e5a66c9def75f666fd20e5 WHIRLPOOL 3667ce5c5a931f6a14382934275e66f9e1344718e453761a1f82c85782aedb4fdadffaa23e0dcd5f1bae9f144cd5678c546d1829f2ee313054f8d6d0d2d1936f
+MISC ChangeLog 2325 SHA256 d80f0c3269a7bd13fffe0cc557db24206afb294cc60aff5dabb0a497d229442c SHA512 c6b03a6e9ae4879f8fb4d2b1703c2d16998e9cd701f0dcfc97a20dee0e84766d192654606ef404e003e0f2af3558efc865d2c46f7e4287f3fbbe420bf2866f19 WHIRLPOOL f9715795491557bf05ddbce6a64f0ce269ff899d05edf45578f2b2b2d5550908f50afb5f55243d29330d0ec6294f9fa9b01ebd9f943c757193c7937afb2c172f
+MISC ChangeLog-2015 1189 SHA256 a7bddada91e06cbb83565f09b5993d7f75d457e83e7aee25a3e2368f93e7cb88 SHA512 5b6a6e7414c9053214018ae55d1c86ed8817b69b000f8a3b41645521c06fc29d09a87d39d8afbdce67e678b4c1f587e8222294bb4c7b9ca17253159019a703e3 WHIRLPOOL 4416e7abcdd6bd66b8e5075d2c2709c3f33e065f1f10360590310e9a8bf408f8b2087d947b720d33679f74a5f8cf95af98b7758cf138954c317985d515d8d9ee
+MISC metadata.xml 303 SHA256 0019ab66caa317aa1025ed1973c2030ee5adb43d62fff38085a9cbbbb133eac3 SHA512 e0e26140640025bbf8c0c251cab5e5ff10df7a8b03ea9ba0c0d0dbdb6cd4da3a0a83b2bdf907b2f59bf15eb47139c3f37b19027b144e661a3268d5ae9a3c05e7 WHIRLPOOL 7bf27df17f12b065149ae4531e8a4767be49fec5f190aa8a3193b301eeb8aa8e98ee10921698a5d28798b8d854e366140720cc69884ed593282ff23ee41106c1
diff --git a/net-p2p/saku/files/saku b/net-p2p/saku/files/saku
new file mode 100644
index 000000000000..6c600f57904c
--- /dev/null
+++ b/net-p2p/saku/files/saku
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PID_DIR=/var/run/saku
+
+depend() {
+ use dns
+ need net
+}
+
+start() {
+ mkdir -p $PID_DIR
+ rm -f ${PID_DIR}/pid.txt
+ ebegin "Starting p2p bbs: saku"
+ start-stop-daemon --start -u saku -g saku --quiet -b \
+ -p ${PID_DIR}/pid.txt --exec /usr/bin/saku
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping p2p bbs: saku"
+ start-stop-daemon --stop --quiet -p ${PID_DIR}/pid.txt
+ eend $?
+}
diff --git a/net-p2p/saku/files/saku.ini b/net-p2p/saku/files/saku.ini
new file mode 100644
index 000000000000..21a9461783cb
--- /dev/null
+++ b/net-p2p/saku/files/saku.ini
@@ -0,0 +1,27 @@
+#
+# Sample saku.ini to run saku in distributed directory.
+# Copyright (c) 2005-2007 shinGETsu Project.
+# $Id: saku.ini 1513 2011-01-03 10:17:08Z sbwhitecap $
+#
+
+[Network]
+port: 8000
+upnp: no
+
+[Path]
+prefix: /usr
+var: /var
+sysconfig: /etc
+docroot: %(prefix)s/share/saku/www
+file_dir: %(prefix)s/share/saku/file
+template_dir: %(prefix)s/share/saku/template
+log_dir: %(var)s/log/saku
+run_dir: %(var)s/run/saku
+cache_dir: %(var)s/spool/saku
+spam_list: %(sysconfig)s/saku/spam.txt
+initnode_list: %(sysconfig)s/saku/initnode.txt
+node_allow: %(sysconfig)s/saku/node_allow.txt
+node_deny: %(sysconfig)s/saku/node_deny.txt
+
+[Gateway]
+visitor: ^127
diff --git a/net-p2p/saku/metadata.xml b/net-p2p/saku/metadata.xml
new file mode 100644
index 000000000000..0ef1d8a861c8
--- /dev/null
+++ b/net-p2p/saku/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>naota@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">shingetsu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/saku/saku-3.11.0-r2.ebuild b/net-p2p/saku/saku-3.11.0-r2.ebuild
new file mode 100644
index 000000000000..fc437fb14e4f
--- /dev/null
+++ b/net-p2p/saku/saku-3.11.0-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 user
+
+DESCRIPTION="a clone of P2P anonymous BBS shinGETsu"
+HOMEPAGE="http://shingetsu.info/"
+SRC_URI="mirror://sourceforge/shingetsu/${P}.tar.gz"
+
+LICENSE="BSD-2 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/cheetah[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup saku
+ enewuser saku -1 -1 /var/run/saku saku
+}
+
+python_prepare_all() {
+ sed -i -e "/^prefix/s:/usr:${EPREFIX}/usr:" file/saku.ini || die
+ sed -i -e "s:root/share/doc/saku/:root/share/doc/${PF}/:" setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ insinto /etc/saku
+ doins "${FILESDIR}"/saku.ini
+
+ doinitd "${FILESDIR}"/saku
+
+ diropts -o saku -g saku
+ keepdir /var/log/saku
+ keepdir /var/spool/saku
+}
diff --git a/net-p2p/smet2html/Manifest b/net-p2p/smet2html/Manifest
new file mode 100644
index 000000000000..e34525628dac
--- /dev/null
+++ b/net-p2p/smet2html/Manifest
@@ -0,0 +1,5 @@
+DIST smet2html-0.1.tar.gz 4669 SHA256 2fee7e1e0f43f25ac114a7bf29631d66450752000321e0387c8c288367c83721 SHA512 4b08c0c112f62b054167dce463653b3723f3a237c2a77d7da6a989297bac632feef7786e70957dd4b24206a282ea283038f76011f965aed8d328446a3248580e WHIRLPOOL 2c54ee57d6a50aa20b541c0daf4e5aff3c2eea2f696f82792a2f67053b197a9805fec1d19b0d0c2826da621b2f175c605f4127c879009a4c32607aff359f04db
+EBUILD smet2html-0.1.ebuild 550 SHA256 ddd50688350e07374b6ffeabd4adb2e570bedeff8c3e88bec0d6b6ae30b4751f SHA512 b4eefea9790110e2034806e6302f0561f71261bf1da37a761d8c7e9280b85c01f075b9f5550df89d218903be3fc81e225586194db444eeaca32c087779c747ba WHIRLPOOL 2dc01d42508895f29cc5b00474548481ed1658d36ec68db12f8cc75574222eb467a52befaf327a549423ea82fcc7c0b91165271c905d66c3ec41570165df95ff
+MISC ChangeLog 2457 SHA256 6d3ee8a01adab894104fcb6b039013fc0fe97a096c834420b4a3572ae5b38aeb SHA512 5b5032b79379a03deb9cb4598fd3deb5bb494b8f7e886318bed50b25fe64c387a50bef16c1422376379471d2a05c2f2823417ba653642c9b0eb1124063085272 WHIRLPOOL cce45ecb938b0bd5ff1718f85f2dadef1d37e1e11fa3a25c7192aaf8ae30671fe4e295fcad372c34669c2fa578b9c3091b1ea6cf719c40f3e686cc53acdd853c
+MISC ChangeLog-2015 1031 SHA256 ea63947d9c3f724518906eac3b8d04068e33954cc6a89b096e38a089ba833b4c SHA512 94715850d66afab3e23468b1a6c31f93d3f8b606715bbafdb2d53cfdfb77236ffe84508fb6feb4fbb189bbea474e7b008bbd56d0d8fa3b1090fb1d87f0c49992 WHIRLPOOL 59b49d28ba32e10a0ff60103e50f34159a524d31a30841284aa723a8fe72c4d3ba1562b036f4eef64be59e410e5bf5d0c10fad91dbf20677a79a284acb284ae1
+MISC metadata.xml 247 SHA256 6fd09d4015a1213da44d9d98d05d67fc50ab4d5a30b0f7ab7f6c145c43937a5c SHA512 0fd2dabec194318e31d99cea9b5ddd499f0e545af32fdf63d570c5cfb49650c57de6c1a131f936a5f4867f7651f771b0db464ef461eb08363b96112d3eedbce4 WHIRLPOOL 3f38458142b47135b73db30059ee7231c574ff1fef01139b8e7ecc910752fe3ed151b8ca48a3a41ea7ca8cdd6525a0fb0dfcf56aab53b57c687cf08f18db0f26
diff --git a/net-p2p/smet2html/metadata.xml b/net-p2p/smet2html/metadata.xml
new file mode 100644
index 000000000000..60470d6a6f41
--- /dev/null
+++ b/net-p2p/smet2html/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">ed2k-tools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/smet2html/smet2html-0.1.ebuild b/net-p2p/smet2html/smet2html-0.1.ebuild
new file mode 100644
index 000000000000..2ab8eeec43aa
--- /dev/null
+++ b/net-p2p/smet2html/smet2html-0.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Convert eDonkey2000 server.met to html"
+HOMEPAGE="http://ed2k-tools.sourceforge.net/${PN}.shtml"
+SRC_URI="mirror://sourceforge/ed2k-tools/${P}.tar.gz"
+RESTRICT="mirror"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ~ppc"
+IUSE=""
+
+S="${WORKDIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ sed -i -e "s:gcc -Wall:gcc ${CFLAGS} -Wall:g" ${S}/Makefile
+}
+
+src_compile() {
+ make || die "make failed"
+}
+
+src_install() {
+ dobin smet2html
+}
diff --git a/net-p2p/soulseek-qt/Manifest b/net-p2p/soulseek-qt/Manifest
new file mode 100644
index 000000000000..44367e4e4cc8
--- /dev/null
+++ b/net-p2p/soulseek-qt/Manifest
@@ -0,0 +1,6 @@
+DIST SoulseekQt-2016-1-17-32bit.tgz 11481944 SHA256 39daec020c766350159f63dc025f55a840891dcb805977e8e0eb4daa9d853965 SHA512 12b5ffc1ee470e6065d696e1d634e98f6654e0cd3575e8600ef10474cf2e2fd304302b8114a6fafb0ce06f1cc3912511c84efd44ba17c76b095e5fb1f40ed285 WHIRLPOOL bc946887cc5cfc037b99251dcc41e8a4508c10bd88f0975fb262a1792fe52002c173302ca9509a135817fd32e1d1dbc2820f7e4f76f41b3db3ea402bb482a892
+DIST SoulseekQt-2016-1-17-64bit.tgz 11329818 SHA256 8c11af264ffdd045de1093090533fc7b86e8814442a14d366c1df1dd6ed58316 SHA512 73139e323f758245f5763e60cb74f6e195c1c8d9b6066ddc9cb63b7e755e412cbd479a47ced5bc33b3c8b85047705195ee424c41be5f4952c5d02c1769ac2240 WHIRLPOOL 60942af9bc813275f0b98cb93320cfc320bddc69392ad8f2d18d617448dad4bbf972c40a94a2432236698897f915dd162d0eb3b6be5aeceb0a3a54adbb1ff21d
+EBUILD soulseek-qt-20160117.ebuild 876 SHA256 54c5704afd12afac25b4622394ff225e6d0cf919fcb107bcc36a3239b2dc721c SHA512 f08366ca1df027e0d09d268398e95ad178a5047d3c7df58fced604c3c47008a21a3c61d38a6b8f5b224ec8d87a1eb6d7724aa21db7cef344a26eed6d74a2222a WHIRLPOOL eb63591ff23c82d71fd94e48e7b66fbdaaf2c25b752bdcbb1249084be4cfe8e6672f45240dd1cb8c52ed1d64bb5b9f0f051289fa54ae90153b7b98975169a14b
+MISC ChangeLog 2547 SHA256 f810190b712ece3a2680d0ca1da3973b20651c647e3f6e3240334963dbe02181 SHA512 71a3fda9f039490e2466991a413f018173561c8fccb602babb4cf49b4b6089d158742fffb6d8e34387b70b254e03d207eb17f8f33cccabc6f09559acb2e2efc0 WHIRLPOOL d60140cb991b257936a509bbf7dbe390267203eb405f1899fd21b4c1e86d66f7ca2996005ff19976b28f1d4e966c3e55feca936c664dd1649ab0d58278d99225
+MISC ChangeLog-2015 1568 SHA256 91808830598b0ff35a7cdbe18a67b713ee07712383bde8ba4c6c8d915cd91fbc SHA512 9acd7334d979e0969f776bd578c05b0afb6a8c0e80da7ac67da48916f557324d95f9de741774427f349cbe416d1a71129aaed56ba2cfc5ac32ad8ffae5bafc6e WHIRLPOOL 4fc07fe55f2d90b60e149e963a82cb03a67631452bfaa6f4e5e4603bc6b8d9456c5522dd76039d2c760d5b6dd2e08f921db250a562b37585902062c893710a11
+MISC metadata.xml 256 SHA256 c1503b84ab04e0bba2c3745dc3a16a59d009119bb8df3b6e84c9a8a01105b388 SHA512 9a1deae3cae6933cbd5aa5e403ece1ed0f34cfc8a7f18560bb1d66ec8b276d7af8c3060fc68e7928ae3fb74ec231889718665f7edd75f8cec3af167de08773a3 WHIRLPOOL de75eed89221a6012b6129a3d1dffe481ec69f304b81ae98b2acee3721981337d44f71672f0ad69680885fd17c6d6c653a926f523cf80a1b40dda024d3c124d7
diff --git a/net-p2p/soulseek-qt/metadata.xml b/net-p2p/soulseek-qt/metadata.xml
new file mode 100644
index 000000000000..5b7411bb57e1
--- /dev/null
+++ b/net-p2p/soulseek-qt/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/soulseek-qt/soulseek-qt-20160117.ebuild b/net-p2p/soulseek-qt/soulseek-qt-20160117.ebuild
new file mode 100644
index 000000000000..a3a1b37fc7f2
--- /dev/null
+++ b/net-p2p/soulseek-qt/soulseek-qt-20160117.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Official binary Qt SoulSeek client"
+HOMEPAGE="http://www.soulseekqt.net/"
+BINARY_NAME="SoulseekQt-${PV:0:4}-$((${PV:4:2}))-$((${PV:6:2}))"
+SRC_URI="
+ x86? ( https://www.dropbox.com/s/kebk1b5ib1m3xxw/${BINARY_NAME}-32bit.tgz )
+ amd64? ( https://www.dropbox.com/s/7qh902qv2sxyp6p/${BINARY_NAME}-64bit.tgz )
+"
+
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="media-libs/libpng x11-libs/libX11 x11-libs/libxcb media-libs/freetype x11-libs/libXau x11-libs/libXdmcp dev-libs/libbsd dev-libs/expat"
+
+S="${WORKDIR}"
+
+RESTRICT="mirror"
+
+QA_PREBUILT="opt/bin/.*"
+
+src_install() {
+ use amd64 && BINARY_NAME="${BINARY_NAME}-64bit"
+ use x86 && BINARY_NAME="${BINARY_NAME}-32bit"
+ into /opt
+ newbin "${BINARY_NAME}" "${PN}"
+}
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
new file mode 100644
index 000000000000..a2b13509cdfa
--- /dev/null
+++ b/net-p2p/syncthing/Manifest
@@ -0,0 +1,12 @@
+AUX strelaysrv.confd 107 SHA256 8ae5fb440478f93a9450a723249729b814056e9447b2ea8db1c32b9eb8ccee47 SHA512 67ca4b8a1c9197e0d5876073ccc89d34866e493c66f7691716f1f2b81defd74a79e7aeae9ce42d852e9cb32d7f0df4ffb43b53ae61ec1b4944e63cc0b470e9c5 WHIRLPOOL 2e90aaad0550f24c73ae62e59e007f6d73355de93c4bcf8fef3417c2ef96a847c0e860fa85546a8b26bdb4db9e3b1051e9c0ed2a966389b672c6a4374e702883
+AUX strelaysrv.initd 729 SHA256 a741459bd742c64e7975e52ff5f1d22574b611c685a4977351704ff9e9ffd25a SHA512 364ff18453da1a3a76a5bec26403728872ea5f8c551762ac7c091293cd76e01bf9e2fa100dcedf12004e84b5a023e556b713b0e9db0f540062cb4a44562b02e0 WHIRLPOOL a2df921045899631cf47511b85aaeebb561941bc04a8909b7db20a2cc37771579f6f53e494fcef17da19912934e1b8e89ba66bb05757bfa4d844c7a1d15c69f0
+AUX strelaysrv.logrotate 102 SHA256 4fcaa1822d338c8e571156cf00de28daf1801f8b615973fb128ed76664c04ac6 SHA512 2f94be8af78b1beb567a7e6b7177aaa6451cd1ae63ef2842369879cc2e8e0cc2c615f68ce26d7031fbb7268788f7c210c03c33de52ff064b48ca42231613be85 WHIRLPOOL 05930b9b7cbdf985f441d3551c457062cc6dcb7787f172f19f89559a7952625d23910f70258c9a9185b42a497b18e1040542a497a6f4c3a8564520f299825d61
+AUX syncthing.confd 549 SHA256 eaa8062872bae4cc451392ef6d05e093b5c18f7589bd4e6e289737a55bc7d22d SHA512 a231c526c2e03caf06a8aeba790ca764477f738633e1d2d8ca82766be143705b1062c957822ac19406e0e6ac97c6af47cb7179639980492e112dd116d624c029 WHIRLPOOL 555e7622f7124a0b5d8ae018482688760d651522d7420d773dcbe3d86b03e010aa39d46f125a9c2c5e4d9f54270d559bc7ed320d95f7e897a4fc1dc5c9bc41f0
+AUX syncthing.initd 1195 SHA256 66a0007b26f7be9faa4f52a97b11561b58201d5e443e88c6d21b76a936ba48cd SHA512 2e327a0f09523da2e746ec559c82ddb5667d98aff0c967b9d2d27c678163f80bdb0b19487ce7b7f1664c52754c92e5f6a5f78496a8b3cb1f450e2159ba68c1ae WHIRLPOOL c886c4c73453bf44c7da5cbe8d37ff8a4ed7c10ec1041a1da62b80516096bb9cdce1f795daaac0f4dcee09995bfc3809d151ef9852687208f3c3c8b2140441bf
+AUX syncthing.logrotate 101 SHA256 2a0932721a2e7b0393318e686cfd91de70a693cecb900b3914d43694316105f9 SHA512 73a5f7062b48ab4c7b343b43367b1999f8e133eadb624bd5e3e147ae41f135ded6acb4c617db2d385311441c9a52c288333791308c36762cb5273a853cce5a67 WHIRLPOOL 7f6183440cc84b051389a6f2a36617c7774555d3ea3c3d87b2cfc98e6e247d1a7fa4c1efccf6ddb95198700953e56bb47e3c03ff53203fb5d2623fe1c3b97215
+DIST syncthing-0.14.35.tar.gz 8235883 SHA256 58509294a150d137fbd005b5629d2859cce661d25e8063505813c4e7faa62fae SHA512 2a3de76e7118be6e91b8bc6bc69b10e250755836b378fa762e0feaed280bb2206d2e4552f09fd230d51e246633108fd8cff343ac355742ebb1bd06c2145fe086 WHIRLPOOL bdc971896378fe04576273cab23432f3dfdd96f77d464c0ea0bc8143771a40a15520d20ce2e76ccd790e78c04421f92e31ce1af04f66760a4f101b8b67b6c852
+DIST syncthing-0.14.38.tar.gz 8246629 SHA256 76c1dab5873d6f3b9799ad3e5dcab4c17fb0f5a699fe845bd081f162d96f4477 SHA512 be5f7527d63e8db427705c34b26d783d9abd7cb5727d3dcf08ee62b1ace5454b7dfed4f030ec53e847a34f560cf349460f68c859a1008c5105aef65ef42c5cc5 WHIRLPOOL c71799207eaa6dfac7839ead25dd551c76f00823f70d9bfc1bc72409ef410dbdb28cf9df3742a97a56f12cf0c705262299eec164313a027118be177ce6b5458f
+EBUILD syncthing-0.14.35.ebuild 3607 SHA256 6901ccf02eca84c69a72ade9ec1b3bd4ce4135a992f933b04c1f97ade6f5ab2b SHA512 b284114b05f85bdc2849588726c637229fe4cdefe1706bc37bc6def80e77d4d3cda68d6e268f0dc5da915b241d157e8a7f21bab2708f305b86de5706aaa78baa WHIRLPOOL ea5aaa0a7f25733d8a52b68b4b18ecb6109111de1e126755cefdf9870d26de2e8293e5d8a33cf65e3866905f288760bbb114aa4a8994515b112c16ff69809bfd
+EBUILD syncthing-0.14.38.ebuild 3607 SHA256 6901ccf02eca84c69a72ade9ec1b3bd4ce4135a992f933b04c1f97ade6f5ab2b SHA512 b284114b05f85bdc2849588726c637229fe4cdefe1706bc37bc6def80e77d4d3cda68d6e268f0dc5da915b241d157e8a7f21bab2708f305b86de5706aaa78baa WHIRLPOOL ea5aaa0a7f25733d8a52b68b4b18ecb6109111de1e126755cefdf9870d26de2e8293e5d8a33cf65e3866905f288760bbb114aa4a8994515b112c16ff69809bfd
+MISC ChangeLog 13264 SHA256 2e3ae89570dc2f95fa7d62fd713ec4d56cadf71bfe4d8b77fc68f96843b21da6 SHA512 451d42e235ab534be4fc93c84f632b2b861bcbcb111679f22b7bc279e08e72f2475d4f54d987dbc0466a9357b5ac1f0058330e1fbd464a25aa3755a6505db24b WHIRLPOOL 6b0051bb5d8dde5bbf8d62c3237e57bf2a7b9fb80e29b7c9fa45f57ae67b20687f85b6d54ca3aa864ba03c8a923a752c7fa7f87bf7a607508ae648486d666f5d
+MISC metadata.xml 869 SHA256 7f7c7164638ec1ce450031fd3a99efc7c8d16749bea972365d43b11e336ee457 SHA512 f58ce3a33241a316a81ba94318cd8fa1ea8a9954cd3721ae6f78f96df08b38a6ee5ea214483dc92aa4301a2252bc712a65c196da4c871962d76d17d5ba2b7238 WHIRLPOOL 0f5a6475810b8aa47fb7696ff4f20b9954552143a4612d292b7c6b3f764d63112eb71796e9d4e21266c67e49bccf8a07e145f6f0c1705179bdb0c108435bef8b
diff --git a/net-p2p/syncthing/files/strelaysrv.confd b/net-p2p/syncthing/files/strelaysrv.confd
new file mode 100644
index 000000000000..00564f140542
--- /dev/null
+++ b/net-p2p/syncthing/files/strelaysrv.confd
@@ -0,0 +1,3 @@
+# Options to pass to relaysrv
+# see /usr/libexec/syncthing/strelaysrv --help for more information
+SR_OPTS=
diff --git a/net-p2p/syncthing/files/strelaysrv.initd b/net-p2p/syncthing/files/strelaysrv.initd
new file mode 100644
index 000000000000..7eb77be26fda
--- /dev/null
+++ b/net-p2p/syncthing/files/strelaysrv.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+SR_USER=strelaysrv
+SR_GROUP=strelaysrv
+SR_HOMEDIR=/var/lib/strelaysrv
+SR_LOGFILE=/var/log/syncthing/strelaysrv.log
+
+
+description="Relay service for syncthing"
+command="/usr/libexec/syncthing/strelaysrv"
+command_args="${SR_OPTS}"
+pidfile="/run/strelaysrv.pid"
+start_stop_daemon_args="--background
+ --user ${SR_USER}
+ --group ${SR_GROUP}
+ --chdir \"${SR_HOMEDIR}\"
+ --make-pidfile
+ --stdout \"${SR_LOGFILE}\"
+ --stderr \"${SR_LOGFILE}\"
+ "
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -q -d -o ${SR_USER}:${SR_GROUP} ${SR_HOMEDIR}
+ checkpath -q -f -o ${SR_USER}:${SR_GROUP} ${SR_LOGFILE}
+}
diff --git a/net-p2p/syncthing/files/strelaysrv.logrotate b/net-p2p/syncthing/files/strelaysrv.logrotate
new file mode 100644
index 000000000000..eb40ac2d1fc1
--- /dev/null
+++ b/net-p2p/syncthing/files/strelaysrv.logrotate
@@ -0,0 +1,6 @@
+/var/log/syncthing/strelaysrv.log {
+ missingok
+ notifempty
+ sharedscripts
+ copytruncate
+}
diff --git a/net-p2p/syncthing/files/syncthing.confd b/net-p2p/syncthing/files/syncthing.confd
new file mode 100644
index 000000000000..33773dc7fdf9
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.confd
@@ -0,0 +1,24 @@
+# /etc/conf.d/syncthing: config file for /etc/init.d/syncthing
+
+# User and group as which to run
+#SYNCTHING_USER="syncthing"
+#SYNCTHING_GROUP="syncthing"
+
+# Configuration directory
+#SYNCTHING_HOMEDIR="/var/lib/syncthing/.config/syncthing"
+
+# Log file location
+#SYNCTHING_LOGFILE="/var/log/syncthing/syncthing.log"
+
+# umask used to create files
+# The default allows group access
+#SYNCTHING_UMASK=007
+
+# I/O nice level of syncthing
+#SYNCTHING_IONICE="0"
+
+# Nice level of syncthing
+#SYNCTHING_NICE="0"
+
+# Extra options for syncthing
+#SYNCTHING_OPTS=""
diff --git a/net-p2p/syncthing/files/syncthing.initd b/net-p2p/syncthing/files/syncthing.initd
new file mode 100644
index 000000000000..b64ebac03254
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.initd
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SYNCTHING_USER=${SYNCTHING_USER:-syncthing}
+SYNCTHING_GROUP=${SYNCTHING_GROUP:-syncthing}
+SYNCTHING_HOMEDIR=${SYNCTHING_HOMEDIR:-/var/lib/syncthing/.config/syncthing}
+SYNCTHING_LOGFILE=${SYNCTHING_LOGFILE:-/var/log/syncthing/syncthing.log}
+SYNCTHING_UMASK=${SYNCTHING_UMASK:-007}
+SYNCTHING_IONICE=${SYNCTHING_IONICE:-0}
+SYNCTHING_NICE=${SYNCTHING_NICE:-0}
+
+description="Syncthing is an open, trustworthy and decentralized cloud storage system"
+command="/usr/bin/syncthing"
+command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"
+pidfile="/run/syncthing.pid"
+start_stop_daemon_args="--background \
+ --user ${SYNCTHING_USER} \
+ --group ${SYNCTHING_GROUP} \
+ --umask ${SYNCTHING_UMASK} \
+ --make-pidfile \
+ --ionice ${SYNCTHING_IONICE} \
+ --nicelevel ${SYNCTHING_NICE} \
+ --stdout ${SYNCTHING_LOGFILE} \
+ --stderr ${SYNCTHING_LOGFILE}"
+
+depend() {
+ need localmount net
+}
+
+start_pre() {
+ checkpath -q -d -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_HOMEDIR}
+ checkpath -q -f -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_LOGFILE}
+}
diff --git a/net-p2p/syncthing/files/syncthing.logrotate b/net-p2p/syncthing/files/syncthing.logrotate
new file mode 100644
index 000000000000..11310e381afd
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.logrotate
@@ -0,0 +1,6 @@
+/var/log/syncthing/syncthing.log {
+ missingok
+ notifempty
+ sharedscripts
+ copytruncate
+}
diff --git a/net-p2p/syncthing/metadata.xml b/net-p2p/syncthing/metadata.xml
new file mode 100644
index 000000000000..9d4f6be8462c
--- /dev/null
+++ b/net-p2p/syncthing/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <longdescription lang="en">
+ Syncthing replaces proprietary sync and cloud services with something open, trustworthy and decentralized.
+ Your data is your data alone and you deserve to choose where it is stored, if it is shared with some third party and how it's transmitted over the Internet.
+ </longdescription>
+ <use>
+ <flag name="tools">
+ Install stdiscosrv, strelaysrv and other tools to /usr/libexec/syncthing/.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">syncthing/syncthing</remote-id>
+ <bugs-to>https://github.com/syncthing/syncthing/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/syncthing/syncthing-0.14.35.ebuild b/net-p2p/syncthing/syncthing-0.14.35.ebuild
new file mode 100644
index 000000000000..27a867b3abad
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-0.14.35.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/${PN}/${PN}"
+
+inherit golang-vcs-snapshot systemd user versionator
+
+DESCRIPTION="Open Source Continuous File Synchronization"
+HOMEPAGE="https://syncthing.net"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm"
+IUSE="selinux tools"
+
+RDEPEND="selinux? ( sec-policy/selinux-syncthing )"
+
+DOCS=( README.md AUTHORS CONTRIBUTING.md )
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+
+ if use tools ; then
+ # separate user for the relay server
+ enewgroup strelaysrv
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv
+ # and his home folder
+ keepdir /var/lib/strelaysrv
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i \
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+ || die
+}
+
+src_compile() {
+ export GOPATH="${S}:$(get_golibdir_gopath)"
+ cd src/${EGO_PN} || die
+ go run build.go -version "v${PV}" -no-upgrade install \
+ $(usex tools "all" "") || die "build failed"
+}
+
+src_test() {
+ cd src/${EGO_PN} || die
+ go run build.go test || die "test failed"
+}
+
+src_install() {
+ pushd src/${EGO_PN} >& /dev/null || die
+ doman man/*.[157]
+ einstalldocs
+
+ dobin bin/syncthing
+ if use tools ; then
+ exeinto /usr/libexec/syncthing
+ local exe
+ for exe in bin/* ; do
+ [[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}"
+ done
+ fi
+ popd >& /dev/null || die
+
+ # openrc and systemd service files
+ systemd_dounit src/${EGO_PN}/etc/linux-systemd/system/${PN}{@,-resume}.service
+ systemd_douserunit src/${EGO_PN}/etc/linux-systemd/user/${PN}.service
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+ keepdir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use tools ; then
+ # openrc and systemd service files
+ systemd_dounit src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv
+ fi
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ $(get_version_component_range 2) -gt \
+ $(get_version_component_range 2 ${v}) ]]; then
+ ewarn "Version ${PV} is not protocol-compatible with version" \
+ "0.$(($(get_version_component_range 2) - 1)).x or lower."
+ ewarn "Make sure all your devices are running at least version" \
+ "0.$(get_version_component_range 2).0."
+ fi
+ ewarn "Syncthing OpenRC init script now uses the upstream default of"
+ ewarn ""
+ ewarn " /var/lib/${PN}/.config/${PN}"
+ ewarn ""
+ ewarn "as its configuration directory. Please set SYNCTHING_HOMEDIR"
+ ewarn "to /var/lib/${PN} in /etc/conf.d/${PN} if you wish to continue"
+ ewarn "using the old Gentoo default. Systemd users are not affected."
+ done
+
+ # check if user syncthing-relaysrv exists
+ # if yes, warn that it has been moved to strelaysrv
+ if [[ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]]; then
+ ewarn
+ ewarn "The user and group for the relay server have been changed"
+ ewarn "from syncthing-relaysrv to strelaysrv"
+ ewarn "The old user and group are not deleted automatically. Delete them by running:"
+ ewarn " userdel -r syncthing-relaysrv"
+ ewarn " groupdel syncthing-relaysrv"
+ fi
+}
diff --git a/net-p2p/syncthing/syncthing-0.14.38.ebuild b/net-p2p/syncthing/syncthing-0.14.38.ebuild
new file mode 100644
index 000000000000..27a867b3abad
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-0.14.38.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN="github.com/${PN}/${PN}"
+
+inherit golang-vcs-snapshot systemd user versionator
+
+DESCRIPTION="Open Source Continuous File Synchronization"
+HOMEPAGE="https://syncthing.net"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm"
+IUSE="selinux tools"
+
+RDEPEND="selinux? ( sec-policy/selinux-syncthing )"
+
+DOCS=( README.md AUTHORS CONTRIBUTING.md )
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+
+ if use tools ; then
+ # separate user for the relay server
+ enewgroup strelaysrv
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv
+ # and his home folder
+ keepdir /var/lib/strelaysrv
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv
+ fi
+}
+
+src_prepare() {
+ default
+ sed -i \
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+ || die
+}
+
+src_compile() {
+ export GOPATH="${S}:$(get_golibdir_gopath)"
+ cd src/${EGO_PN} || die
+ go run build.go -version "v${PV}" -no-upgrade install \
+ $(usex tools "all" "") || die "build failed"
+}
+
+src_test() {
+ cd src/${EGO_PN} || die
+ go run build.go test || die "test failed"
+}
+
+src_install() {
+ pushd src/${EGO_PN} >& /dev/null || die
+ doman man/*.[157]
+ einstalldocs
+
+ dobin bin/syncthing
+ if use tools ; then
+ exeinto /usr/libexec/syncthing
+ local exe
+ for exe in bin/* ; do
+ [[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}"
+ done
+ fi
+ popd >& /dev/null || die
+
+ # openrc and systemd service files
+ systemd_dounit src/${EGO_PN}/etc/linux-systemd/system/${PN}{@,-resume}.service
+ systemd_douserunit src/${EGO_PN}/etc/linux-systemd/user/${PN}.service
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+
+ keepdir /var/{lib,log}/${PN}
+ fowners ${PN}:${PN} /var/{lib,log}/${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use tools ; then
+ # openrc and systemd service files
+ systemd_dounit src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv
+ fi
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if [[ $(get_version_component_range 2) -gt \
+ $(get_version_component_range 2 ${v}) ]]; then
+ ewarn "Version ${PV} is not protocol-compatible with version" \
+ "0.$(($(get_version_component_range 2) - 1)).x or lower."
+ ewarn "Make sure all your devices are running at least version" \
+ "0.$(get_version_component_range 2).0."
+ fi
+ ewarn "Syncthing OpenRC init script now uses the upstream default of"
+ ewarn ""
+ ewarn " /var/lib/${PN}/.config/${PN}"
+ ewarn ""
+ ewarn "as its configuration directory. Please set SYNCTHING_HOMEDIR"
+ ewarn "to /var/lib/${PN} in /etc/conf.d/${PN} if you wish to continue"
+ ewarn "using the old Gentoo default. Systemd users are not affected."
+ done
+
+ # check if user syncthing-relaysrv exists
+ # if yes, warn that it has been moved to strelaysrv
+ if [[ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]]; then
+ ewarn
+ ewarn "The user and group for the relay server have been changed"
+ ewarn "from syncthing-relaysrv to strelaysrv"
+ ewarn "The old user and group are not deleted automatically. Delete them by running:"
+ ewarn " userdel -r syncthing-relaysrv"
+ ewarn " groupdel syncthing-relaysrv"
+ fi
+}
diff --git a/net-p2p/syrep/Manifest b/net-p2p/syrep/Manifest
new file mode 100644
index 000000000000..dc430dc960b8
--- /dev/null
+++ b/net-p2p/syrep/Manifest
@@ -0,0 +1,5 @@
+DIST syrep-0.9.tar.gz 192317 SHA256 b4072bdd0eef99fdd57a0758e99be8d15917d0ba90cd67e1ffa0832de2568ed2 SHA512 2146b5e317e6bec60567976d6e17f68b817b80eb41fdb12125f899bf86dd27e92de1c5ef48b41ef09b6c61d3821d163e37486683d6b054dec46923cf451e8fed WHIRLPOOL cbdfbe0747718c551c128c3546f98fffda852f1fdc0ab1d01a71c6c717c47816ca382d9318b1c46e8c553cea3cc829305549e24b07c1f14cd8508a74d1ca79d6
+EBUILD syrep-0.9.ebuild 818 SHA256 9094a16ea6d815f39fd2c1d453bf15647912e55ba4cb5fde9b62ef2edbba5ad1 SHA512 25b14aab9bf89b3053615414dd49a278a8473e58ed599b5da715e018b65584793b60719f27fe7c9395d159074ce7e7bc983d0b1e0f746e2b4b77a11e000bcab7 WHIRLPOOL a432f6457bd536c03ab0ac1933d783b653902b3a1e33b31a08978c2f017f923e083a46bffecf424697208629d5366c40ef5e85079d25d46996daf61f47572d61
+MISC ChangeLog 2445 SHA256 dffd855072fd854d760f266a881d2ad81dbef33bf5a5cdcead6e2356360c548e SHA512 317e8f64cfb2008ade6a39a419327dd42e1866508bc361f79cacf172205472cf909639a704b6d62c9de3621736ac1fef9761ac02bd42bc0249fdc7522c7b2a97 WHIRLPOOL f80dc3b88e65f2ec41e6c8333377ab632a8ad46e8731d9429435549b1d9fe5597318698919cf6bd0e33604f743cd9a9bb7c015d508dcb442e59d4e33a71dca9b
+MISC ChangeLog-2015 976 SHA256 f8eee603627c1abf24058a275ab391d238b1b2930acc0211e2cb0677872f12ed SHA512 2be43bf527a678419bc595ced0ffd9dd44f9c810666cd99d79ffab4501cb0a7048d0d7a86b4e20edcf045c7acd5987a74b754d0f9f5c5a43e9609bcb0c5d2658 WHIRLPOOL 4d95fab25beb7f3bc1ed2b884bd8e8fe1040a3ee33cc9aece269d4ee3710c9d6824ffb4a9f1c2b4b49a35874fdf650bae933bb428b023ca2b77ff65150264758
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-p2p/syrep/metadata.xml b/net-p2p/syrep/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-p2p/syrep/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-p2p/syrep/syrep-0.9.ebuild b/net-p2p/syrep/syrep-0.9.ebuild
new file mode 100644
index 000000000000..5c015c5d59c5
--- /dev/null
+++ b/net-p2p/syrep/syrep-0.9.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit autotools
+
+DESCRIPTION="A generic file repository synchronization tool"
+HOMEPAGE="http://0pointer.de/lennart/projects/syrep/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="sys-libs/zlib
+ >=sys-libs/db-4.3
+ doc? ( www-client/lynx )"
+
+src_prepare() {
+ sed -i \
+ -e "s/#if (DB_VERSION_MAJOR != 4).*/#if (DB_VERSION_MAJOR < 4)/" \
+ configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable doc lynx) \
+ --disable-xmltoman \
+ --disable-subversion \
+ --disable-gengetopt
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ cd doc
+ dodoc README *.txt
+ use doc && dohtml *.html *.css
+}
diff --git a/net-p2p/torrentinfo/Manifest b/net-p2p/torrentinfo/Manifest
new file mode 100644
index 000000000000..3b30615569e7
--- /dev/null
+++ b/net-p2p/torrentinfo/Manifest
@@ -0,0 +1,7 @@
+AUX torrentinfo-1.8.6-fix-tests.patch 934 SHA256 f1fc8c405283f7a0acedf8470facaffeab1a8b9933b63a5a5906cccd43edbc1d SHA512 d878048fe01bea0260f6b3045e77f88a6fb94ed11e15996fa3389119d8315657f77d2434d2c67b3ab58c83d4741f11c22723f0e9abbd06f4ab0df82cffc1b064 WHIRLPOOL ee127fb839a84aab96a43b0bc4d1f9cc3fc5f193f75088504f2f8db262704dee834af3613bb17055868d15d6902421c124400a8e128f4516da19ecf98e03ad09
+DIST torrentinfo-1.8.6.tar.gz 22232 SHA256 8008d4933ba7e9f75a34318caeaceb58b56d7fd6c7d75fff70acea2716447582 SHA512 7f36f6c80876cbd70ea9e1331195c8a30a6546406f345402d4bec5c58afb9b03a3b60189b8d177a63a7047c3ede7fc18d8fc47ecb1bcbb726dd01b7cb2a6efb2 WHIRLPOOL 9a2acb0a979f518a94e6210cdcf9694b3b9e314d1b3dae0faeabb43fa604b1bfcd3fcc14719342b4e1e2b07f5f66cadfec603f52cf43c88fd8bcd11cee84350d
+EBUILD torrentinfo-1.8.6-r1.ebuild 651 SHA256 10505459085fcf6bd24432f30f84e59880cc513ceaaffa8b729200e33e8c805b SHA512 5193fa2291a2fda3a509fa9ec74a83b1a6d8e0a40493fd876f3c71c2279101d00e05f333281e451044ad4ef5cd85deb29332bdf7eef98cd8ce5f7db739f0e797 WHIRLPOOL 5542787f49b472c71e3786856a580b662960ac9fbce0ec86c2cb1c0451ba969fd87a18010325676ec8d54a5b431331ed16439d0eda6db5992f2fe8387e3a86b1
+EBUILD torrentinfo-1.8.6.ebuild 588 SHA256 c2b4136d5fb693c4b670fdebf20b9bf72dffd5a4aac6aadd350838f085daf490 SHA512 d548e58d23b1db0621ee3bd48b2b56ac14a99bdf9c658cb203a9cd9d9962f9d168f94f99bf1bae911a513c195e4cce76c2da6096a1e0175c762055c2f68a2067 WHIRLPOOL 3bc2dcc126adfe13824c8155107234cf0e030880f65a7b6ac5004454df091cc8f8744949b168df8ae0e861801626b4208537e707a55ac1454b1fe9d488bbc901
+MISC ChangeLog 2706 SHA256 24d078e2fc4205696acf393cdd591f92db094d4b95febfdad3e36d587c074b05 SHA512 dc3896d1b55c224e2d3cb2f43a153ad37c6cbede714282ea0f56761bae0f9dbb3c44c6fcc7e9bdae23c390646e0698e5b51d2386cad0df6acc65f4197f8c82f7 WHIRLPOOL 7a9998784fa441d3895a681fba50b5d913f2bb3248bea94ea2b3ce66234dc1f9f56a96f5c8451eba895ea01ec08942d23b74dd20af59f1fc99bdaec0c3312d6f
+MISC ChangeLog-2015 3001 SHA256 20d68fc300c23632c184757d48b5556671eef686cbfcba208f71c28dc5b384b2 SHA512 c49ef44a26f57308fb0e75faf78f6b0d8b201637b11f050abd19cfb156fa42b0932981568e98074f952b654b9154585f7e81acdb30bcddc0b56e8c5b9b7b4d45 WHIRLPOOL f4c3077fd4b8227f6aa960d38d43f1a33b6fbcae4c2e485b8d1b87fca4e121adc7b2f877f8c30e9cb63a5df6ace32ab37b6ce1b88149f1f5e1fa1e866bb07617
+MISC metadata.xml 638 SHA256 ad032aa3c972328004bf2bf1a8c5fd61f2be68e295faffed68eed9d0604b531c SHA512 117d1130ffe71504745527604412fbef33d597a921a28f4c354120448454c8e339396f5083d9f756c94a6cec897c2fe8135a2a8211a7ff9c9dc1c4ba8225668b WHIRLPOOL bf4e44dd4a403bd07930d31fc69ba1dcdd9bfbf37c71430d1c2a9047f4b22d74a663d7be776a00bd6d34c70919876f4d788d20cfe89dcafecbc10703fdf28190
diff --git a/net-p2p/torrentinfo/files/torrentinfo-1.8.6-fix-tests.patch b/net-p2p/torrentinfo/files/torrentinfo-1.8.6-fix-tests.patch
new file mode 100644
index 000000000000..1c9f5dfae4dc
--- /dev/null
+++ b/net-p2p/torrentinfo/files/torrentinfo-1.8.6-fix-tests.patch
@@ -0,0 +1,23 @@
+From 26ad58f68927186a1216ca8ae4596a8132191dcf Mon Sep 17 00:00:00 2001
+From: Louis Sautier <sautier.louis@gmail.com>
+Date: Sat, 30 Jan 2016 15:06:35 +0100
+Subject: [PATCH] Fix #15 by making the output predictably sorted
+
+Fixes https://github.com/Fuuzetsu/torrentinfo/issues/15
+---
+ src/torrentinfo.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/torrentinfo.py b/src/torrentinfo.py
+index a8ffea4..07b653b 100755
+--- a/src/torrentinfo.py
++++ b/src/torrentinfo.py
+@@ -569,7 +569,7 @@ def list_files(config, torrent, detailed=False):
+
+ config.formatter.string_format(TextFormatter.NORMAL, config, '\n')
+ if detailed:
+- for kwrd in filestorrent[index]:
++ for kwrd in sorted(filestorrent[index], reverse=True):
+ start_line(config, kwrd, 3, postfix='\n')
+ dump(filestorrent[index][kwrd], config, 4)
+ else:
diff --git a/net-p2p/torrentinfo/metadata.xml b/net-p2p/torrentinfo/metadata.xml
new file mode 100644
index 000000000000..2054982a1b7c
--- /dev/null
+++ b/net-p2p/torrentinfo/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sautier.louis@gmail.com</email>
+ <name>Louis Sautier</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>fuuzetsu@fuuzetsu.co.uk</email>
+ <name>Mateusz Kowalczyk</name>
+ </maintainer>
+ <bugs-to>https://github.com/ShanaTsunTsunLove/torrentinfo/issues</bugs-to>
+ <remote-id type="github">Fuuzetsu/torrentinfo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/torrentinfo/torrentinfo-1.8.6-r1.ebuild b/net-p2p/torrentinfo/torrentinfo-1.8.6-r1.ebuild
new file mode 100644
index 000000000000..5474e996bcb5
--- /dev/null
+++ b/net-p2p/torrentinfo/torrentinfo-1.8.6-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy{,3} )
+
+inherit distutils-r1
+
+DESCRIPTION="A torrent file parser"
+HOMEPAGE="https://github.com/Fuuzetsu/torrentinfo"
+SRC_URI="https://github.com/Fuuzetsu/torrentinfo/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-tests.patch" )
+
+python_test() {
+ nosetests test/tests.py || die "tests failed with ${EPYTHON}"
+}
diff --git a/net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild b/net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild
new file mode 100644
index 000000000000..fd8cc74b4ddc
--- /dev/null
+++ b/net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit distutils-r1
+
+DESCRIPTION="A torrent file parser"
+HOMEPAGE="https://github.com/Fuuzetsu/torrentinfo"
+SRC_URI="https://github.com/Fuuzetsu/torrentinfo/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test"
+
+DEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+python_test() {
+ # tests sometimes fail, see bug #493682
+ nosetests test/tests.py || die "tests failed with ${EPYTHON}"
+}
diff --git a/net-p2p/transmission-remote-cli/Manifest b/net-p2p/transmission-remote-cli/Manifest
new file mode 100644
index 000000000000..d97ac8af82ef
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/Manifest
@@ -0,0 +1,5 @@
+DIST transmission-remote-cli-1.7.1.tar.gz 257981 SHA256 e9135a440d48761f00e990cd0b6eb4c378b82041c479f4624f5c1a27d99d10f8 SHA512 b1b31c36365a0f7733912f3a2c01e6e9f20430f29b618c7e526a214632a29d2bc76702f0c31910fdc495a7eaf37bf74e7433c552fc922c440c0874422208bae9 WHIRLPOOL 3aac4d7986a581afcbe904589c825600b5540525dd0598bc2c7b1e92f2fc0c7d4f6e9c93cd8b14f75b1a471f9d77f53ad7e680059459d797558deddc698fb1b5
+EBUILD transmission-remote-cli-1.7.1.ebuild 918 SHA256 189eaeef5d3f6a4f80c0aa3851b73e6b4b6c32031083149eb158a0c2ab46e366 SHA512 ef39e5cdb32b2ef71d78e1f7fd624e761e7a492f3eec3b8f6ca8f7dd93d18b7c53dd78e983d5e0e9efa51ceaa8448403897b0ca8b46016c5fe9059f389a6ee4a WHIRLPOOL 86a95e3af876f3791844e2c1a0eae8b5d28675260c23e185bc87c010284137733d76ebeb8dcf684d05676ed5b077cb4345012bd2c90aa527feeafcb97c70a2e5
+MISC ChangeLog 2895 SHA256 994ece6ff46eb52ba2ba7eeb36ed6a9c3f6c087470d7ca8645ee8a335e0cc26f SHA512 57986a01360d32b662439271c4a5f75387f6e1f823c6f8c78b6c135de0ecda7fe775e72230325b3b636a8d5a11744b860d36718bd2c75919d8ce87199d01178c WHIRLPOOL 25f32f91106d852f094f00f460892219d6d3baec5ce36b1ff030df4286d0b7860763c54dcb032c832a4e9dd1bd8a4ad9a81676881a5decd4877dcd4d7e81250f
+MISC ChangeLog-2015 3102 SHA256 d31be7d506fe09190b8db1d6dab50f9d17c39a343ae222d379560d9227a60d1a SHA512 706fd2facb0603720dcd13de7c2bfa530eebb9044dbd50fe3b781412c389b7927814e65b70465c5496787f53b14905785fdc8f9120e8c314fa57dd5d893322fd WHIRLPOOL 79453674bf66574b6dceb0af6a59360409b0542863b7b8da1d4a8b05e8730ec856183450f318c5b8f220b56826aa6a796c4ef9a9276c199b0d340fe14ab48434
+MISC metadata.xml 582 SHA256 9df925ec22e0ad683f39ae25ed187856820685b56df7dcccdc0a32499ebc08d5 SHA512 bf3a669b7bece94babc4ea5dc7610ec18a6811a8c6fff72b135151568681176583224c9c249207791e08bec934b85ce39f81c09c575dd443b34277a6ba5a575e WHIRLPOOL 20dcecc8f395abf57b82faf823ff0a4916fe16d484d77dbdcac4b8f8992a9caf5cb51d7a391ebfd6fed9b7c6340ea456b4f0e3bdae1ce9ef94dfdff480c24982
diff --git a/net-p2p/transmission-remote-cli/metadata.xml b/net-p2p/transmission-remote-cli/metadata.xml
new file mode 100644
index 000000000000..f9835acf5ca8
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven (lorem_ipsum)</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">fagga/transmission-remote-cli</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.1.ebuild b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.1.ebuild
new file mode 100644
index 000000000000..4a103d47b94b
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="ncurses"
+inherit bash-completion-r1 python-r1
+
+DESCRIPTION="Ncurses interface for the Transmission BitTorrent client"
+HOMEPAGE="https://github.com/fagga/transmission-remote-cli/"
+SRC_URI="https://github.com/fagga/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="geoip"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ geoip? ( dev-python/geoip-python[$PYTHON_USEDEP] )
+"
+
+src_install() {
+ python_foreach_impl python_doscript transmission-remote-cli
+ newbashcomp completion/bash/transmission-remote-cli-bash-completion.sh \
+ transmission-remote-cli
+ insinto /usr/share/zsh/site-functions
+ doins completion/zsh/_transmission-remote-cli
+ doman transmission-remote-cli.1
+ dodoc NEWS README.md
+}
diff --git a/net-p2p/transmission-remote-gtk/Manifest b/net-p2p/transmission-remote-gtk/Manifest
new file mode 100644
index 000000000000..8959f012877d
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/Manifest
@@ -0,0 +1,5 @@
+DIST transmission-remote-gtk-1.3.1.tar.xz 459260 SHA256 1b29c573b1e205e3e7c2433dc4a48f9574278d97e033845d19bbffa1d7f75345 SHA512 ce723d51f8f769e59fb539241996ff0204a654f52696963044f8535731cc2b8ec69cf454a15253f9ba214e0879498f3c19519b5b1b303273d667592887ee45f5 WHIRLPOOL 7ca78f608809ba74be1040ff73dde5a0bc68cb665fe889ca68e219e04cb17ec40bdd2994999ddc76819e3b5d5f4c9aeb256800268a2d92b56d84d904e8b7bac0
+EBUILD transmission-remote-gtk-1.3.1.ebuild 1356 SHA256 276f0edbdb8a7fb704ba6df0812f56392098079a553bd86b29cb61fee520f9c6 SHA512 c89c23aa0bbd750e614c81eb56c67df212b9ee66fd6f40a3c4276465a14aaff7defea205cb2acd8e39e29bcbfd7e7fa2bcd1cb3941e9eefd2203b9309e42cca8 WHIRLPOOL 3e9f2fcc332d17ca129bd6e84c5c03b5d6eb848ae42652a7a3ee57407370ada7b13375a5a43cb0aceb5c7ae222754065958d3303c798d936661b32a77d4a8dec
+MISC ChangeLog 3134 SHA256 259d27279875ae2f7739cd074112e3e67b54533aecbbdeb111552c7155c1eb9b SHA512 b28055977c647ecd4e7d3acf0e03050a5566baf8f7930f10955c4a0294d6ee17cae139d8e420f4b9d94690a9df65fa76ce1c4a66081d7ad65476d6dde868b441 WHIRLPOOL 31458c8bf7a355ac426fb0f80fe132b7cc8e6be509bd0c4405d5e90a48a543e762739ae998b50d9ac329eff6241669b3a46359b4b1d5b2a4fc4f527876680069
+MISC ChangeLog-2015 3525 SHA256 707340f91f72c57b9824650e82a8fb4236d381a973585d8ac3f06b696bd1c34d SHA512 f91537e8918d9ddf1838edeff9b2b7ba47f1b9525eaaefaf755e927ed3d7f13ef0f6824534345b723c5146115bb2eefa3c7002fc097ca643fec1b92eba41c711 WHIRLPOOL c295ec656aa814a0faf17c50cb5065d008f50d383dc999e9a61418692c9942a5b2547bb100796e792788be926b02d9c91c15a37cfcefeb8396f52dbb6b4561e5
+MISC metadata.xml 388 SHA256 ff57788378e96bb45ff63d3542e4117f80ed5608bfbed5c956140507b6104075 SHA512 3232f0dbfed6e0f43cb76ab6a8209226fc306d231950948a3254b345cdf7d2861347f0218c5784261e882a45b5d79683ef9ecc68b35e5fa4fb4d14de2d6e1eab WHIRLPOOL 390c7a92b16ea4f5e315e0129f4b8a24b017bcf05e9529ebfec14d6fcfa618695b6c8f9c05183eac1bc9955b33f11a1da1d5fbc41a53a665e735bad5363f9bc6
diff --git a/net-p2p/transmission-remote-gtk/metadata.xml b/net-p2p/transmission-remote-gtk/metadata.xml
new file mode 100644
index 000000000000..8b4c233cb177
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for
+ getting the HTTP/HTTPS/SOCKS proxy configuration.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">transmission-remote-gtk/transmission-remote-gtk</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.3.1.ebuild b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.3.1.ebuild
new file mode 100644
index 000000000000..bef684ca11f2
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.3.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_EAUTORECONF="yes"
+
+inherit gnome2
+
+DESCRIPTION="GTK+ client for management of the Transmission BitTorrent client, over HTTP RPC"
+HOMEPAGE="https://github.com/transmission-remote-gtk/transmission-remote-gtk"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ayatana debug geoip libnotify libproxy rss"
+
+# RESTRICT="test"
+
+# FIXME: bundles rss-glib-0.2.3
+RDEPEND="
+ >=dev-libs/glib-2.44:2
+ >=dev-libs/json-glib-0.12.6
+ net-misc/curl
+ >=x11-libs/gtk+-3.16:3
+ ayatana? ( dev-libs/libappindicator:3 )
+ geoip? ( dev-libs/geoip )
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ libproxy? ( net-libs/libproxy )
+ rss? ( >=net-libs/libmrss-0.18 )
+"
+DEPEND="${RDEPEND}
+ dev-libs/appstream-glib
+ >=dev-util/intltool-0.50.1
+ sys-devel/autoconf-archive
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i -e '/-Werror/d' configure.ac || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Disable overly strict appdata validation
+ gnome2_src_configure \
+ $(use_enable debug) \
+ $(use_with geoip libgeoip) \
+ $(use_with libnotify) \
+ $(use_with libproxy) \
+ $(use_with ayatana libappindicator) \
+ $(use_with rss libmrss) \
+ APPSTREAM_UTIL="$(type -P true)"
+}
diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
new file mode 100644
index 000000000000..05803818894b
--- /dev/null
+++ b/net-p2p/transmission/Manifest
@@ -0,0 +1,11 @@
+AUX libsystemd.patch 630 SHA256 ba963aa93c988934e9d3e90b21d1184033a0fb55cfb1517d81f7c7134f73d5b4 SHA512 5babefd3ab0216dd1cf0b08b1ad10c79d034782ce744c9a4df402036ed1529655b9e05c641e876e9629a8366363ad0bf2d5e7581a621f2b0749ff02c6ed742eb WHIRLPOOL aedece0f9f66293a9cae9678d725f0a27de62f9df07bf5396a677033267a447d5ab0949543782177dfb1e4d7854a32163bc09369417b4f84758d11f5ee1eb7d7
+AUX transmission-2.92-handshake.patch 1257 SHA256 c050cf28bf1318c8f414219b03a8d9896a71af84fc7a2752f2e6f9e2f430fc24 SHA512 d4272018ffc7ea9607dae475275d694e678119160225f00135ced711771ddf79af7271c42399bccf701d67ac07052a47f33439ba32bb74838786d3e915c364f6 WHIRLPOOL 1a3264085e00e28afd1233de704e817efc6d17092c27335233bd0d79004fefa8eb06c7849c8aab9b886fb40a276418f036253690ae8c05c53b8afa1c3b053afd
+AUX transmission-daemon.confd.4 735 SHA256 9065bcf729309aebd48ae2214a461d162924462fb2db51f33aed40dd0c3b4f25 SHA512 47e78c85857eefb9be6c25d1e789cfb2a276d5816ba911ba1511e764469b2d9998edafe44247aff784113ca28926748bc5fb2b879280b780fd69ffb1e4e40736 WHIRLPOOL bac8685d10d2211cc6a50df19de0b4b529eabd4ee0111a8e11e4e61954b0342c7cf52f6d449abc3d66ac54839c996f57cab82da445512897b09f8ce629a8e94b
+AUX transmission-daemon.initd.10 1707 SHA256 8925e7b2f59de7c116778fa9a498e8209358117b08870a9208fe37c8b2f01ee5 SHA512 30d9fe7d06ca3c92ff436e9bbe84729a5b343b52965f8d1d3d43f14f5fa25881dbc9676c5d3d916cff552aad5872ed41c2930e9ce3a5f7c958dbeec0d1ab1ac4 WHIRLPOOL 7915798dea7284973bbb3684f5b67f79b1dc71ce6c6c7f12137b71b65c80029ac706687872093a4a781cb6aa4956d6ff220c0fa9fa56368af98d3e263d2da55c
+AUX transmission-daemon.service.conf 69 SHA256 e73b846a40be0fea265cc6e920fefb5f79c3ad10da2fcfa9fa1f786d82e89131 SHA512 3dc02be596296fc1efbf1bc690be3953709af00c230f55db4d067ff592d87e1a465faa4067bc15d65a8a27fed2cf07d108abb2ed45fc76b47b0642ce2e182946 WHIRLPOOL b7cbee802b4bef994608317388587776c05fa0746de1ecf75b530473bb9910a2308c4a2d188ed9aa2725ed9dbee6e2bae05e51d5b8c8cbefd5a8763d1365e791
+DIST transmission-2.92.tar.xz 3378116 SHA256 3a8d045c306ad9acb7bf81126939b9594553a388482efa0ec1bfb67b22acd35f SHA512 4d99476bee88cedcc4238a0eee64a4089016933cbfc1cfb1cca023ad4ebcfe46375c9e7651a17af4aeaaf1feb19cbd8166aa56ef7992d9e745a7bbcbe8efca11 WHIRLPOOL a2eab113fd895001cf72cd79c4ac9a4767eb9fb756a3fb9b1d0db6aa283d19a6aec739b8681a3a5a26ef630cec68f004e14f8654221f0528e30927f37339887f
+EBUILD transmission-2.92-r2.ebuild 4347 SHA256 04cbaf286eea0af274c4628b57e07be3fc17c62812eea08626ecf0f73c5a4b1f SHA512 1dc44445ec7bda9aff29c70a0a368cfca377795e14d887e66c9c552f0629142398f13b49c8b1da8b46fa8f5d15f7a9c7c7430e772dfc135e45619c69e35bf332 WHIRLPOOL 6290eb5d36b3647a619b172b39f2b1cc26c793e8e0138ba0039d00f1e7ebf02030830d84994749d785f90662684462b79f69b5135d3fbbbfc38cd65be80ac25d
+EBUILD transmission-9999.ebuild 3738 SHA256 ef263f79917147646d5130206f6908bb530ba76e8cc7e49452a2c116a60ae446 SHA512 8ea1ae5d27f1db02eef27ddb4e9803c4146fd6d8fbeaff2cdfa749faad0e5df6b2095c42797775be021b50f25325fc31901ef883967c9178c635572781fb2aac WHIRLPOOL 2d51e4ae6b20ea6b2a8d6f587bea6a04f60f82836f6a20b32b148307b067ebcd4d7f62bdc8120a853ea094425b3337a61996c005972dc7bf2683484bbf5063d5
+MISC ChangeLog 9562 SHA256 3575a0a2436aa49457b377f1d66626137db3c6c303ab9c9045013a8b11f5481a SHA512 baaed0881db9085b81c8bee5318715b06bc041f4d320487f4c490208cce9e46aaf5056e6361f46c7b6be059b967875131056cf69155ce0a1864c7eec6037c0ee WHIRLPOOL 24083aadbe5a5ba6b9331a43f88825b98a187f810339caa9b4eb842101fd7cd4e66f319b6ee683025ce69f5352681e597b64a5c42aa7b94e41d9e257af5e7e20
+MISC ChangeLog-2015 44842 SHA256 9f1b3498aef31c65535f11e481362070f5cc5bb449cf9c946b28ad3ccfbd2457 SHA512 6f7d44abcec4edfc0f2930906a65a1409d9039a335cec9dead774a363f10d13e9e0eeb9f28165ccc6d174adc26ef977447a88e937801ee767a622b731399a670 WHIRLPOOL 794195cf1eb37646c42a55583a0722014258aba1f0ae55d1d017fb2e8d07bb3bda9208bf5b671bfe1d0d5389fc2100436a49790c0855caf9c2f48a9bee222008
+MISC metadata.xml 613 SHA256 0a14f95ae94cfa6ebef88b18532520c0c30eb17312a344fdce5316ac9767b8cb SHA512 ca6047c72ae050ed34068c21c52c47116c94db558b8919dfa88db98d9a13396ac31b7a31b702969d417486266a9ebddc0befd9c95b9842f82e04231d5e4d9352 WHIRLPOOL 35098c068798ba4ea27749687de4075c17b3282e27c8b0ce6f8f3ccd1924f0d51f5f7d342abac2f86558a75e778633b50930f15ba476888d78fc9f1982d702a0
diff --git a/net-p2p/transmission/files/libsystemd.patch b/net-p2p/transmission/files/libsystemd.patch
new file mode 100644
index 000000000000..5db47ef39bd9
--- /dev/null
+++ b/net-p2p/transmission/files/libsystemd.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -245,7 +245,7 @@
+ [Add support for systemd startup notification (default is autodetected)]),
+ [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
+ AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
+- PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
++ PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
+ [AC_DEFINE(USE_SYSTEMD_DAEMON,1,[Use systemd startup notification])],
+ [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
+ [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
diff --git a/net-p2p/transmission/files/transmission-2.92-handshake.patch b/net-p2p/transmission/files/transmission-2.92-handshake.patch
new file mode 100644
index 000000000000..a30cd583fae0
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.92-handshake.patch
@@ -0,0 +1,33 @@
+commit 4c00df9463ea4fd70b73c620e439f5c3ee5efa60
+Author: Mike Gelfand <mikedld@mikedld.com>
+Date: Sun Sep 18 13:58:15 2016 +0300
+
+ Abort handshake if establishing DH shared secret fails
+
+ Fixes #27
+
+diff --git a/libtransmission/handshake.c b/libtransmission/handshake.c
+index c728696..e7ff131 100644
+--- a/libtransmission/handshake.c
++++ b/libtransmission/handshake.c
+@@ -425,7 +425,8 @@ readYb (tr_handshake * handshake, struct evbuffer * inbuf)
+
+ /* compute the secret */
+ evbuffer_remove (inbuf, yb, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, yb);
++ if (!tr_cryptoComputeSecret (handshake->crypto, yb))
++ return tr_handshakeDone (handshake, false);
+
+ /* now send these: HASH ('req1', S), HASH ('req2', SKEY) xor HASH ('req3', S),
+ * ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */
+@@ -741,7 +742,9 @@ readYa (tr_handshake * handshake,
+
+ /* read the incoming peer's public key */
+ evbuffer_remove (inbuf, ya, KEY_LEN);
+- tr_cryptoComputeSecret (handshake->crypto, ya);
++ if (!tr_cryptoComputeSecret (handshake->crypto, ya))
++ return tr_handshakeDone (handshake, false);
++
+ computeRequestHash (handshake, "req1", handshake->myReq1);
+
+ /* send our public key to the peer */
diff --git a/net-p2p/transmission/files/transmission-daemon.confd.4 b/net-p2p/transmission/files/transmission-daemon.confd.4
new file mode 100644
index 000000000000..64ecd8091a3a
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.confd.4
@@ -0,0 +1,15 @@
+# This is the transmission-daemon configuration file. For other options and
+# better explanation, take a look at transmission-daemon manual page Note: it's
+# better to configure some settings (like username/password) in
+# /var/lib/transmission/config/settings.json to avoid other users see it with `ps`
+
+# Parameters to pass to transmission-daemon
+# TRANSMISSION_OPTIONS=""
+
+# Run daemon as another user (username or username:groupname)
+# If you change this setting, chown -R /var/lib/transmission/config <and download directory, check web settings>
+#runas_user=transmission
+
+# Location of logfile (should be writeable for runas_user user)
+# Set logfile=syslog to use syslog for logging
+#logfile=/var/log/transmission/transmission.log
diff --git a/net-p2p/transmission/files/transmission-daemon.initd.10 b/net-p2p/transmission/files/transmission-daemon.initd.10
new file mode 100644
index 000000000000..a8afd2a243dd
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.initd.10
@@ -0,0 +1,49 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/transmission-daemon"
+extra_started_commands="reload"
+description="Transmission is a fast, easy and free bittorrent client"
+description_start="Start transmission-daemon server and web interface"
+description_stop="Stop transmission-daemon server and web interface"
+description_reload="Reload transmission-daemon settings"
+
+rundir=${rundir:-/var/run/transmission}
+pidfile=${pidfile:-${rundir}/transmission.pid}
+config_dir=${config_dir:-/var/lib/transmission/config}
+download_dir=${download_dir:-/var/lib/transmission/downloads}
+logfile=${logfile:-/var/log/transmission/transmission.log}
+runas_user=${runas_user:-transmission:transmission}
+
+retry="TERM/45/QUIT/15"
+
+start_pre() {
+ command_args="--config-dir ${config_dir} --pid-file ${pidfile}"
+ command_user="${runas_user}"
+
+ # Call mkdir -p in case parent dirs are missing
+ mkdir -p "${rundir}" "${config_dir}" "${download_dir}"
+
+ # Call checkpath to fixup permissions
+ checkpath -d -o "${runas_user}" "${rundir}" "${config_dir}" "${download_dir}" || return
+
+ if [ ! -e "${config_dir}/settings.json" ]; then
+ # Only set download dir if settings don't exist
+ # https://bugs.gentoo.org/576640
+ command_args="${command_args} --download-dir ${download_dir}"
+ fi
+
+ if [ "${logfile}" != syslog ]; then
+ checkpath -d -o "${runas_user}" /var/log/transmission || return
+ command_args="${command_args} --logfile ${logfile}"
+ fi
+
+ command_args="${command_args} ${TRANSMISSION_OPTIONS}"
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --exec "${command}" --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/net-p2p/transmission/files/transmission-daemon.service.conf b/net-p2p/transmission/files/transmission-daemon.service.conf
new file mode 100644
index 000000000000..ae543ca3f08f
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.service.conf
@@ -0,0 +1,2 @@
+[Service]
+Environment=TRANSMISSION_HOME=/var/lib/transmission/config
diff --git a/net-p2p/transmission/metadata.xml b/net-p2p/transmission/metadata.xml
new file mode 100644
index 000000000000..e49e57cc90d4
--- /dev/null
+++ b/net-p2p/transmission/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <use>
+ <flag name="lightweight">Optimize transmission for low-resource systems (smaller cache size, prefer unencrypted peer connections, etc.)</flag>
+ <flag name="mbedtls">Use mbed TLS instead of OpenSSL</flag>
+ <flag name="xfs">Enable XFS filesystem capabilities by using <pkg>sys-fs/xfsprogs</pkg> headers (in building of fdlimit(.c))</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/transmission/transmission-2.92-r2.ebuild b/net-p2p/transmission/transmission-2.92-r2.ebuild
new file mode 100644
index 000000000000..ba43a7787f0c
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.92-r2.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools fdo-mime flag-o-matic gnome2-utils qmake-utils systemd user
+
+DESCRIPTION="A Fast, Easy and Free BitTorrent client"
+HOMEPAGE="http://www.transmissionbt.com/"
+SRC_URI="http://download.transmissionbt.com/${PN}/files/${P}.tar.xz"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT=0
+IUSE="ayatana gtk libressl lightweight systemd qt5 xfs"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.90:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ qt5? ( dev-qt/linguist-tools:5 )
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk )"
+
+DOCS=( AUTHORS NEWS qt/README.txt )
+
+PATCHES=(
+ "${FILESDIR}"/libsystemd.patch
+ "${FILESDIR}/${P}-handshake.patch"
+)
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+
+ # Trick to avoid automagic dependency
+ if ! use ayatana ; then
+ sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die
+ fi
+
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' libtransmission/Makefile.am || die
+
+ # Prevent m4_copy error when running aclocal
+ # m4_copy: won't overwrite defined macro: glib_DEFUN
+ rm m4/glib-gettext.m4 || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ # https://bugs.gentoo.org/577528
+ append-lfs-flags
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ eqmake5 qtr.pro
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt5; then
+ emake -C qt
+ $(qt5_get_bindir)/lrelease qt/translations/*.ts || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm "${ED%/}"/usr/share/transmission/web/LICENSE || die
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ if use qt5; then
+ pushd qt >/dev/null || die
+ emake INSTALL_ROOT="${ED%/}"/usr install
+
+ domenu transmission-qt.desktop
+
+ local res
+ for res in 16 22 24 32 48 64 72 96 128 192 256; do
+ doicon -s ${res} icons/hicolor/${res}x${res}/transmission-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/transmission-qt.svg
+
+ insinto /usr/share/qt5/translations
+ doins translations/*.qm
+ popd >/dev/null || die
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ elog "If you use transmission-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, transmission-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/transmission/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, transmission needs large kernel buffers for"
+ elog "the UDP socket. You can append following lines into /etc/sysctl.conf:"
+ elog " net.core.rmem_max = 4194304"
+ elog " net.core.wmem_max = 1048576"
+ elog "and run sysctl -p"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/transmission/transmission-9999.ebuild b/net-p2p/transmission/transmission-9999.ebuild
new file mode 100644
index 000000000000..77f58934f397
--- /dev/null
+++ b/net-p2p/transmission/transmission-9999.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils readme.gentoo-r1 systemd user xdg-utils
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/transmission/transmission"
+else
+ SRC_URI="https://github.com/transmission/transmission/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+fi
+
+DESCRIPTION="A fast, easy, and free BitTorrent client"
+HOMEPAGE="https://transmissionbt.com/"
+
+# web/LICENSE is always GPL-2 whereas COPYING allows either GPL-2 or GPL-3 for the rest
+# transmission in licenses/ is for mentioning OpenSSL linking exception
+# MIT is in several libtransmission/ headers
+LICENSE="|| ( GPL-2 GPL-3 Transmission-OpenSSL-exception ) GPL-2 MIT"
+SLOT="0"
+IUSE="ayatana gtk libressl lightweight nls mbedtls qt5 systemd test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/libb64:0=
+ >=dev-libs/libevent-2.0.10:=
+ !mbedtls? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ mbedtls? ( net-libs/mbedtls:0= )
+ net-libs/libnatpmp
+ >=net-libs/miniupnpc-1.7:=
+ >=net-misc/curl-7.16.3[ssl]
+ sys-libs/zlib:=
+ gtk? (
+ >=dev-libs/dbus-glib-0.100
+ >=dev-libs/glib-2.32:2
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( >=dev-libs/libappindicator-0.4.30:3 )
+ )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtdbus:5
+ )
+ systemd? ( >=sys-apps/systemd-209:= )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? (
+ virtual/libintl
+ gtk? (
+ dev-util/intltool
+ sys-devel/gettext
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ )
+ )
+"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.gz
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_DOCDIR=share/doc/${PF}
+
+ -DENABLE_GTK=$(usex gtk ON OFF)
+ -DENABLE_LIGHTWEIGHT=$(usex lightweight ON OFF)
+ -DENABLE_NLS=$(usex nls ON OFF)
+ -DENABLE_QT=$(usex qt5 ON OFF)
+ -DENABLE_TESTS=$(usex test ON OFF)
+ -DUSE_QT5=ON
+
+ -DUSE_SYSTEM_EVENT2=ON
+ -DUSE_SYSTEM_DHT=OFF
+ -DUSE_SYSTEM_MINIUPNPC=ON
+ -DUSE_SYSTEM_NATPMP=ON
+ -DUSE_SYSTEM_UTP=OFF
+ -DUSE_SYSTEM_B64=ON
+
+ -DWITH_CRYPTO=$(usex mbedtls polarssl openssl)
+ -DWITH_INOTIFY=ON
+ -DWITH_LIBAPPINDICATOR=$(usex ayatana ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd ON OFF)
+ )
+
+ cmake-utils_src_configure
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="\
+If you use transmission-daemon, please, set 'rpc-username' and
+'rpc-password' (in plain text, transmission-daemon will hash it on
+start) in settings.json file located at /var/lib/transmission/config or
+any other appropriate config directory.
+
+Since µTP is enabled by default, transmission needs large kernel buffers for
+the UDP socket. You can append following lines into /etc/sysctl.conf:
+
+net.core.rmem_max = 4194304
+net.core.wmem_max = 1048576
+
+and run sysctl -p"
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/transmission-daemon.initd.10 transmission-daemon
+ newconfd "${FILESDIR}"/transmission-daemon.confd.4 transmission-daemon
+ systemd_dounit daemon/transmission-daemon.service
+ systemd_install_serviced "${FILESDIR}"/transmission-daemon.service.conf
+
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+
+ enewgroup transmission
+ enewuser transmission -1 -1 /var/lib/transmission transmission
+
+ if [[ ! -e "${EROOT%/}"/var/lib/transmission ]]; then
+ mkdir -p "${EROOT%/}"/var/lib/transmission || die
+ chown transmission:transmission "${EROOT%/}"/var/lib/transmission || die
+ fi
+
+ readme.gentoo_print_elog
+}
diff --git a/net-p2p/tribler/Manifest b/net-p2p/tribler/Manifest
new file mode 100644
index 000000000000..8bb070a78a9a
--- /dev/null
+++ b/net-p2p/tribler/Manifest
@@ -0,0 +1,9 @@
+AUX tribler-6.2.0-fix-desktop.patch 571 SHA256 827e8050ace201c5e33f037698fda5d385ce7188e44d49e4bc1210ef9f509352 SHA512 36d0c061dd31c1bd2a1d5ac7504ea2ceadc7ff202c4898f39071c836e305e182b28477087b9fff887f9ce3174aa9f050a64897f3bf10ebf3e42ab2fd433c7a5a WHIRLPOOL b0c5dc991ef21e503857c40a8c575921b0b887ab22e7b76982ebf797490c9c4fa13c2e01e0d650d4923d38c10a7de6442a8b0a4c254ed01e834798e2afd9cdcf
+AUX tribler-log2homedir.patch 495 SHA256 2eb5028822b3e50775804386d7ea233868f9a3b8b4c8e56b422f715c60f56f69 SHA512 d518cf8917c89ae6e9ae777230ff2c6914ef6c08390aac7ce599e25941a51bfad3a68f28123916948cfc64a34c3631ad4f82cac6448bc87006e4ee55a4b67137 WHIRLPOOL 1d5158c5b612d71df09c938b07bd74adf6f19b695eeef751939d5af3142b858a14b47b4bfb438c6716b3ed5cae16ec8557a3522fa2424b4f9c1d68293aeed4ff
+DIST tribler-swift_6.3.3_amd64.deb 3056230 SHA256 9453576d40312af1395821a49f72c3e87eea5d34ba6dd4d81bb3b60e88556f92 SHA512 590542a94981bcaf289955019b2c51d9e71bf915176a11f0dd8e8f68548137f8c503f9a08a0edee31116373e654cf4cc06b2a2d10d32ce4d12a24980ca6692aa WHIRLPOOL f320c075eca4b98593eafbfb4ea67935b169d6b04b953885941a74260138197233baf15c20b5b4277131082a9748eada1b416d18d75640f652724c2fffa45f8d
+DIST tribler-swift_6.3.3_i386.deb 3073730 SHA256 17d4b0e5c623a1bdde2c2fb3e5e201d32e5e022ed1f13cee7af5e11e96602982 SHA512 980481e694d1977b81ec5cd5e15f4adb971b87ea20b206c101fd80e045d9a48798d647d3a41d2ae23045805da55934ee77dfcb6f50f42ac1981a4c8ee39d20cb WHIRLPOOL 3917ced229360346482fcef62ec2cba57bb46f641c328d803f1ec8f73d2d6bad38ad84bf7c8d23bb521cd605425b68c90f870f9adf768a0bc6c645279dff682a
+DIST tribler_6.3.3_all.deb 1997346 SHA256 95f6cac8f5760229896bb66ee8e4d6b50939b7da4f1fb0c9a589a7617c456010 SHA512 afea5ef80c8dbc8da003997c8070116adf34334aceab91e258dfdddcfd7375238fc933866c655475ebdf347ac8ef4635716ec4ba1ad6bff6f638e804a4bbbf12 WHIRLPOOL 2b11404be050f81f6a8205edaa3c0c402a14148e5bf4e013ab7a95937f389a1a59b3ad44c1d237b1f431f5ceda5a26c48366bb4b78763ff52165ccf2de11d9d3
+EBUILD tribler-6.3.3-r1.ebuild 1758 SHA256 c3714291b960eefa82efb94264bd3c88fccaf374c09f2ed48cfa9dd5dd884539 SHA512 72a905d5459bb6b91a09b259499118fd0f4ac3d49e7e1a125e2ecdec776ad7e49eb32df235321d4ec200b4321429ee4d2a8ad5fb219df3eaf5f6904bf95e2ed1 WHIRLPOOL f793635ac03a0295e6f6ffaf69640a6e489acd06b3d16182683594110cfd78cece1503f529b0c69609db905429162d2cdfedce121703a9d70e6b60a49b410ca5
+MISC ChangeLog 2863 SHA256 9f71da338642a7f73b29d1982e476591cf7cfde0ed948fbfb9231af34640e991 SHA512 882bd43c4976e02141b4c3b61ad3629f4896ba6df78d22259e1ba3864c796d3f439bfde86390296ba5e248dff79b7e5f6be73f9cc88de72707d310cdef224eb8 WHIRLPOOL 477fd2b166ecfcdd685c07a4ed95a627327e9e25eb761cedcde2bdf7cd2801c2ff2daea5fe3c06fe0170de3da0229dd1099d0323ce031c47c8c892587d795a35
+MISC ChangeLog-2015 8406 SHA256 3ca88b54582881682089ccb1e22cbe950596fc18ac21aed5b25972eca82036d7 SHA512 0ca521b4c9c5696bf97bed2075bce68e5baeb9ba9c333546903360108bbe8b3b73a0382135a1d7730d74782ddb447da0e98dca1fd72e601414d844e6ad115912 WHIRLPOOL 61a2c3385414b79cc0d5040c04bd7936a7b12a8d422deff9fd8ef851f2578eb173ed8f32a4fc759ee107e11043e5ce4c2c53243dc4144de5a88d5335301adf3a
+MISC metadata.xml 550 SHA256 4c6f1c73ae58e3856f921b2ac09c77ab3e105b2fb7767ced4db9fbe0e1f78b79 SHA512 32d64b217a4397c60908cb5fd903886c4bffa504e47ec9000ea8b9a0e727a444295cf2cebea7d68814ca1caa14e52de8835d48524808c6a76e87a89f92f5d928 WHIRLPOOL 4c071ca7e7569259fc1a2e78abceb271db7088c32e18e01b4a629947a1c66a9fa25e8acc9f34b0a1db682db5e190f5eba6f8e75610edeb9931481b7cf6cf362f
diff --git a/net-p2p/tribler/files/tribler-6.2.0-fix-desktop.patch b/net-p2p/tribler/files/tribler-6.2.0-fix-desktop.patch
new file mode 100644
index 000000000000..23689bf2fb4d
--- /dev/null
+++ b/net-p2p/tribler/files/tribler-6.2.0-fix-desktop.patch
@@ -0,0 +1,12 @@
+diff -Naur usr.orig/share/applications/tribler.desktop usr/share/applications/tribler.desktop
+--- usr.orig/share/applications/tribler.desktop 2013-05-09 20:47:46.000000000 -0400
++++ usr/share/applications/tribler.desktop 2013-05-09 20:49:03.000000000 -0400
+@@ -5,5 +5,5 @@
+ Icon=tribler
+ Terminal=false
+ Type=Application
+-Categories=Application;Network;P2P
+-MimeType=x-scheme-handler/ppsp;x-scheme-handler/tswift;x-scheme-handler/magnet
+\ No newline at end of file
++Categories=Network;P2P;
++MimeType=x-scheme-handler/ppsp;x-scheme-handler/tswift;x-scheme-handler/magnet;
diff --git a/net-p2p/tribler/files/tribler-log2homedir.patch b/net-p2p/tribler/files/tribler-log2homedir.patch
new file mode 100644
index 000000000000..2f86c95ccf15
--- /dev/null
+++ b/net-p2p/tribler/files/tribler-log2homedir.patch
@@ -0,0 +1,12 @@
+diff -Naur usr.orig/bin/tribler usr/bin/tribler
+--- usr.orig/bin/tribler 2012-02-07 10:33:48.000000000 -0500
++++ usr/bin/tribler 2012-02-11 12:19:05.000000000 -0500
+@@ -6,5 +6,7 @@
+ export PYTHONPATH="$PYTHONPATH":$_TRIBLERPATH
+
+ echo "Starting Tribler..."
++STATEDIR="$HOME/.Tribler"
++[ ! -d $STATEDIR ] && mkdir -p $STATEDIR
+ cd $_TRIBLERPATH
+-exec python -O Tribler/Main/tribler.py "$@" > /tmp/$USER-tribler.log 2>&1
++exec python2 -O Tribler/Main/tribler.py "$@" > $STATEDIR/tribler.log 2>&1
diff --git a/net-p2p/tribler/metadata.xml b/net-p2p/tribler/metadata.xml
new file mode 100644
index 000000000000..295cd2132fa5
--- /dev/null
+++ b/net-p2p/tribler/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <longdescription>
+ Python based bittorrent client that does not require an external
+ website or indexing service to discover content.
+ </longdescription>
+ <use>
+ <flag name="vlc">Enable vlc support.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Tribler/tribler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/tribler/tribler-6.3.3-r1.ebuild b/net-p2p/tribler/tribler-6.3.3-r1.ebuild
new file mode 100644
index 000000000000..930e4c6da40b
--- /dev/null
+++ b/net-p2p/tribler/tribler-6.3.3-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils unpacker
+
+DESCRIPTION="Bittorrent client that does not require a website to discover content"
+HOMEPAGE="http://www.tribler.org/"
+SRC_URI="
+ https://github.com/Tribler/tribler/releases/download/v${PV}/tribler_${PV}_all.deb
+ x86? ( https://github.com/Tribler/tribler/releases/download/v${PV}/tribler-swift_${PV}_i386.deb )
+ amd64? ( https://github.com/Tribler/tribler/releases/download/v${PV}/tribler-swift_${PV}_amd64.deb )"
+
+LICENSE="GPL-2 LGPL-2.1+ PSF-2.4 openssl wxWinLL-3.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="vlc"
+
+RDEPEND="
+ dev-lang/python:2.7[sqlite]
+ dev-python/apsw
+ dev-python/feedparser
+ dev-python/gmpy
+ dev-python/m2crypto
+ dev-python/netifaces
+ dev-python/pyasn1
+ dev-python/pycrypto
+ dev-python/twisted-core
+ dev-python/wxpython
+ dev-libs/openssl:0[-bindist]
+ net-libs/libtorrent-rasterbar[python]
+ vlc? (
+ media-video/vlc
+ media-video/ffmpeg:0
+ )"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib/tribler/swift"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-log2homedir.patch"
+ epatch "${FILESDIR}/${PN}-6.2.0-fix-desktop.patch"
+}
+
+src_compile() { :; }
+
+src_install() {
+ #Remove the licenses scattered throughout
+ rm usr/share/doc/${PN}-swift/copyright # LGPL-2.1+
+ rm usr/share/doc/${PN}/copyright # LGPL-2.1+
+ rm usr/share/${PN}/Tribler/binary-LICENSE-postfix.txt # GPL-2 LGPL-2.1+ PSF-2.4 openssl wxWinLL-3.1
+
+ #Rename the doc dir properly
+ mv usr/share/doc/${PN}-swift usr/share/doc/${PN}
+ mv usr/share/doc/${PN} usr/share/doc/${P}
+
+ #Move the readme to the doc dir
+ mv usr/share/${PN}/Tribler/readme.txt usr/share/doc/${P}
+
+ #Copy the rest over
+ cp -pPR usr/ "${ED}"/
+}
diff --git a/net-p2p/tvrss/Manifest b/net-p2p/tvrss/Manifest
new file mode 100644
index 000000000000..0e838f2a4a37
--- /dev/null
+++ b/net-p2p/tvrss/Manifest
@@ -0,0 +1,5 @@
+DIST tvrss-1.8beta.tar.gz 19753 SHA256 aa2127f2ece5d22a96fb4806f6fa2b5f4a6454d9a95ecf099eb18c9d8706bf41 SHA512 8f1d8de1915c5e0cbfa17aebaca6ae8811a90f40e863f82465fd6bd5e0be9d8c401ead7e010b39195e0e3b3291c86ed94cbcfaf0913b3571ef96c5da519369f2 WHIRLPOOL 0b363213619d26fa022df8591b8f68a04191925a17c15c887339271b741b93366c893307e19f3455834adc586a5bed521dbf04ccd569ed5dfb71288f2341e96d
+EBUILD tvrss-1.8_beta.ebuild 561 SHA256 73476d37dee170425ecfb8e489a20b418a6487162a0c0bfc4b3a15757f7f695b SHA512 b5c75b3a10aea5a3bd89e2142d17e4678a5b1a4bec4f5d58261304b6ba4d0f28198f8a4c75ff38bbbd6e68b3c2812862557a3ffca84eca8feb708490833e2ab4 WHIRLPOOL a1e63fd7974a2f04e6b16408263c4512402ebc13883234e6cf413f7091cfb2ae122793342a40b437f52c73d558a0aa67c2258f7a4b79e90225ddea8768dbc1b2
+MISC ChangeLog 2455 SHA256 32099fda10d040c1a798e7a0b56eb85db6bfdb073fa04b614b47dfe3867019d8 SHA512 208cad7aea606b7dbaf68fc740c884766d9223ddec714f42dc300055e009d25e73103928031d318ceb235f87b5647868dcd44a2cbbdad9031f2a1799f245a65f WHIRLPOOL a64f130a65828d724fb41827ccf55581077ecdf127d152990442e38635807112f4eaabaf4eac33fb06daf8515fd6c0820d75fe12961fcd1af30c3fc4e0d71a86
+MISC ChangeLog-2015 643 SHA256 d9752a2d059b532244341fbdea9d96fc06adddbf31f0632d942ee48516967205 SHA512 8050f45b282f1849b2aa89d0d001e5154c18e012a94fbd080bb3ecfd6dc676c0c99139df03b9277c3e34ff5e27fbc95bcbc71b21f419b061f68051c888ca12e7 WHIRLPOOL cb85220345c6f9c6c997f3c2a39aba9b0c969f0523160d36ae19fa4b19c79832bd4d357bffe0838507f02e21e0fa86e5d7c0d12c42c79ddf8b02caba25ec31df
+MISC metadata.xml 243 SHA256 255d439f9890ea6b4321d77f15463cd2c80fd397f42897aedb32aaf600840183 SHA512 596c7555138f2f3c72d510cdd83fcdc7f95d96e2aa7af2247795e4bd9b7cd1a5b02d4fd32c311354735d221dcec79b9183f8d23730580b650d940fcb4bb23d4f WHIRLPOOL 075b5a6c310d234dfebb6da801a0518aa9ec201bfe466dd53970bd1e905f12c959262e2ccdcbad2aee4c5d8bd56dc4cfb2a4aa3acad416e8b6e45342c305bb2c
diff --git a/net-p2p/tvrss/metadata.xml b/net-p2p/tvrss/metadata.xml
new file mode 100644
index 000000000000..697ebf93b3ee
--- /dev/null
+++ b/net-p2p/tvrss/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">tvtrss</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/tvrss/tvrss-1.8_beta.ebuild b/net-p2p/tvrss/tvrss-1.8_beta.ebuild
new file mode 100644
index 000000000000..dfbd3277784a
--- /dev/null
+++ b/net-p2p/tvrss/tvrss-1.8_beta.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit versionator
+
+MY_P="${PN}-$(replace_version_separator 2 '')"
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="TV RSS is a tool for automating torrent downloads"
+HOMEPAGE="http://tvtrss.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tvtrss/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+DEPEND="x11-libs/gtk+:2
+ >=dev-lang/perl-5.8.6
+ dev-perl/XML-RAI
+ dev-perl/glib-perl
+ dev-perl/Gtk2"
+
+src_install() {
+ dobin ${S}/tvrss
+}
diff --git a/net-p2p/vuze-coreplugins/Manifest b/net-p2p/vuze-coreplugins/Manifest
new file mode 100644
index 000000000000..67ab06368bc9
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/Manifest
@@ -0,0 +1,17 @@
+DIST azplugins_2.1.10.jar 313871 SHA256 70eb19a318f7fc35f9d29a9fb97b2971cf2ddcb0fd1edc7015c4ab7ef6c72cdf SHA512 d61d517537e265cfdef5e48a8ad70afca43e1c53edb91e85e7e54296eab838b82510eb48911d545d27e4e014e6a3f599e4c1535a7c5468e69f89a88b178329c2 WHIRLPOOL 950f22b5aab3e58ec1024a33145fc72dedecbbe191229372f018513df0638d421117c6140426b01509b541a1b412b04916f21e35db7ea50a041f5e9279cbc5b9
+DIST azplugins_2.1.7.jar 318260 SHA256 8ddba56bcb271319c610bd25b0a9beba4a28adb2ba7888b099573970a1c13368 SHA512 e439371e386c515f728813189644ab99f5f2404f03877c2e7d83bc2b5ef3b5dbaba8fc8a15ce84a786b7fca3a370447c81d00905ed8c304df1d1c21b0e0aaa4f WHIRLPOOL 72ba47abf46cf1ad8bbe9279289cb59a96a913c9003fd103ad14b43f4aff7d0fde7c01f3207a4fa971b05ff5601cc9563f87707e35fcda18d95cfcfc8c906eac
+DIST azrating_1.3.1.jar 38172 SHA256 8eedb5c7d731fc1f4bc86b2c7b5df386ed16b9d17a6705eaa2da2ead67546863 SHA512 8a9916b2736b577d29e82be95eddd0b79814f275b52602495c96dbabaff8128b5697d08a30914b714c26f9f738854822994e70c90a92c97bc9381bd1899b38cc WHIRLPOOL 6a97f9158013a89c278f14bafc30d505f9ac2b63bc7b9c0404ff9dc782eb65d79147cf10f007d62f9df0cfe4634f6c959406f814bb5ad35651b84b4977fbf5c1
+DIST azrating_1.5.13.1.jar 111111 SHA256 ab6eb51d028c4e32292871c874e8e26e675e2c518274e94287a26756da6182fb SHA512 a990e41b4b4457f9cd221be7ce1fd0eb740e63135a827e9fe436da72b74cdb4963a360cbdb27b62a30e92d289ef974e97ff18be992e8e11e4a2fa8fb55cbe080 WHIRLPOOL e9c68e88fc0bb91839aa006fb94342f8066c003110d4ed54cfdea8aa5edde7c2cc1279841d6e8924f78545b493405fd7d2ba10c209a5e0ac247e9488912e418a
+DIST azrating_1.5.19.jar 114515 SHA256 28730736f483495a6a7d70cd25732f3f3ac310c0864b1df71a458b1bc5fcd11f SHA512 e75d331e21cb72b0401e62ab6828dc8c76301f84e1b3c8d01e8cbc1a95eda2a7736925212d4e4dc38239d02cddf864bf544a75f3d6d9ce5bb8cdddbc863ee03a WHIRLPOOL 54f3be7b007821ea2352e9c650de5d00ced359ffde5d561e6328037ed973537169bbb3c82bcce40a63a6bf61edf6ee949733bf4f5de4a379407310b32c62eeb8
+DIST azupdater_1.8.17.zip 26023 SHA256 7c5cd591f3f606023aac25c284c57a40b8eb183ccb270b897f7a646c7588bc58 SHA512 21806270d45afe393ace0b5bffb5e6800a45aecb40cc32bef0f2953182a410f0369084a30897bdb4d68beef176f9b59a209fd54df306c68e9b492c8d3d73cb06 WHIRLPOOL d9a798b3255f0f5e19d59119977868171e979a62e16b67da481aa030829f60d231e141dd096a8bc04eebec981ab0ee0197c247496121b814fd4cd96740ae5ba8
+DIST azupdater_1.9.1.zip 26237 SHA256 fbe32eea4a121e27c99a0fd62b36e55d20936731f99a4bb292941e685f753d22 SHA512 a4e961816b9bae4a489b31ce0bd22e3b269fca6ba952eee0c6ae526d8b58a0f3c23975c158aca5cbd877d771b47e41f049eb1bc5331159691d3020f607aa7913 WHIRLPOOL 168fe4eb464d4adfe62c88ce235afa968a1974fa4f6c4984f22c309bd53de08480f356659d2d2cae10ca4a75cda7ce39ebcbcbc8c6b393b813a1b654b775d1cf
+DIST azupdater_1.9.2.zip 26390 SHA256 17ef6b87795fe925cbd8b9b1c66de97091bd025eac870051c10de6d26881d1a7 SHA512 8a1b37d69e6c955f0e507c5455ae198c162f9de2f1713abd6d47bc9f32e65b6afba15152956f98eca101fbf4dbbecaa5b0f84813dcf11e9b7bf33171ce7432cd WHIRLPOOL 00d6f18809041acbc1f5949670ec2cf828443afd1c5809182db3eae825c3d136c75560f47bafec8469e90edbf8aaf8242ffcc28fd48ad36e2b3ca99ba0c6766a
+DIST azupnpav_0.4.6.zip 247837 SHA256 93775a9ed591c92f1c2b3bbfff10f97d5feda8ec06d0615515562b279b04a091 SHA512 eee392cf82aae37b2689ce086fb00727728064552ca31bbf228d3d76407c15f92d30527b979dfc555dbf3a1ead65d991c55d8c517c0f5c93d5a3890b88bfa6b1 WHIRLPOOL ce2af6831e2dfebe30b60faa112208647dfa638fcf06b2035ba27ca8e40da66163ae4ac36e2a7f379aa3e31e1c0a5814b1ae5038f65fdf07ed15013502a51ecf
+DIST azupnpav_0.5.2.zip 263594 SHA256 4eca6ccf23792ff463d2e2a027beebb7de89d4986d6d614051fb9861d7ce082d SHA512 a40dc61e9f8c5f564672ed04acdad852fc3866eb19ae8b09b8f2bc8aef71141352f2476a0cbe39fa6e021d33ddd48feec27f50c5e9762c5ada98522aa3204e7b WHIRLPOOL 5e5d674bb43ba42417447e96cbbd33144e1b3205cd160db6340cf376172a62a2cbbf3861f637da63b940ccd5d58855c185cba922b8dceb930d9ca319f4f7573f
+DIST azupnpav_0.5.6.zip 264588 SHA256 e7dafaf88cc029787727c47e84b1d07deef3e812980f63a84d1c8d6589fb4f65 SHA512 f780e708db51eb4e02ee1dedd445aa72f8a52dc6711d473b93339a2db9492654f93d44cde8456bb7db457b3bca88e15132ce0bc5221247ccb34672ae58bca172 WHIRLPOOL 27ce2362db86931a247db03827a0cd8477515b0b1d7bc44c771e0f99c152827166e3e405e2c439339bc992886b6bb22437b5620c2ce083f0410954f4637ea5dd
+EBUILD vuze-coreplugins-4.8.1.2.ebuild 1978 SHA256 b57785ac9182eda3c334390d4d0c9327a7995c9b102b63c14204f43fd74e532c SHA512 e3190df7d088dc28a7c935249596798f3a519920f3adea77827bffab9755d6b71569a93d27356faaf8abdf7190c646f7b5983d5c23b57abaea589204e86f552d WHIRLPOOL 26ea40c3a93e0b5a8c401e928089c326656c2cbb1809cc999b77f6543a7d9d7fa26e29e6d5575b33a480a44d8c6db371fb3cc584be5e4b4d2e6aa7ee819cfa4d
+EBUILD vuze-coreplugins-5.6.0.0.ebuild 1473 SHA256 85aacd8d3c31987427413b02547bec18592203c42a597efa52281e64d2cfcbbb SHA512 53fdbad3cd243c2609db5f719d5285c8d8d2035d1cd9bfae37acfca8e9e92f4898be1751fc28f86faad17ec2610a9518dcffbe0ca8451148be666caa179e1b8f WHIRLPOOL 908c4e5b161c6108c6a335afe05ea6ea1b561ce9d0e7bf8eefe38182c82cd078cb36ad6a54ade480c8f7de3f473fc787b63e05a31c25946b4938f5bf4eb70caa
+EBUILD vuze-coreplugins-5.7.2.0.ebuild 1473 SHA256 71b6b45a9393c39fb1f600a93ecb6dbc1330d3960442d5c0afbf31db780878c3 SHA512 b78e9456858625da582313277a04f0c92cf426df8538f3a70deed1fcf340ce99b99d6a11f37a7f6248f15923b46a8ec2b8cb5e9e664307ac0cc4e471f9129a4a WHIRLPOOL b4d8f0cd7f22fb7b4b20646c3f3b6e0cb7d4c186761cf3af78ec09204d65f6df4190a1b3be2884066f0daafb866f03c84445baa5ec71b2db93129ddf0af8e7c1
+MISC ChangeLog 3740 SHA256 9de144f259c8084217f65013d7db7395c5d779b00151359ea6ee139837155df3 SHA512 5f4db4a13658ea4be6d8ea54d30b26ae614d5cb1c4c04d120bb272099f503b97253b7204a9db48f97fac7dab8c88649d28f6fa4987b1c6b0b3b82b3c8a847650 WHIRLPOOL 42c2a8a555b92c5a134cea3382114c354d7e6e373d4518c1672723a651b7b089d7b0b927ca1f6de4ed80ce701d521194ba46053ef4f64d8952de5c3fcb0ea54c
+MISC ChangeLog-2015 7668 SHA256 3c081e71e4b30aa01f56ed2cc14516378fb1d6613b1f072a91f37253e16bf4f2 SHA512 07dc492a2992fa834e5fd78f0826014f1a729f7a8eda47847a9fdf9d0d72ccca268c510714e2839d69bcfd98d64824812ed007bef792b30376d726f8f6dea3fc WHIRLPOOL e961b41b850c9364d77dd438c9d47405598170e45a94ed017e7e8669e6f5a487b452a1e5aee69cbc2c1ede667ccbe757c87ad8c5d0b84fd2767177ab40cc185f
+MISC metadata.xml 415 SHA256 6bdb66372614c29f3fbe9021880a2e2c1f1f90c51fbb65ff626c53e001d56dc0 SHA512 d81c0a6171fcd95b06d63b6d6680a22451326ecff7e4a82e8d581cc2da95663bc35b9f2a4e56c0d10aa915e5f1ee238f5b2bc33ee06944ef1250def695367c7d WHIRLPOOL 364ed65692e2a93b635318f225f80ed85454977aca6c89d31d742012eccd4700628e5bcb48d2a2664f0845b45f4c29caa962c9f47d9e3da1ee45e2721b08fede
diff --git a/net-p2p/vuze-coreplugins/metadata.xml b/net-p2p/vuze-coreplugins/metadata.xml
new file mode 100644
index 000000000000..5bde23a45a6b
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">azureus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild b/net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild
new file mode 100644
index 000000000000..d1859913ad00
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# eventually this should be built from source...
+
+EAPI=5
+
+# don't forget to update these when bumping the version
+PLUGINS_V=2.1.7 # http://www.vuze.com/plugins/details/azplugins
+RATING_V=1.3.1 # http://www.vuze.com/plugins/details/azrating
+UPDATER_V=1.8.17 # http://www.vuze.com/plugins/details/azupdater
+UPNPAV_V=0.4.6 # http://www.vuze.com/plugins/details/azupnpav
+
+PLUGINS_DIST=azplugins_${PLUGINS_V}.jar
+RATING_DIST=azrating_${RATING_V}.jar
+UPDATER_DIST=azupdater_${UPDATER_V}.zip
+UPNPAV_DIST=azupnpav_${UPNPAV_V}.zip
+
+ALLPLUGINS_URL="http://azureus.sourceforge.net/plugins"
+
+DESCRIPTION="Core plugins for Vuze that are included in upstream distribution"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="
+ ${ALLPLUGINS_URL}/${PLUGINS_DIST}
+ ${ALLPLUGINS_URL}/${RATING_DIST}
+ ${ALLPLUGINS_URL}/${UPDATER_DIST}
+ ${ALLPLUGINS_URL}/${UPNPAV_DIST}"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE=""
+
+RDEPEND="~net-p2p/vuze-${PV}"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p plugins/{azplugins,azrating,azupdater,azupnpav} || die
+ cp "${DISTDIR}"/${PLUGINS_DIST} plugins/azplugins || die
+ cp "${DISTDIR}"/${RATING_DIST} plugins/azrating || die
+ cd "${WORKDIR}"/plugins/azupdater && unpack ${UPDATER_DIST} || die
+ cd "${WORKDIR}"/plugins/azupnpav && unpack ${UPNPAV_DIST} || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ insinto /usr/share/vuze/
+ doins -r "${WORKDIR}/plugins"
+}
+
+pkg_postinst() {
+ elog "Since version 4.0.0.2, plugins that are normally bundled by upstream"
+ elog "(and auto-installed in each user's ~/.azureus if not bundled)"
+ elog "are now installed into shared plugin directory by the ebuild."
+ elog "Vuze may warn that shared plugin dir is not writable, that's fine."
+ elog "Users are recommended to delete the following plugin copies:"
+ elog "~/.azureus/plugins/{azplugins,azrating,azupdater,azupnpav}"
+}
diff --git a/net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild
new file mode 100644
index 000000000000..5463200ed189
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+# update these when bumping the version
+PLUGINS_V=2.1.10 # http://www.vuze.com/plugins/details/azplugins
+RATING_V=1.5.13.1 # http://www.vuze.com/plugins/details/azrating
+UPDATER_V=1.9.1 # http://www.vuze.com/plugins/details/azupdater
+UPNPAV_V=0.5.2 # http://www.vuze.com/plugins/details/azupnpav
+
+PLUGINS_DIST=azplugins_${PLUGINS_V}.jar
+RATING_DIST=azrating_${RATING_V}.jar
+UPDATER_DIST=azupdater_${UPDATER_V}.zip
+UPNPAV_DIST=azupnpav_${UPNPAV_V}.zip
+
+ALLPLUGINS_URL="http://azureus.sourceforge.net/plugins"
+
+DESCRIPTION="Core plugins for Vuze that are included in upstream distribution"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="
+ ${ALLPLUGINS_URL}/${PLUGINS_DIST}
+ ${ALLPLUGINS_URL}/${RATING_DIST}
+ ${ALLPLUGINS_URL}/${UPDATER_DIST}
+ ${ALLPLUGINS_URL}/${UPNPAV_DIST}"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="~net-p2p/vuze-${PV}"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p plugins/{azplugins,azrating,azupdater,azupnpav} || die
+ cp "${DISTDIR}"/${PLUGINS_DIST} plugins/azplugins || die
+ cp "${DISTDIR}"/${RATING_DIST} plugins/azrating || die
+ cd "${WORKDIR}"/plugins/azupdater && unpack ${UPDATER_DIST} || die
+ cd "${WORKDIR}"/plugins/azupnpav && unpack ${UPNPAV_DIST} || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ insinto /usr/share/vuze/
+ doins -r "${WORKDIR}/plugins"
+}
diff --git a/net-p2p/vuze-coreplugins/vuze-coreplugins-5.7.2.0.ebuild b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.7.2.0.ebuild
new file mode 100644
index 000000000000..c31a7da4913c
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.7.2.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+# update these when bumping the version
+PLUGINS_V=2.1.10 # http://www.vuze.com/plugins/details/azplugins
+RATING_V=1.5.19 # http://www.vuze.com/plugins/details/azrating
+UPDATER_V=1.9.2 # http://www.vuze.com/plugins/details/azupdater
+UPNPAV_V=0.5.6 # http://www.vuze.com/plugins/details/azupnpav
+
+PLUGINS_DIST=azplugins_${PLUGINS_V}.jar
+RATING_DIST=azrating_${RATING_V}.jar
+UPDATER_DIST=azupdater_${UPDATER_V}.zip
+UPNPAV_DIST=azupnpav_${UPNPAV_V}.zip
+
+ALLPLUGINS_URL="http://azureus.sourceforge.net/plugins"
+
+DESCRIPTION="Core plugins for Vuze that are included in upstream distribution"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="
+ ${ALLPLUGINS_URL}/${PLUGINS_DIST}
+ ${ALLPLUGINS_URL}/${RATING_DIST}
+ ${ALLPLUGINS_URL}/${UPDATER_DIST}
+ ${ALLPLUGINS_URL}/${UPNPAV_DIST}"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+RDEPEND="~net-p2p/vuze-${PV}"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ mkdir -p plugins/{azplugins,azrating,azupdater,azupnpav} || die
+ cp "${DISTDIR}"/${PLUGINS_DIST} plugins/azplugins || die
+ cp "${DISTDIR}"/${RATING_DIST} plugins/azrating || die
+ cd "${WORKDIR}"/plugins/azupdater && unpack ${UPDATER_DIST} || die
+ cd "${WORKDIR}"/plugins/azupnpav && unpack ${UPNPAV_DIST} || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ insinto /usr/share/vuze/
+ doins -r "${WORKDIR}/plugins"
+}
diff --git a/net-p2p/vuze/Manifest b/net-p2p/vuze/Manifest
new file mode 100644
index 000000000000..25a101828078
--- /dev/null
+++ b/net-p2p/vuze/Manifest
@@ -0,0 +1,23 @@
+AUX build.xml 2275 SHA256 9fb2a2f672a8a8aaede04b178c8c593132cc12bd8fcd6f3eee0421037411b542 SHA512 bdec7c10548ed2fda57235d14f0ae67e00e548a84b88855b5b683c947015b52bcf7011fb5952b4225370db54541614c0402fe6c77e723d310358a502837b40a3 WHIRLPOOL 67c11cd6d36178a68c784632e9bba040d0cf3d55b67f409fdb97af8f1d874d5b71099ed6671067170336894d46837041203eff35152916fb6e8c8e518043c97f
+AUX vuze-4.1.0.0-pre 1850 SHA256 aae3963e55330eb292176052a2cd72b8a9c322fd63fb71bb0fe6456df7d329e5 SHA512 04c5a77bff69e50963f3122c46f549dec78e462bfa0697b32ffe8630d22612a64f1adc52bc8d7d8868d972c4bdac3082a1e9b513459d9f97915ad87d05ab2b4a WHIRLPOOL 8d20a2850dc9724f3e02bc69158faaee931035fd98d7c902c6973e7197db17908e6bc67deeb516bba1fd4b4ff8defc4ca67beb8b11a6305fa09e8296d06f9c19
+AUX vuze-5.3.0.0-disable-osx.patch 1841 SHA256 8d37e1090e938d91fc539d043f0b82dd9106dfd38c6c621824f6041d7137cee3 SHA512 f5c60b188eb5e4c48dfd73c9de03c4eb0884dfb36f147d6ef4be6d2e26602d7de6f80de4be4a64d94c1d9ad9cdbbd928b1cd4e00f09c57e8eb72d7d0f623e1c7 WHIRLPOOL b931704e6cad2f2f03b67bd00bab31243fe73055416da575782e8fe642705f0ed97a3707dcf1fadfbda412b11835f900bf6d4fd443ff5aeb5b327bf6d95290fc
+AUX vuze-5.3.0.0-disable-shared-plugins.patch 1069 SHA256 248f5a570e6099def1d155c2aab1dff4c2aa1fea81fac8f53a1da4900b9b360f SHA512 ee9e6513b2dd1d4e986f4c57fd5ace3593f98f7eaeb5e454fc7b5fb3c6876b86b85b511981c951ead96b1a106abb18a2e01047b2063d55c98300ed6356c0460b WHIRLPOOL 9ef8f3e640f8d7d5b62dcbb14013eb6193b42d0b884b1189124350d9678dcc748971d3260808b1939dbc2e2204f3d58526fc87f25df4d8f1946e5c40cbf75d8d
+AUX vuze-5.3.0.0-disable-updaters.patch 1726 SHA256 fac23c094c3ab83cbcb89ce77d5123737729817f53d60ecefd7498df6f0e2bde SHA512 743d48eeeac4534fc66463c0989a88d97117d988227b6cce77abdaa97c9cb9813aa1228f81a607af09e07fdf95ce02a3981f7f083fba0d9875d0951b8bbf29a3 WHIRLPOOL 2a4a78694043d651c5c072dd43607809cad0e528ab5741a4ddf2cf440a0649f1394c08420e35359b271567c7e933a4d1792c92224a64eeadb26778cbc33f49d2
+AUX vuze-5.3.0.0-java5.patch 618 SHA256 58f30c1c20ae73048b222dbbfa169f2f200dc11be735f099cf375f06b0a1abce SHA512 0ecddf69a7fdd72860262cc73dd4a0852ba8e31d73dfc7ad1d96ad18eaa41ec23ca977207d6bff32e183d95c1a6918909ef3cab697d0c9d754345613544eb90c WHIRLPOOL 77bb1707d77605822c904e35c7fa40f5f2c29a04340cadb203631c4a0ba6cda3898f53beea105ea4d2614eda40d3374903f7ccd88ba69375e73b905a705c659c
+AUX vuze-5.3.0.0-remove-classpath.patch 545 SHA256 9bf7ebca70dc2eee23f8747295abfab1d68cdb11311de3e83add4557cfa1a4d5 SHA512 867e932eab1f33af6a8320cbe1f1cf565b68f39c6e1c0188dada018de4b50823047a7e9a53d558c00fe2253c48e4e6276e7725681b33a115de694c43265cf42c WHIRLPOOL 28f0912f002b481f9ab4dac182cf201518c727193438e88e3c04fc8200fa50b4edf6a6a5ccb7375cbb655827689132aec6a7f1b2e845eac933ddf03785f1b175
+AUX vuze-5.3.0.0-unbundle-commons.patch 4741 SHA256 b7aea040bd7b307ac19b1937bf46691cfd37c73721fa459d4ca6a40f13645fcd SHA512 b6ea60f966e5c5d5c1118bf4d479175eb890c231c5c7324a7216b7791882217803d06de4780f63818aac34bd95172a211bbbe559843e9a89cc511fac29bc307d WHIRLPOOL b4ea72019bf4528b73cd21bdcbab584ead025ccbf1dc11857e4c7d6175c13fe8e68af2d68034b9e0718b56f14910f0804db52ba60f8e84981bdd354369c008a1
+AUX vuze-5.3.0.0-unbundle-json.patch 1322 SHA256 61c0df3a1ecbfdec9845a3e4789030e014a700138caaa761dd430f45936dd91f SHA512 60b8dc8216f5f51a4cb6c6b793d1b31b686f63d03e373741d76856a594468fa5c97781fc99fc9af30f2db8173bb86414cd52cb30ea7ebeac5a018633f661ce26 WHIRLPOOL 52d5da03ee31316d0a6c4ebc2d3e4d59ee88ca228d74345171ef90909f25bcaafeb36594cec16f427bf32524a0c4da7b0726313dcfc856690eca61d9f4bb2c23
+AUX vuze-5.6.0.0-commons-lang-entities.patch 2085 SHA256 52515b513089e549d488d84b2c88f160735d9b7ef75da1e998df8f616e3fe9f6 SHA512 a08d23a1947ad668048f49c8137d4494da662d65f5cf98acd5e44656f7d6a2bf691eebba4fd8033996594d1c4edc1a2eec3ce3f92d23b1818c03b405fc081899 WHIRLPOOL a6447983dc9e7ff0e26ced10f5298b6ee1996549643c67aa693e7eff58b77a9708574066823ed0110d08603fa12eaa017fdb43738166007f49f75f116c3a6788
+AUX vuze-5.6.0.0-invalid-characters.patch 1121 SHA256 8f00bc2477c01853a352b6afc1e186dacb97161c3d9d199205e2d68e3bef6a2a SHA512 718c64a892aa860455db4c23f97d403c77bbba0fd1ecf957761f7c7dfcb9c8b42ed75b1f3e706f3d67335ed38599fbc6f9e2731941bdf819d956e830a8227344 WHIRLPOOL 9b432134579a88c5bdac0942ec019172583f2292453e09d3584e73079e9601992b08672e6e5d2d989fa11562d74bc569143309ead78a26dcf8f9eff6f51762b5
+AUX vuze-5.7.2.0-disable-osx.patch 2278 SHA256 5a4fe3b0b13aad279efb5b892f1989da7e9caba356e11fe9399c1ffd192174f7 SHA512 39797193297d61c1e91bfdcbf6e4fa6acb523c067ac96a0de99d5f79fab69b327688f87f8c8f24c0d7967c4c1017bde478ecc10aa117f96f0b891dc10a21420a WHIRLPOOL b060eb315ba6c3d27591294bea964737a87c36630902311d8d032292cc1b0731a0c7a8be0351212ee650f93684da2c9e08b5cb49def01c5cb761b34eb66b22f7
+AUX vuze.desktop 164 SHA256 4fbc293d66810bcd4eec210d00d5ea97f5e49acdd10197a52e361ed11b8718ed SHA512 4d68ed3af2c983435d1014ea1281076fd5d1171b23ebbe7cc8d7e6c45b39b036e7f4660fce81481ba3b7bddd29c8255ce22bbb79230f77c6ecfdecb24736d480 WHIRLPOOL 822e059e377141864f465d4de7915651a609ef69c8d67eedc85bd1c60a2b605882cad0c63b592329b369e34f8877e1c36bc344f414be20818bccf39d1f88ec25
+DIST Vuze_4812_source.zip 9530217 SHA256 8ad02ae61ac1c515cb3226b95b34d4fe036faa64e725b64fdcb5ef7d1cb9633d SHA512 7007c91f829c57d0f08b9da4ea3fcc8820efe14aeec7286cf764e5ac2d7d165f3a14abc6b0e92a617e21b45803f7c121fb00ddd8c5e8d9664509eb3337fc65bf WHIRLPOOL bc8823e053fa2f86161234c77f4873f2035a111361d60ee8c75937710774defec577651a10acf909bb170e600dc2775a5dbe2cf626649729e86f4a04e02a46d9
+DIST Vuze_5600_source.zip 10398501 SHA256 1aa6148311969ce6c51333b7ef51bcc8713e222fa5d14b2448e97aebbd25ea5e SHA512 dfe557cb1f50be935c78ee4431bc14db5f0107eebab8545cf925de8b0d48bb91ca77f7feab54a5fd91aaaf50bd3c68c1519cf49c2eb4d145ff7794bf9f22cfd7 WHIRLPOOL 62b637b5fc8145c31bdfb0ca2f63bdd9ee9c70d3afde3cb693ede66c0ab6db593f412ab124ac1230f1bbf33ff9ce635e29a0cea7556f013fcb7144aacb98c0d0
+DIST Vuze_5720_source.zip 10709515 SHA256 fcad8bc3df5e5d844eb7a8e0f24d199b37cfc831b2c50698e12ce9e5a9db1045 SHA512 073af0c68219884aaf1b860fcc04cf75edaf662f1e82fe6c49f615b928b00d1a50d25f348c6bf5a922fa1c5a53c7bce5f75b7a0c065602675bcb6d80c1c92edf WHIRLPOOL a45cdfba1a42bfdb4cf36a493b1522865b465e37ec8d0921a63d2e449f1d25f1dfd3d96857b29b45f68eb6d36bf4f25767eb13426bf944711411259a8af3ea78
+DIST vuze-4.5.0.2-gentoo-patches.tar.bz2 3143 SHA256 972cf16d88d8605f93b77a84770b6512d54ae8281a0d4c06b66890a69deb6c49 SHA512 aacaeb404d9b7dbb40d89b04f9ad26caf447202b1fcb63d532f5e01dc611152adbc38804563f1a35227a080b2eadec0e2e42d0baa163d1d5489eec65cd28f83d WHIRLPOOL a7dd533676c428a00caddc2d4d4c008feec1a1201bb9aef7b7ed9c25d41405344d89bc9f70d442f043beb7aaf6db7d73582cc46edfa3665d599b2635e51b1ee7
+EBUILD vuze-4.8.1.2-r1.ebuild 4273 SHA256 73cc2fb3fdabb4c4c42475fb09cc986ed253af538cb140956a57e6f0ec32a179 SHA512 c27b01e4d5ec5751d5af4d62170572a43744fa04d934bf820c7a53d84735adda38967bfcc525521ec6e2dd2ab9f0d4de346ce7099b8f64ebafd0ddf0cc44c8c1 WHIRLPOOL fd66bdd605a188e8219af53930a552284de7f3c550417ea1319f64aac8f55cee0f532357bd47a886286d52c95f78d2430bb2dd4718a6aa69524a1bf04a9c2dbd
+EBUILD vuze-5.6.0.0.ebuild 4407 SHA256 a6dbbf54e70204adc355fcc1725f70ee19fc4164ab9cf7314b5a0c75dbfd559f SHA512 a94743bace7557aec51eec202edc89fc828924e790b5591494ca73f10ced30c2378f36bb4d512d49e6c0f34e17bad295ce8a5777b9219a9e819e50c49fce6b5d WHIRLPOOL b00c7a831f57ce555bfa0cf1b844e92449cfd7919cbe2ffa57c9d7f74634a94495d57a98901f65b7712fabc00450de955a115b7a4f4ea6ccc9b14e199f332fb0
+EBUILD vuze-5.7.2.0.ebuild 4407 SHA256 dd6ef35fbd156a07d3c633401f9e4e5f994f4bcdf5e1d59daec0f4cb8b58d6f4 SHA512 2015dda515c61e65b554dd1d7ad1b56773bc717e3e927e937d04b4ef6bf37c7e48a6ea267c9647e8044093d555a3649467c25003562bc670f3a96aa0d416dd53 WHIRLPOOL 815de654a18846c22807763d08709804c8626f78e8baeaa3eb110879b35f1ed645d9b4981bc26fc6e22b72e6d2d83f5ad35ac50df121e106ab3a89f8ed7a0019
+MISC ChangeLog 3722 SHA256 5caf30bbcb7a4edf720094a64efcdee387f67442857797320fe130080d7a326e SHA512 3f25643d1c793b51644c5808bb388ddef83d758b3d1d61bb6aac23b186d9b239d628ddbe835f244b742d11ffa540fae6b296211000b1d45a5ec8bec8110ba29b WHIRLPOOL 66ffc2428b9fab57e789ae5f96e6a6c16b1b4f1a7d0698de34ef84ec476a00816d43e0525fd0073c29e30d1483dbd2265e729a928a54cb3b145c89f36c8a885a
+MISC ChangeLog-2015 29159 SHA256 0c312ebb96a3d990c803a6b84566a2998e160a67deaa6115e03a8166dd9e963d SHA512 88e5b4e5b2edda237f984bd80a4f54481e992f1714ec24d1bd69be66d7ff49acd208d900d56a06bfbe0c582df7ebb3d11862f1b70000ec069a4e7fd6cb78fc92 WHIRLPOOL 7c48e8931750abb8fcb7a52c0762fa23363341b498b86713c65d5dc099e612b761e6be64429ab60853a627de3892b6e6e1e3844f66de2ea5d60a1db9973f5b2b
+MISC metadata.xml 415 SHA256 6bdb66372614c29f3fbe9021880a2e2c1f1f90c51fbb65ff626c53e001d56dc0 SHA512 d81c0a6171fcd95b06d63b6d6680a22451326ecff7e4a82e8d581cc2da95663bc35b9f2a4e56c0d10aa915e5f1ee238f5b2bc33ee06944ef1250def695367c7d WHIRLPOOL 364ed65692e2a93b635318f225f80ed85454977aca6c89d31d742012eccd4700628e5bcb48d2a2664f0845b45f4c29caa962c9f47d9e3da1ee45e2721b08fede
diff --git a/net-p2p/vuze/files/build.xml b/net-p2p/vuze/files/build.xml
new file mode 100644
index 000000000000..7b060c14b2f2
--- /dev/null
+++ b/net-p2p/vuze/files/build.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<!--
+
+NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compile this project successfully.
+
+-->
+
+
+<project default="jar" name="Azureus" basedir=".">
+
+ <property name="root.dir" value="." /> <!-- REMINDER: this needs to be "." for public source -->
+ <property name="libs.dir" value="build/libs" />
+ <property name="dist.dir" value="dist" />
+
+ <property name="generic.excludes" value="**/*.jar **/*.txt **/*.jardesc **/.classpath **/.project **/aereg.lib **/aereg.dll" />
+ <property name="dist.jar.excludes" value="${generic.excludes} **/*.java " />
+ <!-- <property name="dist.source.excludes" value="${generic.excludes} **/*.class" /> -->
+
+
+ <target name="init" >
+ <echo message="Building Azureus2.jar..." />
+
+ <tstamp/>
+
+ <!-- <condition property="libs.dir" value="build/libs">
+ <not> <isset property="libs.dir" /> </not>
+ </condition> -->
+
+ <mkdir dir="${root.dir}/${dist.dir}" />
+ </target>
+
+
+ <target name="compile" depends="init" >
+ <path id="libs.classpath">
+ <fileset dir="${root.dir}/${libs.dir}" includes="**/*.jar" />
+ </path>
+
+ <javac srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" source="1.4" target="1.4" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" >
+ <classpath refid="libs.classpath" />
+ </javac>
+ </target>
+
+
+ <target name="jar" depends="compile" >
+ <jar destfile="${root.dir}/${dist.dir}/Azureus2.jar" basedir="${root.dir}" excludes="${dist.jar.excludes}" >
+ <manifest>
+ <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" />
+ <attribute name="Class-Path" value="Azureus2.jar apple-extensions.jar commons-cli.jar log4j.jar swt.jar swt-win32.jar swt-osx.jar" />
+ </manifest>
+ </jar>
+
+ <!-- <zip destfile="${dist.dir}/Azureus2_source.zip" basedir="." excludes="${dist.source.excludes}" /> -->
+
+ </target>
+
+
+ <target name="clean" >
+ <delete quiet="true" >
+ <fileset dir="${root.dir}/com" includes="**/*.class"/>
+ <fileset dir="${root.dir}/org" includes="**/*.class"/>
+ </delete>
+
+ <delete dir="${root.dir}/${dist.dir}" />
+ </target>
+
+</project>
+
diff --git a/net-p2p/vuze/files/vuze-4.1.0.0-pre b/net-p2p/vuze/files/vuze-4.1.0.0-pre
new file mode 100644
index 000000000000..505a7e704df3
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-4.1.0.0-pre
@@ -0,0 +1,75 @@
+#
+# Copyright (c) 2005, Petteri Räty <betelgeuse@gentoo.org>
+# Copyright (c) 2004, Jochen Maes <sejo@gentoo.org>
+# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
+# Copyright (c) 2004, Gentoo Foundation
+#
+# Licensed under the GNU General Public License, v2
+
+# The Azureus config dir has moved
+olddotazudir="${HOME}/.Azureus"
+oldgentoocfg="${olddotazudir}/gentoo.config"
+dotazudir="${HOME}/.azureus"
+gentoocfg="${dotazudir}/gentoo.config"
+
+if [[ -f "${oldgentoocfg}" && -f "${gentoocfg}" ]]; then
+ cat > /dev/stderr <<END
+You have gentoo.config files in both
+${dotazudir} and
+${olddotazudir}
+${olddotazudir} is deprecated and you can delete this directory.
+
+END
+fi
+
+create_initial_config() {
+ if [[ ! -e "${dotazudir}" ]] ; then
+ mkdir "${dotazudir}"
+ echo "Creating ${dotazudir}"
+ fi
+
+ [[ ${UI} ]] && UI="swt"
+
+ echo "Creating ${gentoocfg}"
+
+ # Create the config file
+ cat > "${gentoocfg}" <<END
+# User Interface options:
+# console - console based
+# swt - swt (GUI) based
+UI="${UI}"
+
+# Options you want to pass to the java binary
+JAVA_OPTIONS=""
+END
+}
+
+if [[ -f "${gentoocfg}" ]] ; then
+ . "${gentoocfg}"
+ echo "using ${gentoocfg}"
+elif [[ -f "${oldgentoocfg}" ]]; then
+ . "${oldgentoocfg}"
+ echo "using ${oldgentoocfg}"
+else
+ create_initial_config
+fi
+
+if [[ -z "${UI}" && -n "${UI_OPTIONS}" ]]; then
+ echo '${UI_OPTIONS} is no longer supported. ${UI} should be used instead instead' > /dev/stderr
+ echo 'Unsetting ${UI_OPTIONS} and trying to migrate to ${UI}' > /dev/stderr
+ if [[ ${UI_OPTIONS} = *--ui=console* ]]; then
+ UI=console
+ elif [[ ${UI_OPTIONS} = *--ui=swt* ]]; then
+ UI=swt
+ else
+ echo 'Could not make $UI from $UI_OPTIONS' > /dev/stderr
+ fi
+ unset UI_OPTIONS
+fi
+
+if [[ -z "${UI}" ]]; then
+ echo '$UI not set defaulting to swt' > /dev/stderr
+ UI="swt"
+fi
+
+[[ ! -e "${dotazudir}" ]] && create_initial_config
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch
new file mode 100644
index 000000000000..070dae2d7562
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch
@@ -0,0 +1,60 @@
+--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
++++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
+@@ -229,57 +229,6 @@ public class SWTThread {
+ }
+ });
+
+- if (Constants.isOSX) {
+-
+- // On Cocoa, we get a Close trigger on display. Need to check if all
+- // platforms send this.
+- display.addListener(SWT.Close, new Listener() {
+- public void handleEvent(Event event) {
+- event.doit = UIFunctionsManager.getUIFunctions().dispose(false, false);
+- }
+- });
+-
+- String platform = SWT.getPlatform();
+- // use reflection here so we decouple generic SWT from OSX specific stuff to an extent
+-
+- if (platform.equals("carbon")) {
+- try {
+-
+- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CarbonUIEnhancer");
+-
+- Constructor<?> constructor = ehancerClass.getConstructor(new Class[] {});
+-
+- constructor.newInstance(new Object[] {});
+-
+- } catch (Throwable e) {
+-
+- Debug.printStackTrace(e);
+- }
+- } else if (platform.equals("cocoa")) {
+- try {
+-
+- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer");
+-
+- Method mGetInstance = ehancerClass.getMethod("getInstance", new Class[0]);
+- Object claObj = mGetInstance.invoke(null, new Object[0] );
+-
+- Method mHookAppMenu = claObj.getClass().getMethod("hookApplicationMenu", new Class[] {});
+- if (mHookAppMenu != null) {
+- mHookAppMenu.invoke(claObj, new Object[0]);
+- }
+-
+- Method mHookDocOpen = claObj.getClass().getMethod("hookDocumentOpen", new Class[] {});
+- if (mHookDocOpen != null) {
+- mHookDocOpen.invoke(claObj, new Object[0]);
+- }
+-
+- } catch (Throwable e) {
+-
+- Debug.printStackTrace(e);
+- }
+- }
+- }
+-
+ if (app != null) {
+ app.runInSWTThread();
+ runner = new Thread(new AERunnable() {
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch
new file mode 100644
index 000000000000..b459c8b38308
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch
@@ -0,0 +1,33 @@
+Disallow users to install into the shared plugin directory,
+which they won't have write access to. This doesn't disable
+shared plugins, just removes the installation UI.
+
+
+--- a/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java
++++ b/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java
+@@ -234,13 +234,13 @@ public class IPWListPanel extends AbstractWizardPanel<InstallPluginWizard> {
+ }
+
+ public boolean
+- isNextEnabled()
++ isFinishEnabled()
+ {
+ return(((InstallPluginWizard)wizard).getPluginList().size() > 0 );
+ }
+
+- public IWizardPanel<InstallPluginWizard> getNextPanel() {
+- return new IPWInstallModePanel(wizard,this);
++ public IWizardPanel<InstallPluginWizard> getFinishPanel() {
++ return new IPWFinishPanel(wizard,this);
+ }
+
+ public void updateList() {
+@@ -252,7 +252,7 @@ public class IPWListPanel extends AbstractWizardPanel<InstallPluginWizard> {
+ }
+ }
+ wizard.setPluginList( list );
+- wizard.setNextEnabled( isNextEnabled() );
++ wizard.setFinishEnabled( isFinishEnabled() );
+
+ }
+ }
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch
new file mode 100644
index 000000000000..1bf78cf1009d
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch
@@ -0,0 +1,45 @@
+--- a/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java
++++ b/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java
+@@ -130,18 +130,6 @@ PluginInitializer
+ "Magnet URI Handler",
+ "true",
+ "false"},
+- { PluginManagerDefaults.PID_CORE_UPDATE_CHECKER,
+- "org.gudy.azureus2.update.CoreUpdateChecker",
+- "azbpcoreupdater",
+- "CoreUpdater",
+- "true",
+- "true"},
+- { PluginManagerDefaults.PID_CORE_PATCH_CHECKER,
+- "org.gudy.azureus2.update.CorePatchChecker",
+- "azbpcorepatcher",
+- "CorePatcher",
+- "true",
+- "true"},
+ { PluginManagerDefaults.PID_PLATFORM_CHECKER,
+ "org.gudy.azureus2.platform.PlatformManagerPluginDelegate",
+ "azplatform2",
+--- a/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
++++ b/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java
+@@ -562,6 +562,10 @@ PluginUpdatePlugin
+ }
+ }
+
++ if ( pi.getPluginState().isShared()) {
++ continue;
++ }
++
+ String mand = pi.getPluginProperties().getProperty( "plugin.mandatory");
+
+ boolean pi_mandatory = mand != null && mand.trim().toLowerCase().equals("true");
+--- a/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java
++++ b/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java
+@@ -64,7 +64,7 @@ public class SWTUpdateChecker implements UpdatableComponent
+ public static void
+ initialize()
+ {
+- PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new SWTUpdateChecker(),true);
++// PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new SWTUpdateChecker(),true);
+ }
+
+ public SWTUpdateChecker() {
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch b/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch
new file mode 100644
index 000000000000..b6d2a59c43a2
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch
@@ -0,0 +1,11 @@
+--- a/build.xml
++++ b/build.xml
+@@ -36,7 +36,7 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compil
+ <fileset dir="${root.dir}/${libs.dir}" includes="**/*.jar" />
+ </path>
+
+- <javac srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" source="1.4" target="1.4" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" >
++ <javac encoding="8859_1" srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" >
+ <classpath refid="libs.classpath" />
+ </javac>
+ </target>
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch b/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch
new file mode 100644
index 000000000000..290b902203a8
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch
@@ -0,0 +1,10 @@
+--- a/build.xml
++++ b/build.xml
+@@ -46,7 +46,6 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compil
+ <jar destfile="${root.dir}/${dist.dir}/Azureus2.jar" basedir="${root.dir}" excludes="${dist.jar.excludes}" >
+ <manifest>
+ <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" />
+- <attribute name="Class-Path" value="Azureus2.jar apple-extensions.jar commons-cli.jar log4j.jar swt.jar swt-win32.jar swt-osx.jar" />
+ </manifest>
+ </jar>
+
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch
new file mode 100644
index 000000000000..deed0af9c7b2
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch
@@ -0,0 +1,110 @@
+--- a/com/aelitis/azureus/core/metasearch/Result.java
++++ b/com/aelitis/azureus/core/metasearch/Result.java
+@@ -27,7 +27,7 @@ import java.util.Locale;
+ import java.util.Map;
+ import java.util.Random;
+
+-import org.apache.commons.lang.Entities;
++import org.apache.commons.lang.StringEscapeUtils;
+ import org.gudy.azureus2.core3.util.DisplayFormatters;
+ import org.json.simple.JSONObject;
+
+@@ -372,6 +372,6 @@ public abstract class Result {
+ if ( input == null ){
+ return( null );
+ }
+- return( Entities.HTML40.unescape( input ));
++ return( StringEscapeUtils.unescapeHtml( input ));
+ }
+ }
+--- a/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
++++ b/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java
+@@ -88,14 +88,14 @@ public class WebResult extends Result {
+ public void setNameFromHTML(String name) {
+ if(name != null) {
+ name = removeHTMLTags(name);
+- this.name = Entities.HTML40.unescape(name);
++ this.name = StringEscapeUtils.unescapeHtml(name);
+ }
+ }
+
+ public void setCommentsFromHTML(String comments) {
+ if(comments != null) {
+ comments = removeHTMLTags(comments);
+- comments = Entities.HTML40.unescape(comments);
++ comments = StringEscapeUtils.unescapeHtml(comments);
+ comments = comments.replaceAll(",", "");
+ comments = comments.replaceAll(" ", "");
+ try{
+@@ -108,7 +108,7 @@ public class WebResult extends Result {
+ public void setCategoryFromHTML(String category) {
+ if(category != null) {
+ category = removeHTMLTags(category);
+- this.category = Entities.HTML40.unescape(category).trim();
++ this.category = StringEscapeUtils.unescapeHtml(category).trim();
+ /*int separator = this.category.indexOf(">");
+
+ if(separator != -1) {
+@@ -133,7 +133,7 @@ public class WebResult extends Result {
+ public void setNbPeersFromHTML(String nbPeers) {
+ if(nbPeers != null) {
+ nbPeers = removeHTMLTags(nbPeers);
+- String nbPeersS = Entities.HTML40.unescape(nbPeers);
++ String nbPeersS = StringEscapeUtils.unescapeHtml(nbPeers);
+ nbPeersS = nbPeersS.replaceAll(",", "");
+ nbPeersS = nbPeersS.replaceAll(" ", "");
+ try {
+@@ -148,7 +148,7 @@ public class WebResult extends Result {
+ public void setNbSeedsFromHTML(String nbSeeds) {
+ if(nbSeeds != null) {
+ nbSeeds = removeHTMLTags(nbSeeds);
+- String nbSeedsS = Entities.HTML40.unescape(nbSeeds);
++ String nbSeedsS = StringEscapeUtils.unescapeHtml(nbSeeds);
+ nbSeedsS = nbSeedsS.replaceAll(",", "");
+ nbSeedsS = nbSeedsS.replaceAll(" ", "");
+ try {
+@@ -163,7 +163,7 @@ public class WebResult extends Result {
+ public void setNbSuperSeedsFromHTML(String nbSuperSeeds) {
+ if(nbSuperSeeds != null) {
+ nbSuperSeeds = removeHTMLTags(nbSuperSeeds);
+- String nbSuperSeedsS = Entities.HTML40.unescape(nbSuperSeeds);
++ String nbSuperSeedsS = StringEscapeUtils.unescapeHtml(nbSuperSeeds);
+ nbSuperSeedsS = nbSuperSeedsS.replaceAll(",", "");
+ nbSuperSeedsS = nbSuperSeedsS.replaceAll(" ", "");
+ try {
+@@ -230,7 +230,7 @@ public class WebResult extends Result {
+ public void setPublishedDateFromHTML(String publishedDate) {
+ if(publishedDate != null) {
+ publishedDate = removeHTMLTags(publishedDate);
+- String publishedDateS = Entities.HTML40.unescape(publishedDate).replace((char)160,(char)32);
++ String publishedDateS = StringEscapeUtils.unescapeHtml(publishedDate).replace((char)160,(char)32);
+ this.publishedDate = dateParser.parseDate(publishedDateS);
+ }
+ }
+@@ -239,7 +239,7 @@ public class WebResult extends Result {
+ public void setSizeFromHTML(String size) {
+ if(size != null) {
+ size = removeHTMLTags(size);
+- String sizeS = Entities.HTML40.unescape(size).replace((char)160,(char)32);
++ String sizeS = StringEscapeUtils.unescapeHtml(size).replace((char)160,(char)32);
+ sizeS = sizeS.replaceAll("<[^>]+>", " ");
+ //Add a space between the digits and unit if there is none
+ sizeS = sizeS.replaceFirst("(\\d)([a-zA-Z])", "$1 $2");
+@@ -285,7 +285,7 @@ public class WebResult extends Result {
+ public void setVotesFromHTML(String votes_str) {
+ if(votes_str != null) {
+ votes_str = removeHTMLTags(votes_str);
+- votes_str = Entities.HTML40.unescape(votes_str);
++ votes_str = StringEscapeUtils.unescapeHtml(votes_str);
+ votes_str = votes_str.replaceAll(",", "");
+ votes_str = votes_str.replaceAll(" ", "");
+ try {
+@@ -299,7 +299,7 @@ public class WebResult extends Result {
+ public void setVotesDownFromHTML(String votes_str) {
+ if(votes_str != null) {
+ votes_str = removeHTMLTags(votes_str);
+- votes_str = Entities.HTML40.unescape(votes_str);
++ votes_str = StringEscapeUtils.unescapeHtml(votes_str);
+ votes_str = votes_str.replaceAll(",", "");
+ votes_str = votes_str.replaceAll(" ", "");
+ try {
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch
new file mode 100644
index 000000000000..18d5ac7670ff
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch
@@ -0,0 +1,42 @@
+--- a/com/aelitis/azureus/util/ImportExportUtils.java
++++ b/com/aelitis/azureus/util/ImportExportUtils.java
+@@ -360,7 +360,7 @@ public final class ImportExportUtils {
+
+ throws IOException
+ {
+- List l = new JSONArray(data.length);
++ List l = new JSONArray();
+
+ map.put( key, l );
+
+--- a/com/aelitis/azureus/util/JSONUtils.java
++++ b/com/aelitis/azureus/util/JSONUtils.java
+@@ -74,7 +74,7 @@ public class JSONUtils
+ * @since 3.0.1.5
+ */
+ public static JSONObject encodeToJSONObject(Map map) {
+- JSONObject newMap = new JSONObject((int)(map.size()*1.5));
++ JSONObject newMap = new JSONObject();
+
+ for (Map.Entry<String, Object> entry: ((Map<String,Object>)map).entrySet()){
+ String key = entry.getKey();
+@@ -105,9 +105,7 @@ public class JSONUtils
+ */
+ public static String encodeToJSON(Map map) {
+ JSONObject jobj = encodeToJSONObject(map);
+- StringBuilder sb = new StringBuilder(8192);
+- jobj.toString( sb );
+- return( sb.toString());
++ return( jobj.toString());
+ }
+
+ public static String encodeToJSON(Collection list) {
+@@ -138,7 +136,7 @@ public class JSONUtils
+ * @since 3.0.1.5
+ */
+ private static JSONArray encodeToJSONArray(Collection list) {
+- JSONArray newList = new JSONArray(list.size());
++ JSONArray newList = new JSONArray();
+
+ for ( Object value: list ){
+
diff --git a/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch b/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch
new file mode 100644
index 000000000000..c58d475995ee
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch
@@ -0,0 +1,51 @@
+diff --git a/org/gudy/azureus2/core3/util/AddressUtils.java b/org/gudy/azureus2/core3/util/AddressUtils.java
+index 6691951..38f14ee 100644
+--- a/org/gudy/azureus2/core3/util/AddressUtils.java
++++ b/org/gudy/azureus2/core3/util/AddressUtils.java
+@@ -494,11 +494,11 @@ AddressUtils
+ try{
+ // unfortunately we have an incompatible base64 standard in i2p, they replaced / with ~ and + with -
+
+- char[] encoded = to_decode.toCharArray();
++ byte[] encoded = to_decode.getBytes();
+
+ for ( int i=0;i<encoded.length;i++){
+
+- char c = encoded[i];
++ byte c = encoded[i];
+
+ if ( c == '~' ){
+ encoded[i] = '/';
+diff --git a/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java b/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java
+index a67a8a2..da4a46c 100644
+--- a/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java
++++ b/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java
+@@ -25,7 +25,7 @@ package org.gudy.azureus2.pluginsimpl.local.utils.xml.simpleparser;
+ import javax.xml.parsers.*;
+
+ import org.xml.sax.*;
+-import org.apache.commons.lang.Entities;
++import org.apache.commons.lang.StringEscapeUtils;
+ import org.gudy.azureus2.core3.util.AENetworkClassifier;
+ import org.gudy.azureus2.core3.util.Constants;
+ import org.gudy.azureus2.core3.util.Debug;
+@@ -656,17 +656,8 @@ SimpleXMLParserDocumentImpl
+ replacement = new String( buffer, 0, buffer_pos );
+
+ }else{
+-
+- int num = Entities.HTML40.entityValue( ref );
+-
+- if ( num != -1 ){
+-
+- replacement = "&#" + num + ";";
+-
+- }else{
+-
+- replacement = new String( buffer, 0, buffer_pos );
+- }
++
++ replacement = StringEscapeUtils.escapeHtml(ref);
+ }
+
+ char[] chars = replacement.toCharArray();
diff --git a/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch b/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch
new file mode 100644
index 000000000000..ee3b07047eca
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch
@@ -0,0 +1,26 @@
+diff --git a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
+index 34e898c..2e5bcaa 100644
+--- a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
++++ b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
+@@ -49,17 +49,17 @@ public class DateParserRegex extends DateParser {
+
+ private static final String[] MONTHS_LIST = new String[] {
+ " january janvier enero januar",
+- " february fevrier f�vrier febrero februar",
+- " march mars marzo marz marz m�rz" ,
++ " february fevrier febrero februar",
++ " march mars marzo marz marz",
+ " april avril abril april ",
+ " may mai mayo mai",
+ " june juin junio juni",
+ " july juillet julio juli",
+- " august aout ao�t agosto august",
++ " august aout agosto august",
+ " september septembre septiembre september",
+ " october octobre octubre oktober",
+ " november novembre noviembre november",
+- " december decembre d�cembre diciembre dezember"};
++ " december decembre diciembre dezember"};
+
+ public DateParserRegex() {
+ this("GMT-7",true,null);
diff --git a/net-p2p/vuze/files/vuze-5.7.2.0-disable-osx.patch b/net-p2p/vuze/files/vuze-5.7.2.0-disable-osx.patch
new file mode 100644
index 000000000000..6ae2301e75e3
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.7.2.0-disable-osx.patch
@@ -0,0 +1,71 @@
+diff --git a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
+index 256daff..68010b9 100644
+--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
++++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java
+@@ -231,66 +231,6 @@ public class SWTThread {
+ }
+ });
+
+- if (Constants.isOSX) {
+-
+- // On Cocoa, we get a Close trigger on display. Need to check if all
+- // platforms send this.
+- display.addListener(SWT.Close, new Listener() {
+- public void handleEvent(Event event) {
+- UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
+- if (uiFunctions != null) {
+- event.doit = uiFunctions.dispose(false, false);
+- }
+- }
+- });
+-
+- String platform = SWT.getPlatform();
+- // use reflection here so we decouple generic SWT from OSX specific stuff to an extent
+-
+- if (platform.equals("carbon")) {
+- try {
+-
+- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CarbonUIEnhancer");
+-
+- Constructor<?> constructor = ehancerClass.getConstructor(new Class[] {});
+-
+- constructor.newInstance(new Object[] {});
+-
+- } catch (Throwable e) {
+-
+- Debug.printStackTrace(e);
+- }
+- } else if (platform.equals("cocoa")) {
+- try {
+-
+- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer");
+-
+- Method mGetInstance = ehancerClass.getMethod("getInstance", new Class[0]);
+- Object claObj = mGetInstance.invoke(null, new Object[0] );
+-
+- Method mHookAppMenu = claObj.getClass().getMethod("hookApplicationMenu", new Class[] {});
+- if (mHookAppMenu != null) {
+- mHookAppMenu.invoke(claObj, new Object[0]);
+- }
+-
+- Method mHookDocOpen = claObj.getClass().getMethod("hookDocumentOpen", new Class[] {});
+- if (mHookDocOpen != null) {
+- mHookDocOpen.invoke(claObj, new Object[0]);
+- }
+-
+- Method mIsRetinaDisplay = claObj.getClass().getMethod("isRetinaDisplay");
+- if (mIsRetinaDisplay != null) {
+- isRetinaDisplay = (Boolean) mIsRetinaDisplay.invoke(claObj);
+- }
+-
+-
+- } catch (Throwable e) {
+-
+- Debug.printStackTrace(e);
+- }
+- }
+- }
+-
+ if (app != null) {
+ app.runInSWTThread();
+ runner = new Thread(new AERunnable() {
diff --git a/net-p2p/vuze/files/vuze.desktop b/net-p2p/vuze/files/vuze.desktop
new file mode 100644
index 000000000000..cee9fcae3824
--- /dev/null
+++ b/net-p2p/vuze/files/vuze.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Vuze
+Comment=Vuze BitTorrent Client
+Exec=vuze
+Icon=vuze
+Terminal=false
+Categories=Network;
+Type=Application
+MimeType=application/x-bittorrent;
diff --git a/net-p2p/vuze/metadata.xml b/net-p2p/vuze/metadata.xml
new file mode 100644
index 000000000000..5bde23a45a6b
--- /dev/null
+++ b/net-p2p/vuze/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">azureus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild b/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild
new file mode 100644
index 000000000000..0c35e7b02cd3
--- /dev/null
+++ b/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="source"
+
+inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator
+
+MY_PV=$(replace_all_version_separators "")
+
+PATCHSET_VER="4.5.0.2"
+PATCHSET_DIR="${PN}-${PATCHSET_VER}-gentoo-patches"
+PATCHSET="${PATCHSET_DIR}.tar.bz2"
+SRC_TARBALL="Vuze_${MY_PV}_source.zip"
+
+DESCRIPTION="BitTorrent client in Java, formerly called Azureus"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="mirror://sourceforge/azureus/${PN}/Vuze_${MY_PV}/${SRC_TARBALL}
+ mirror://gentoo/${PATCHSET}"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="amd64 ppc64 x86"
+IUSE=""
+
+# bundles parts of commons-lang, but modified
+# bundles parts of http://www.programmers-friend.org/
+RDEPEND="
+ dev-java/json-simple:0
+ dev-java/bcprov:1.40
+ >=dev-java/commons-cli-1.0:1
+ >=dev-java/log4j-1.2.8:0
+ >=dev-java/swt-3.7.2-r1:3.7[cairo]
+ >=virtual/jre-1.5"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/desktop-file-utils
+ >=virtual/jdk-1.5"
+
+PDEPEND="~net-p2p/vuze-coreplugins-${PV}"
+
+src_unpack() {
+ unpack ${PATCHSET}
+ mkdir "${S}" && cd "${S}" || die
+ unpack ${SRC_TARBALL}
+ # this is no longer needed
+ rm "${WORKDIR}"/${PATCHSET_DIR}/0006-Remove-the-use-of-windows-only-Tree2-widget.patch || die
+}
+
+java_prepare() {
+ # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4
+ # hopefully that's just a packaging mistake
+ [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite"
+ cp "${FILESDIR}"/build.xml . || die "failed to copy build.xml"
+
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PATCHSET_DIR}/
+
+ ### Removes OS X files and entries.
+ rm -rf "org/gudy/azureus2/platform/macosx" \
+ "org/gudy/azureus2/ui/swt/osx" || die
+
+ ### Removes Windows files.
+ rm -rf ./org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java || die
+
+ ### Removes test files.
+ rm -rf org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die
+
+ ### Removes bouncycastle (we use our own bcprov).
+ rm -rf "org/bouncycastle" || die
+
+ ### Removes bundled json
+ rm -rf "org/json" || die
+
+ ### The Tree2 file does not compile against Linux SWT and is used only on Windows.
+ ### It's runtime-conditional use is thus patched out in the patchset.
+ rm -rf "org/eclipse" || die
+
+ mkdir -p build/libs || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="swt-3.7,bcprov-1.40,json-simple,log4j,commons-cli-1"
+
+src_compile() {
+ local mem
+ use amd64 && mem="320"
+ use x86 && mem="192"
+ use ppc && mem="192"
+ use ppc64 && mem="256"
+ use sparc && mem="320"
+ export ANT_OPTS="-Xmx${mem}m"
+ java-pkg-2_src_compile
+
+ # bug #302058 - build.xml excludes .txt but upstream jar has it...
+ jar uf dist/Azureus2.jar ChangeLog.txt || die
+}
+
+src_install() {
+ java-pkg_dojar dist/Azureus2.jar
+ dodoc ChangeLog.txt
+
+ java-pkg_dolauncher "${PN}" \
+ --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \
+ --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \
+ --pkg_args '--ui=${UI}'
+ dosym vuze /usr/bin/azureus
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=204132
+ java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins
+
+ newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png
+ domenu "${FILESDIR}"/${PN}.desktop
+
+ use source && java-pkg_dosrc "${S}"/{com,edu,org}
+}
+
+pkg_postinst() {
+ ewarn "Running Vuze as root is not supported and may result in untracked"
+ ewarn "updates to shared components and then collisions on updates via ebuilds"
+
+ elog "Vuze has been formerly called Azureus and many references to the old name remain."
+ elog
+ elog "After running Vuze for the first time, configuration"
+ elog "options will be placed in '~/.azureus/gentoo.config'."
+ elog "If you need to change some startup options, you should"
+ elog "modify this file, rather than the startup script."
+ elog "Using this config file you can start the console UI."
+ elog
+
+ if ! has_version dev-java/swt:3.7[webkit]; then
+ elog
+ elog "Your dev-java/swt:3.7 was built without webkit support. Features such as Vuze HD Network will not work."
+ elog "Rebuild swt with USE=webkit (needs net-libs/webkit-gtk:2) to use these features."
+ fi
+
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/vuze/vuze-5.6.0.0.ebuild b/net-p2p/vuze/vuze-5.6.0.0.ebuild
new file mode 100644
index 000000000000..561de94cf7ae
--- /dev/null
+++ b/net-p2p/vuze/vuze-5.6.0.0.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+
+inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator
+
+MY_PV=$(replace_all_version_separators "")
+MY_SRC="Vuze_${MY_PV}"
+
+DESCRIPTION="BitTorrent client in Java, formerly called Azureus"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="mirror://sourceforge/azureus/${PN}/${MY_SRC}/${MY_SRC}_source.zip"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+# bundles parts of http://www.programmers-friend.org/
+# bundles bcprov - 1.37 required but not in the tree
+RDEPEND="
+ dev-java/commons-cli:1
+ dev-java/commons-lang:2.1
+ dev-java/json-simple:0
+ dev-java/log4j:0
+ dev-java/swt:3.8[cairo]
+ >=virtual/jre-1.6:*"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/desktop-file-utils
+ >=virtual/jdk-1.6:*"
+
+PDEPEND="~net-p2p/vuze-coreplugins-${PV}"
+
+pkg_pretend() {
+ if ! has_version dev-java/swt:3.8[webkit]; then
+ echo
+ ewarn "dev-java/swt:3.8 was built without webkit support."
+ ewarn "Web features such as Vuze HD Network will be disabled."
+ fi
+}
+
+src_unpack() {
+ mkdir -p "${S}" && cd "${S}"
+ unpack ${A}
+
+ # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4
+ [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite"
+ cp "${FILESDIR}"/build.xml "${S}" || die "failed to copy build.xml"
+}
+
+java_prepare() {
+ # upstream likes randomly changing a subset of files to CRLF every release
+ edos2unix $(find "${S}" -type f -name "*.java")
+
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-java5.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-remove-classpath.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-shared-plugins.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-osx.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-updaters.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-commons.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-json.patch
+ epatch "${FILESDIR}"/${PN}-5.6.0.0-commons-lang-entities.patch
+ epatch "${FILESDIR}"/${PN}-5.6.0.0-invalid-characters.patch
+# epatch "${FILESDIR}"/${P}-use-jdk-cipher-only.patch # bcprov
+
+ # OSX / Windows
+ rm "${S}"/org/gudy/azureus2/ui/swt/osx/CarbonUIEnhancer.java
+ rm "${S}"/org/gudy/azureus2/ui/swt/osx/Start.java
+ rm "${S}"/org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java
+
+ # Tree2 file does not compile on linux
+ rm -rf "${S}"/org/eclipse || die
+ # Bundled apache
+ rm -rf "${S}"/org/apache || die
+ # Bundled json
+ rm -rf "${S}"/org/json || die
+ # Bundled bcprov
+ # currently disabled - requires bcprov 1.37
+ #rm -rf "${S}"/org/bouncycastle || die
+
+ rm -rf "${S}"/org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die
+ mkdir -p "${S}"/build/libs || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="swt-3.8,json-simple,log4j,commons-cli-1 commons-lang-2.1"
+
+src_compile() {
+ local mem
+ use amd64 && mem="320"
+ use x86 && mem="192"
+ use ppc && mem="192"
+ use ppc64 && mem="256"
+ use sparc && mem="320"
+ export ANT_OPTS="-Xmx${mem}m"
+ java-pkg-2_src_compile
+
+ # bug #302058 - build.xml excludes .txt but upstream jar has it...
+ jar uf dist/Azureus2.jar ChangeLog.txt || die
+}
+
+src_install() {
+ java-pkg_dojar dist/Azureus2.jar
+ dodoc ChangeLog.txt
+
+ java-pkg_dolauncher "${PN}" \
+ --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \
+ --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \
+ --pkg_args '--ui=${UI}'
+ dosym vuze /usr/bin/azureus
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=204132
+ java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins
+
+ newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png
+ domenu "${FILESDIR}"/${PN}.desktop
+
+ use source && java-pkg_dosrc "${S}"/{com,edu,org}
+}
+
+pkg_postinst() {
+ ewarn "Running Vuze as root is not supported and may result in untracked"
+ ewarn "updates to shared components and then collisions on updates"
+ echo
+ elog "Vuze was formerly called Azureus and many references to the old name remain."
+ elog
+ elog "After running Vuze for the first time, configuration options will be"
+ elog "placed in '~/.azureus/gentoo.config'."
+ elog
+ elog "If you need to change some startup options, you should modify this file"
+ elog "rather than the startup script. You can enable the console UI by"
+ elog "editing this config file."
+ echo
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/vuze/vuze-5.7.2.0.ebuild b/net-p2p/vuze/vuze-5.7.2.0.ebuild
new file mode 100644
index 000000000000..65d8f1b6371f
--- /dev/null
+++ b/net-p2p/vuze/vuze-5.7.2.0.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+
+inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator
+
+MY_PV=$(replace_all_version_separators "")
+MY_SRC="Vuze_${MY_PV}"
+
+DESCRIPTION="BitTorrent client in Java, formerly called Azureus"
+HOMEPAGE="http://www.vuze.com/"
+SRC_URI="mirror://sourceforge/azureus/${PN}/${MY_SRC}/${MY_SRC}_source.zip"
+LICENSE="GPL-2 BSD"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+# bundles parts of http://www.programmers-friend.org/
+# bundles bcprov - 1.37 required but not in the tree
+RDEPEND="
+ dev-java/commons-cli:1
+ dev-java/commons-lang:2.1
+ dev-java/json-simple:0
+ dev-java/log4j:0
+ dev-java/swt:3.8[cairo]
+ >=virtual/jre-1.6:*"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/desktop-file-utils
+ >=virtual/jdk-1.6:*"
+
+PDEPEND="~net-p2p/vuze-coreplugins-${PV}"
+
+pkg_pretend() {
+ if ! has_version dev-java/swt:3.8[webkit]; then
+ echo
+ ewarn "dev-java/swt:3.8 was built without webkit support."
+ ewarn "Web features such as Vuze HD Network will be disabled."
+ fi
+}
+
+src_unpack() {
+ mkdir -p "${S}" && cd "${S}"
+ unpack ${A}
+
+ # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4
+ [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite"
+ cp "${FILESDIR}"/build.xml "${S}" || die "failed to copy build.xml"
+}
+
+java_prepare() {
+ # upstream likes randomly changing a subset of files to CRLF every release
+ edos2unix $(find "${S}" -type f -name "*.java")
+
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-java5.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-remove-classpath.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-shared-plugins.patch
+ epatch "${FILESDIR}"/${PN}-5.7.2.0-disable-osx.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-updaters.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-commons.patch
+ epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-json.patch
+ epatch "${FILESDIR}"/${PN}-5.6.0.0-commons-lang-entities.patch
+ epatch "${FILESDIR}"/${PN}-5.6.0.0-invalid-characters.patch
+# epatch "${FILESDIR}"/${P}-use-jdk-cipher-only.patch # bcprov
+
+ # OSX / Windows
+ rm "${S}"/org/gudy/azureus2/ui/swt/osx/CarbonUIEnhancer.java
+ rm "${S}"/org/gudy/azureus2/ui/swt/osx/Start.java
+ rm "${S}"/org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java
+
+ # Tree2 file does not compile on linux
+ rm -rf "${S}"/org/eclipse || die
+ # Bundled apache
+ rm -rf "${S}"/org/apache || die
+ # Bundled json
+ rm -rf "${S}"/org/json || die
+ # Bundled bcprov
+ # currently disabled - requires bcprov 1.37
+ #rm -rf "${S}"/org/bouncycastle || die
+
+ rm -rf "${S}"/org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die
+ mkdir -p "${S}"/build/libs || die
+}
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+EANT_GENTOO_CLASSPATH="swt-3.8,json-simple,log4j,commons-cli-1 commons-lang-2.1"
+
+src_compile() {
+ local mem
+ use amd64 && mem="320"
+ use x86 && mem="192"
+ use ppc && mem="192"
+ use ppc64 && mem="256"
+ use sparc && mem="320"
+ export ANT_OPTS="-Xmx${mem}m"
+ java-pkg-2_src_compile
+
+ # bug #302058 - build.xml excludes .txt but upstream jar has it...
+ jar uf dist/Azureus2.jar ChangeLog.txt || die
+}
+
+src_install() {
+ java-pkg_dojar dist/Azureus2.jar
+ dodoc ChangeLog.txt
+
+ java-pkg_dolauncher "${PN}" \
+ --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \
+ --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \
+ --pkg_args '--ui=${UI}'
+ dosym vuze /usr/bin/azureus
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=204132
+ java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins
+
+ newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png
+ domenu "${FILESDIR}"/${PN}.desktop
+
+ use source && java-pkg_dosrc "${S}"/{com,edu,org}
+}
+
+pkg_postinst() {
+ ewarn "Running Vuze as root is not supported and may result in untracked"
+ ewarn "updates to shared components and then collisions on updates"
+ echo
+ elog "Vuze was formerly called Azureus and many references to the old name remain."
+ elog
+ elog "After running Vuze for the first time, configuration options will be"
+ elog "placed in '~/.azureus/gentoo.config'."
+ elog
+ elog "If you need to change some startup options, you should modify this file"
+ elog "rather than the startup script. You can enable the console UI by"
+ elog "editing this config file."
+ echo
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/xnap/Manifest b/net-p2p/xnap/Manifest
new file mode 100644
index 000000000000..73563924f0cf
--- /dev/null
+++ b/net-p2p/xnap/Manifest
@@ -0,0 +1,5 @@
+DIST xnap-2.5r3.jar 1320779 SHA256 41267a182b9d50f069117f3f5edaca1d511f62558d403e9d10d8aa14ada0c4e7 SHA512 6dcfc7b6d56c86a8a2e554b67449c60c784033cdc8962613dc0e4555b9139c71c7cc958f40b2a5a14e60c4abfde747b5ba9868a358837ceee3b730af34cf5f69 WHIRLPOOL bce96798b9f4ed8d4aec44c021d24fc25a0038f532694cdba9c77623a33fadbe51f5d72c6ff48fd68e6127c922f0899e8774632bad0ad3c763208c07d3a5ddcc
+EBUILD xnap-2.5-r3.ebuild 601 SHA256 92ed5164df8a568a414d423c48662096f91f8cbc824303ce9a77c90f8c6074cd SHA512 ee4bf2db9f934e85ccb00242e7cbfd74e74b313bf2c3a6fe48c9357f24206e95363a5a0255a344ec4f02c713dde02e10c9bf5a185433796ee9b61c558f32bb73 WHIRLPOOL 7d97841af280ef8208e87e20af51dbfc063b2b7f702890c6234a1ddc33cdfcafd0fc221fdd977b6afe7066b61b4e7d67ea233d3f23bf956c1870d541f57e63c2
+MISC ChangeLog 2584 SHA256 bf3b0948ca135f17ff01b7d31c6e4b9e000ff8d3b18d67f2fc204190e2c24f68 SHA512 3cab24ec21b7459e49a415a50b919bafde820fc0f656d334c1cb32a8abe45989dc6df14fb3fb6fb06882bbc557ad0d639684d939dd9ba225b6147b738fd0296a WHIRLPOOL db1f4ed412365e4f4d68ac449d7172c8220293db8c108f31aada583212540a4eb82f9d5923637eca025bed829df87e4e0d0873a4a9ee76d186103925a8fa7f6b
+MISC ChangeLog-2015 1115 SHA256 91cbbb7e780c39c7785ef771111c7129b33c4c6e3fcea96cbf6f151f737427c1 SHA512 a31a4f9a223ed468be0e7ad4ef2db706b428acb0a44197d022228fc279c81cdbf62ca7cce86641af2ecca663654935324d582b5e9e21c21135e8cdd2e9c69fa7 WHIRLPOOL fb221c17d54f42f54f1284c6570084c5253b58b70a94bb889bfb117f519d7853b0977613eb02faea82c1d10944599dfc245fd082b8ae618fcadb97b97d9f8422
+MISC metadata.xml 674 SHA256 312058d02cf3090e3c1791a930b86520b5b254551bb070f59ee9a9d6d883cc2d SHA512 86c926318b381b75f66b3ea201ab324c972add7c8fad3b4180e70ae3b991c0a18661be55ddeeb88098916637f6ce3d3e11b1b50d6c1d4650916cf9efb941d421 WHIRLPOOL d54606ed91771271332d75b6f7a17921779c8982d3c85879f4c49b3b8a2e47b16f45739c0bf5f35e5d5abe21e83432b81d4cf2fa4ffa038e5e26535a38f888aa
diff --git a/net-p2p/xnap/metadata.xml b/net-p2p/xnap/metadata.xml
new file mode 100644
index 000000000000..0594a2ce64ed
--- /dev/null
+++ b/net-p2p/xnap/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>
+ XNap provides a plugin enabled framework for peer-to-peer (P2P) applications and a client which is based on that framework. It is free software and licensed under the GNU Public License .
+
+ XNap is purely written in Java. The client features a modern Swing based user interface and console support that will run nicely on every platform with a recent Java Runtime Environment (1.3 or higher).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">xnap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/xnap/xnap-2.5-r3.ebuild b/net-p2p/xnap/xnap-2.5-r3.ebuild
new file mode 100644
index 000000000000..1e6279868f2e
--- /dev/null
+++ b/net-p2p/xnap/xnap-2.5-r3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="A P2P framework and client"
+HOMEPAGE="http://xnap.sf.net"
+SRC_URI="mirror://sourceforge/xnap/${P}r3.jar"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+RDEPEND=">=virtual/jre-1.3"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp ${DISTDIR}/${A} ${WORKDIR}/
+}
+
+src_install() {
+ mv ${S}/${A} ${S}/${PN}.jar
+ insinto /opt/${PN}/lib
+ doins ${PN}.jar
+
+ echo "#!/bin/sh" > ${PN}
+ echo "cd /opt/${PN}" >> ${PN}
+ echo '${JAVA_HOME}'/bin/java -jar lib/${PN}.jar '$*' >> ${PN}
+
+ into /opt
+ dobin ${PN}
+}