summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/amule/Manifest1
-rw-r--r--net-p2p/amule/amule-2.3.1.ebuild107
-rw-r--r--net-p2p/amule/files/amule-2.2.6-fallocate.diff23
-rw-r--r--net-p2p/amule/files/amule-2.3.1-gcc47.patch21
-rw-r--r--net-p2p/amule/files/amuled.confd13
-rw-r--r--net-p2p/amule/files/amuled.initd50
-rw-r--r--net-p2p/amule/files/amuleweb.confd28
-rw-r--r--net-p2p/amule/files/amuleweb.initd49
-rw-r--r--net-p2p/amule/metadata.xml13
-rw-r--r--net-p2p/bitcoin-cli/Manifest10
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.10.0-r1.ebuild25
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.10.1.ebuild25
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.10.2.ebuild38
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.11.0.ebuild33
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-0.9.3.ebuild55
-rw-r--r--net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild25
-rw-r--r--net-p2p/bitcoin-cli/metadata.xml16
-rw-r--r--net-p2p/bitcoin-qt/Manifest9
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild106
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild112
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild102
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild99
-rw-r--r--net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch183
-rw-r--r--net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch12
-rw-r--r--net-p2p/bitcoin-qt/files/9999-sys_libsecp256k1.patch80
-rw-r--r--net-p2p/bitcoin-qt/files/9999-syslibs.patch243
-rw-r--r--net-p2p/bitcoin-qt/metadata.xml27
-rw-r--r--net-p2p/bitcoind/Manifest9
-rw-r--r--net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild79
-rw-r--r--net-p2p/bitcoind/bitcoind-0.10.2.ebuild77
-rw-r--r--net-p2p/bitcoind/bitcoind-0.11.0.ebuild75
-rw-r--r--net-p2p/bitcoind/bitcoind-9999.ebuild72
-rw-r--r--net-p2p/bitcoind/files/0.10.0-openrc-compat.patch24
-rw-r--r--net-p2p/bitcoind/files/0.8-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch185
-rw-r--r--net-p2p/bitcoind/files/0.9-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoind/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/bitcoind/files/0.9.x-ljr_noblacklist.patch12
-rw-r--r--net-p2p/bitcoind/files/9999-syslibs.patch243
-rw-r--r--net-p2p/bitcoind/files/bitcoin.conf8
-rw-r--r--net-p2p/bitcoind/files/bitcoin.confd10
-rw-r--r--net-p2p/bitcoind/files/bitcoin.initd-r129
-rw-r--r--net-p2p/bitcoind/files/bitcoind.logrotate7
-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.xml26
-rw-r--r--net-p2p/bitflu/Manifest3
-rw-r--r--net-p2p/bitflu/bitflu-1.50.ebuild75
-rw-r--r--net-p2p/bitflu/bitflu-1.51.ebuild75
-rw-r--r--net-p2p/bitflu/bitflu-1.52.ebuild75
-rw-r--r--net-p2p/bitflu/files/bitflu.config45
-rw-r--r--net-p2p/bitflu/files/bitflu.initd47
-rw-r--r--net-p2p/bitflu/metadata.xml13
-rw-r--r--net-p2p/bittornado/Manifest1
-rw-r--r--net-p2p/bittornado/bittornado-0.3.18-r2.ebuild55
-rw-r--r--net-p2p/bittornado/bittornado-0.3.18-r3.ebuild56
-rw-r--r--net-p2p/bittornado/files/bittornado-0.3.18-wxversion.patch90
-rw-r--r--net-p2p/bittornado/files/bttrack.conf18
-rw-r--r--net-p2p/bittornado/files/bttrack.rc23
-rw-r--r--net-p2p/bittornado/metadata.xml5
-rw-r--r--net-p2p/bittorrent/Manifest1
-rw-r--r--net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild87
-rw-r--r--net-p2p/bittorrent/bittorrent-4.4.0-r3.ebuild86
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch75
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch23
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch142
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch15
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch14
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch13
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch81
-rw-r--r--net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch45
-rw-r--r--net-p2p/bittorrent/files/bittorrent-tracker.confd15
-rw-r--r--net-p2p/bittorrent/files/bittorrent-tracker.initd23
-rw-r--r--net-p2p/bittorrent/files/bittorrent.desktop10
-rw-r--r--net-p2p/bittorrent/metadata.xml9
-rw-r--r--net-p2p/btpd/Manifest1
-rw-r--r--net-p2p/btpd/btpd-0.15.ebuild30
-rw-r--r--net-p2p/btpd/files/confd_btpd5
-rw-r--r--net-p2p/btpd/files/initd_btpd79
-rw-r--r--net-p2p/btpd/metadata.xml10
-rw-r--r--net-p2p/classified-ads/Manifest4
-rw-r--r--net-p2p/classified-ads/classified-ads-0.07.ebuild86
-rw-r--r--net-p2p/classified-ads/classified-ads-0.07_p20150728.ebuild82
-rw-r--r--net-p2p/classified-ads/metadata.xml38
-rw-r--r--net-p2p/createtorrent/Manifest1
-rw-r--r--net-p2p/createtorrent/createtorrent-1.1.4.ebuild29
-rw-r--r--net-p2p/createtorrent/metadata.xml5
-rw-r--r--net-p2p/ctcs/Manifest1
-rw-r--r--net-p2p/ctcs/ctcs-1.4.1.ebuild20
-rw-r--r--net-p2p/ctcs/metadata.xml5
-rw-r--r--net-p2p/ctorrent/Manifest1
-rw-r--r--net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild32
-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/datacoin-hp-9999.ebuild123
-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.initd29
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.logrotate7
-rw-r--r--net-p2p/datacoin-hp/files/datacoin.service30
-rw-r--r--net-p2p/datacoin-hp/metadata.xml18
-rw-r--r--net-p2p/dbhub/Manifest1
-rw-r--r--net-p2p/dbhub/dbhub-0.451-r1.ebuild39
-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/dclib/Manifest1
-rw-r--r--net-p2p/dclib/dclib-0.3.23.ebuild39
-rw-r--r--net-p2p/dclib/files/dclib-0.3.23-asneeded.patch16
-rw-r--r--net-p2p/dclib/files/dclib-0.3.23-openssl-1.patch52
-rw-r--r--net-p2p/dclib/metadata.xml8
-rw-r--r--net-p2p/deluge/Manifest2
-rw-r--r--net-p2p/deluge/deluge-1.3.11.ebuild84
-rw-r--r--net-p2p/deluge/deluge-1.3.6.ebuild74
-rw-r--r--net-p2p/deluge/deluge-9999.ebuild77
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch42
-rw-r--r--net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings60
-rw-r--r--net-p2p/deluge/files/deluge-web.service11
-rw-r--r--net-p2p/deluge/files/deluged.conf8
-rw-r--r--net-p2p/deluge/files/deluged.init71
-rw-r--r--net-p2p/deluge/files/deluged.service13
-rw-r--r--net-p2p/deluge/metadata.xml11
-rw-r--r--net-p2p/dogecoin-qt/Manifest1
-rw-r--r--net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild145
-rw-r--r--net-p2p/dogecoin-qt/metadata.xml18
-rw-r--r--net-p2p/ed2k_hash/Manifest1
-rw-r--r--net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild36
-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/Manifest1
-rw-r--r--net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.9.ebuild147
-rw-r--r--net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild147
-rw-r--r--net-p2p/eiskaltdcpp/metadata.xml24
-rw-r--r--net-p2p/fms/Manifest2
-rw-r--r--net-p2p/fms/files/fms38
-rw-r--r--net-p2p/fms/files/fms-use-system-libs2.patch22
-rw-r--r--net-p2p/fms/fms-0.3.73.ebuild71
-rw-r--r--net-p2p/fms/fms-0.3.75.ebuild71
-rw-r--r--net-p2p/fms/metadata.xml13
-rw-r--r--net-p2p/freenet/Manifest5
-rw-r--r--net-p2p/freenet/files/0.7.5_p1302-ext.patch22
-rw-r--r--net-p2p/freenet/files/0.7.5_p1321-ext.patch22
-rw-r--r--net-p2p/freenet/files/freenet18
-rw-r--r--net-p2p/freenet/files/freenet-0.7.5_p1384-libraryloader-just-try-loading.patch17
-rw-r--r--net-p2p/freenet/files/freenet-0.7.5_p1384-nativebiginteger-no-nativedoublevalue.patch28
-rw-r--r--net-p2p/freenet/files/freenet-0.7.5_p1389-wrapper.conf49
-rw-r--r--net-p2p/freenet/files/freenet-0.7.5_p1422-wrapper.conf27
-rw-r--r--net-p2p/freenet/files/freenet.old18
-rw-r--r--net-p2p/freenet/files/freenet.service13
-rw-r--r--net-p2p/freenet/files/libraryloader-revert-using-of-absolute-path.patch19
-rw-r--r--net-p2p/freenet/files/run.sh-20090501585
-rw-r--r--net-p2p/freenet/freenet-0.7.5_p1466.ebuild144
-rw-r--r--net-p2p/freenet/freenet-0.7.5_p1467.ebuild144
-rw-r--r--net-p2p/freenet/metadata.xml11
-rw-r--r--net-p2p/gift-ares/Manifest1
-rw-r--r--net-p2p/gift-ares/gift-ares-0.3.0-r1.ebuild39
-rw-r--r--net-p2p/gift-ares/metadata.xml5
-rw-r--r--net-p2p/gift-fasttrack/Manifest1
-rw-r--r--net-p2p/gift-fasttrack/gift-fasttrack-0.8.9-r1.ebuild41
-rw-r--r--net-p2p/gift-fasttrack/metadata.xml5
-rw-r--r--net-p2p/gift-gnutella/Manifest1
-rw-r--r--net-p2p/gift-gnutella/files/cacheupdate.sh73
-rw-r--r--net-p2p/gift-gnutella/gift-gnutella-0.0.11.ebuild47
-rw-r--r--net-p2p/gift-gnutella/metadata.xml8
-rw-r--r--net-p2p/gift-openft/Manifest1
-rw-r--r--net-p2p/gift-openft/gift-openft-0.2.1.6.ebuild48
-rw-r--r--net-p2p/gift-openft/metadata.xml8
-rw-r--r--net-p2p/gift/Manifest1
-rw-r--r--net-p2p/gift/files/gift.confd22
-rw-r--r--net-p2p/gift/files/gift.initd35
-rw-r--r--net-p2p/gift/gift-0.11.8.1-r1.ebuild64
-rw-r--r--net-p2p/gift/metadata.xml14
-rw-r--r--net-p2p/giftcurs/Manifest1
-rw-r--r--net-p2p/giftcurs/giftcurs-0.6.2.ebuild37
-rw-r--r--net-p2p/giftcurs/metadata.xml5
-rw-r--r--net-p2p/gnut/Manifest2
-rw-r--r--net-p2p/gnut/gnut-0.4.28-r1.ebuild28
-rw-r--r--net-p2p/gnut/metadata.xml5
-rw-r--r--net-p2p/gtk-gnutella/Manifest2
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.1.1.ebuild86
-rw-r--r--net-p2p/gtk-gnutella/gtk-gnutella-1.1.3.ebuild86
-rw-r--r--net-p2p/gtk-gnutella/metadata.xml11
-rw-r--r--net-p2p/gtorrentviewer/Manifest1
-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.ebuild46
-rw-r--r--net-p2p/gtorrentviewer/metadata.xml8
-rw-r--r--net-p2p/hx/Manifest1
-rw-r--r--net-p2p/hx/hx-0.4.11.ebuild48
-rw-r--r--net-p2p/hx/metadata.xml10
-rw-r--r--net-p2p/i2p/Manifest1
-rw-r--r--net-p2p/i2p/files/i2p-0.9.18_fix-paths.patch137
-rw-r--r--net-p2p/i2p/files/i2p.initd36
-rw-r--r--net-p2p/i2p/files/i2p.service13
-rw-r--r--net-p2p/i2p/i2p-0.9.18.ebuild97
-rw-r--r--net-p2p/i2p/metadata.xml15
-rw-r--r--net-p2p/imule/Manifest2
-rw-r--r--net-p2p/imule/imule-2.3.2.3-r1.ebuild65
-rw-r--r--net-p2p/imule/imule-2.3.2.3.ebuild51
-rw-r--r--net-p2p/imule/metadata.xml12
-rw-r--r--net-p2p/kmldonkey/Manifest1
-rw-r--r--net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild34
-rw-r--r--net-p2p/kmldonkey/metadata.xml5
-rw-r--r--net-p2p/ktorrent/Manifest1
-rw-r--r--net-p2p/ktorrent/files/ktorrent-4.3.0-mountedstoragecheck.patch25
-rw-r--r--net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch72
-rw-r--r--net-p2p/ktorrent/files/ktorrent-4.3.1-underlinking.patch21
-rw-r--r--net-p2p/ktorrent/ktorrent-4.3.1-r1.ebuild103
-rw-r--r--net-p2p/ktorrent/metadata.xml23
-rw-r--r--net-p2p/linuxdcpp/Manifest1
-rw-r--r--net-p2p/linuxdcpp/linuxdcpp-1.0.3-r1.ebuild54
-rw-r--r--net-p2p/linuxdcpp/metadata.xml8
-rw-r--r--net-p2p/litecoin-qt/Manifest2
-rw-r--r--net-p2p/litecoin-qt/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch193
-rw-r--r--net-p2p/litecoin-qt/litecoin-qt-0.10.2.2.ebuild143
-rw-r--r--net-p2p/litecoin-qt/litecoin-qt-0.8.7.4.ebuild143
-rw-r--r--net-p2p/litecoin-qt/metadata.xml14
-rw-r--r--net-p2p/litecoind/Manifest2
-rw-r--r--net-p2p/litecoind/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/litecoind/files/litecoin-sys_leveldb.patch193
-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.initd104
-rw-r--r--net-p2p/litecoind/files/litecoin.initd-r129
-rw-r--r--net-p2p/litecoind/files/litecoin.service30
-rw-r--r--net-p2p/litecoind/files/litecoind.logrotate7
-rw-r--r--net-p2p/litecoind/litecoind-0.10.2.2-r1.ebuild98
-rw-r--r--net-p2p/litecoind/litecoind-0.8.7.4.ebuild123
-rw-r--r--net-p2p/litecoind/metadata.xml15
-rw-r--r--net-p2p/metadata.xml34
-rw-r--r--net-p2p/microdc/Manifest1
-rw-r--r--net-p2p/microdc/metadata.xml5
-rw-r--r--net-p2p/microdc/microdc-0.11.0.ebuild26
-rw-r--r--net-p2p/microdc2/Manifest2
-rw-r--r--net-p2p/microdc2/metadata.xml5
-rw-r--r--net-p2p/microdc2/microdc2-0.15.6-r2.ebuild49
-rw-r--r--net-p2p/mktorrent-borg/Manifest1
-rw-r--r--net-p2p/mktorrent-borg/metadata.xml5
-rw-r--r--net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild29
-rw-r--r--net-p2p/mktorrent/Manifest1
-rw-r--r--net-p2p/mktorrent/metadata.xml8
-rw-r--r--net-p2p/mktorrent/mktorrent-1.0-r1.ebuild34
-rw-r--r--net-p2p/mldonkey/Manifest2
-rw-r--r--net-p2p/mldonkey/files/2.9.5-execstacks.patch44
-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/ocaml4.patch12
-rw-r--r--net-p2p/mldonkey/metadata.xml16
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.3.ebuild170
-rw-r--r--net-p2p/mldonkey/mldonkey-3.1.5.ebuild171
-rw-r--r--net-p2p/multibit/Manifest1
-rw-r--r--net-p2p/multibit/files/auto-install.xml12
-rwxr-xr-xnet-p2p/multibit/files/multibit3
-rw-r--r--net-p2p/multibit/metadata.xml8
-rw-r--r--net-p2p/multibit/multibit-0.5.18.ebuild36
-rw-r--r--net-p2p/myster/Manifest1
-rw-r--r--net-p2p/myster/metadata.xml8
-rw-r--r--net-p2p/myster/myster-8.0-r1.ebuild27
-rw-r--r--net-p2p/nap/Manifest1
-rw-r--r--net-p2p/nap/metadata.xml5
-rw-r--r--net-p2p/nap/nap-1.5.4-r1.ebuild34
-rw-r--r--net-p2p/ncdc/Manifest3
-rw-r--r--net-p2p/ncdc/metadata.xml16
-rw-r--r--net-p2p/ncdc/ncdc-1.18.1.ebuild30
-rw-r--r--net-p2p/ncdc/ncdc-1.19.1.ebuild40
-rw-r--r--net-p2p/ncdc/ncdc-1.19.ebuild35
-rw-r--r--net-p2p/ncdc/ncdc-9999.ebuild41
-rw-r--r--net-p2p/nicotine+/Manifest1
-rw-r--r--net-p2p/nicotine+/metadata.xml12
-rw-r--r--net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild51
-rw-r--r--net-p2p/nicotine+/nicotine+-1.2.16.ebuild51
-rw-r--r--net-p2p/opendchub/Manifest1
-rw-r--r--net-p2p/opendchub/files/0.7.14-overflow.patch12
-rw-r--r--net-p2p/opendchub/files/0.7.14-telnet.patch12
-rw-r--r--net-p2p/opendchub/files/opendchub-0.8.2-telnet.patch11
-rw-r--r--net-p2p/opendchub/files/opendchub-gentoo.patch30
-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.ebuild50
-rw-r--r--net-p2p/phex/Manifest1
-rw-r--r--net-p2p/phex/files/0001-Remove-MacOS-GUI-references.patch113
-rw-r--r--net-p2p/phex/files/phex-3.0.0.99.sh7
-rw-r--r--net-p2p/phex/metadata.xml9
-rw-r--r--net-p2p/phex/phex-3.2.0.102-r1.ebuild65
-rw-r--r--net-p2p/phxd/Manifest1
-rw-r--r--net-p2p/phxd/files/80phxd1
-rw-r--r--net-p2p/phxd/metadata.xml9
-rw-r--r--net-p2p/phxd/phxd-0.1.0_pre23092005.ebuild51
-rw-r--r--net-p2p/ppcoin-qt/Manifest1
-rw-r--r--net-p2p/ppcoin-qt/metadata.xml14
-rw-r--r--net-p2p/ppcoin-qt/ppcoin-qt-0.4.0.ebuild138
-rw-r--r--net-p2p/ppcoind/Manifest1
-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-r129
-rw-r--r--net-p2p/ppcoind/files/ppcoin.service30
-rw-r--r--net-p2p/ppcoind/files/ppcoind.logrotate7
-rw-r--r--net-p2p/ppcoind/metadata.xml14
-rw-r--r--net-p2p/ppcoind/ppcoind-0.4.0.ebuild117
-rw-r--r--net-p2p/primecoin-qt/Manifest1
-rw-r--r--net-p2p/primecoin-qt/files/primecoin-sys_leveldb.patch176
-rw-r--r--net-p2p/primecoin-qt/metadata.xml14
-rw-r--r--net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild144
-rw-r--r--net-p2p/primecoind/Manifest1
-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-r129
-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.xml14
-rw-r--r--net-p2p/primecoind/primecoind-0.1.2-r1.ebuild123
-rw-r--r--net-p2p/pybitmessage/Manifest2
-rw-r--r--net-p2p/pybitmessage/metadata.xml26
-rw-r--r--net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild74
-rw-r--r--net-p2p/pybitmessage/pybitmessage-0.4.3.ebuild74
-rw-r--r--net-p2p/pybitmessage/pybitmessage-9999.ebuild72
-rw-r--r--net-p2p/qbittorrent/Manifest3
-rw-r--r--net-p2p/qbittorrent/metadata.xml16
-rw-r--r--net-p2p/qbittorrent/qbittorrent-3.1.12.ebuild63
-rw-r--r--net-p2p/qbittorrent/qbittorrent-3.1.9.2-r1.ebuild58
-rw-r--r--net-p2p/qbittorrent/qbittorrent-3.2.0.ebuild81
-rw-r--r--net-p2p/qbittorrent/qbittorrent-9999.ebuild81
-rw-r--r--net-p2p/retroshare/Manifest3
-rw-r--r--net-p2p/retroshare/metadata.xml28
-rw-r--r--net-p2p/retroshare/retroshare-0.5.5c.ebuild132
-rw-r--r--net-p2p/retroshare/retroshare-0.6.0_rc1.ebuild150
-rw-r--r--net-p2p/retroshare/retroshare-0.6.0_rc2_pre8551.ebuild150
-rw-r--r--net-p2p/rtorrent/Manifest2
-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.1560
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.conf1
-rw-r--r--net-p2p/rtorrent/files/rtorrentd.init33
-rw-r--r--net-p2p/rtorrent/files/rtorrentd_at.service15
-rw-r--r--net-p2p/rtorrent/metadata.xml13
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.3.ebuild58
-rw-r--r--net-p2p/rtorrent/rtorrent-0.9.4-r1.ebuild63
-rw-r--r--net-p2p/saku/Manifest1
-rw-r--r--net-p2p/saku/files/saku26
-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-r1.ebuild45
-rw-r--r--net-p2p/smet2html/Manifest1
-rw-r--r--net-p2p/smet2html/metadata.xml8
-rw-r--r--net-p2p/smet2html/smet2html-0.1.ebuild30
-rw-r--r--net-p2p/soulseek-qt/Manifest2
-rw-r--r--net-p2p/soulseek-qt/metadata.xml8
-rw-r--r--net-p2p/soulseek-qt/soulseek-qt-20131106-r1.ebuild36
-rw-r--r--net-p2p/syrep/Manifest1
-rw-r--r--net-p2p/syrep/metadata.xml5
-rw-r--r--net-p2p/syrep/syrep-0.9.ebuild41
-rw-r--r--net-p2p/torrentinfo/Manifest1
-rw-r--r--net-p2p/torrentinfo/metadata.xml17
-rw-r--r--net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild26
-rw-r--r--net-p2p/transmission-remote-cli/Manifest2
-rw-r--r--net-p2p/transmission-remote-cli/metadata.xml16
-rw-r--r--net-p2p/transmission-remote-cli/transmission-remote-cli-1.6.3.ebuild32
-rw-r--r--net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.0.ebuild32
-rw-r--r--net-p2p/transmission-remote-gtk/Manifest2
-rw-r--r--net-p2p/transmission-remote-gtk/files/transmission-remote-gtk-1.1-PKG_PROG_PKG_CONFIG.patch16
-rw-r--r--net-p2p/transmission-remote-gtk/metadata.xml14
-rw-r--r--net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.0.ebuild47
-rw-r--r--net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.1.1.ebuild46
-rw-r--r--net-p2p/transmission/Manifest1
-rw-r--r--net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch17
-rw-r--r--net-p2p/transmission/files/transmission-daemon.confd.414
-rw-r--r--net-p2p/transmission/files/transmission-daemon.initd.973
-rw-r--r--net-p2p/transmission/metadata.xml13
-rw-r--r--net-p2p/transmission/transmission-2.84-r1.ebuild161
-rw-r--r--net-p2p/transmission/transmission-2.84.ebuild152
-rw-r--r--net-p2p/tribler/Manifest6
-rw-r--r--net-p2p/tribler/files/tribler-5.9.12-fix-global-declarations.patch22
-rw-r--r--net-p2p/tribler/files/tribler-6.1.0-fix-desktop.patch21
-rw-r--r--net-p2p/tribler/files/tribler-6.2.0-fix-desktop.patch12
-rw-r--r--net-p2p/tribler/files/tribler-fix-desktop.patch18
-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.0.3.ebuild80
-rw-r--r--net-p2p/tribler/tribler-6.3.3-r1.ebuild68
-rw-r--r--net-p2p/tvrss/Manifest1
-rw-r--r--net-p2p/tvrss/metadata.xml8
-rw-r--r--net-p2p/tvrss/tvrss-1.8_beta.ebuild27
-rw-r--r--net-p2p/valknut/Manifest3
-rw-r--r--net-p2p/valknut/files/valknut-0.4.9-gcc47.patch15
-rw-r--r--net-p2p/valknut/metadata.xml8
-rw-r--r--net-p2p/valknut/valknut-0.4.9.ebuild47
-rw-r--r--net-p2p/vuze-coreplugins/Manifest10
-rw-r--r--net-p2p/vuze-coreplugins/metadata.xml9
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild63
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-5.3.0.0.ebuild52
-rw-r--r--net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild52
-rw-r--r--net-p2p/vuze/Manifest4
-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-invalid-characters.patch24
-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.3.0.0-use-jdk-cipher-only.patch41
-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.desktop9
-rw-r--r--net-p2p/vuze/metadata.xml12
-rw-r--r--net-p2p/vuze/vuze-4.8.1.2-r1.ebuild144
-rw-r--r--net-p2p/vuze/vuze-5.3.0.0.ebuild144
-rw-r--r--net-p2p/vuze/vuze-5.6.0.0.ebuild145
-rw-r--r--net-p2p/wire/Manifest1
-rw-r--r--net-p2p/wire/metadata.xml5
-rw-r--r--net-p2p/wire/wire-1.0.2.ebuild21
-rw-r--r--net-p2p/xnap/Manifest1
-rw-r--r--net-p2p/xnap/metadata.xml13
-rw-r--r--net-p2p/xnap/xnap-2.5-r3.ebuild31
-rw-r--r--net-p2p/yaggui/Manifest1
-rw-r--r--net-p2p/yaggui/files/yaggui.sh19
-rw-r--r--net-p2p/yaggui/metadata.xml9
-rw-r--r--net-p2p/yaggui/yaggui-0.9.2.ebuild44
431 files changed, 17791 insertions, 0 deletions
diff --git a/net-p2p/amule/Manifest b/net-p2p/amule/Manifest
new file mode 100644
index 000000000000..5eee9c15ed52
--- /dev/null
+++ b/net-p2p/amule/Manifest
@@ -0,0 +1 @@
+DIST aMule-2.3.1.tar.bz2 4565232 SHA256 d2eda19c34ec574fa123efb95726c7cc241b093c95d074a5161ee7330dece69d
diff --git a/net-p2p/amule/amule-2.3.1.ebuild b/net-p2p/amule/amule-2.3.1.ebuild
new file mode 100644
index 000000000000..929c74d8eecc
--- /dev/null
+++ b/net-p2p/amule/amule-2.3.1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic 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.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 ~sparc x86"
+IUSE="daemon debug geoip nls remote stats unicode upnp +X"
+
+DEPEND=">=dev-libs/crypto++-5
+ >=sys-libs/zlib-1.2.1
+ stats? ( >=media-libs/gd-2.0.26[jpeg] )
+ geoip? ( dev-libs/geoip )
+ upnp? ( >=net-libs/libupnp-1.6.6 )
+ remote? ( >=media-libs/libpng-1.2.0
+ unicode? ( >=media-libs/gd-2.0.26 ) )
+ X? ( >=x11-libs/wxGTK-2.8.12:2.8[X] )
+ !X? ( >=x11-libs/wxGTK-2.8.12:2.8 )
+ !net-p2p/imule"
+RDEPEND="${DEPEND}"
+
+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_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.2.6-fallocate.diff
+ # Bug 412371
+ epatch "${FILESDIR}"/${PN}-2.3.1-gcc47.patch
+}
+
+src_configure() {
+ local myconf
+
+ WX_GTK_VER="2.8"
+
+ 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-wx-config=${WX_CONFIG} \
+ --enable-amulecmd \
+ $(use_enable debug) \
+ $(use_enable !debug optimize) \
+ $(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} || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ 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/amule-2.3.1-gcc47.patch b/net-p2p/amule/files/amule-2.3.1-gcc47.patch
new file mode 100644
index 000000000000..e776dda3240e
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.1-gcc47.patch
@@ -0,0 +1,21 @@
+# http://code.google.com/p/amule/source/detail?r=10772
+diff -ur aMule-2.3.1.orig//src/ObservableQueue.h aMule-2.3.1/src/ObservableQueue.h
+--- aMule-2.3.1.orig//src/ObservableQueue.h 2012-04-22 19:40:05.560084120 +0200
++++ aMule-2.3.1/src/ObservableQueue.h 2012-04-22 19:40:32.479085322 +0200
+@@ -331,14 +331,14 @@
+ template <typename ValueType>
+ void CObservableQueue<ValueType>::ObserverAdded( ObserverType* o )
+ {
+- NotifyObservers( EventType( EventType::STARTING ), o );
++ this->NotifyObservers( EventType( EventType::STARTING ), o );
+ }
+
+
+ template <typename ValueType>
+ void CObservableQueue<ValueType>::ObserverRemoved( ObserverType* o )
+ {
+- NotifyObservers( EventType( EventType::STOPPING ), o );
++ this->NotifyObservers( EventType( EventType::STOPPING ), o );
+ }
+
+ \ No newline at end of file
diff --git a/net-p2p/amule/files/amuled.confd b/net-p2p/amule/files/amuled.confd
new file mode 100644
index 000000000000..c17b21e611e9
--- /dev/null
+++ b/net-p2p/amule/files/amuled.confd
@@ -0,0 +1,13 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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..9b83458b380a
--- /dev/null
+++ b/net-p2p/amule/files/amuled.initd
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+ env HOME="${AMULEHOME}" start-stop-daemon --start \
+ --quiet --background \
+ --make-pidfile --pidfile /var/run/amuled.pid \
+ -c ${AMULEUSER} \
+ -x /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 --oknodo --stop --pidfile /var/run/amuled.pid &>/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..5453a4611bf3
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.confd
@@ -0,0 +1,28 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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..0484780093a2
--- /dev/null
+++ b/net-p2p/amule/files/amuleweb.initd
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+ env HOME="${AMULEHOME}" start-stop-daemon --start \
+ --quiet -b \
+ --make-pidfile --pidfile /var/run/amuleweb.pid \
+ -c ${AMULEUSER} \
+ -x /usr/bin/amuleweb -- ${OPTIONS} &>${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 --oknodo --stop --pidfile /var/run/amuleweb.pid &>/dev/null
+ eend $?
+}
+
diff --git a/net-p2p/amule/metadata.xml b/net-p2p/amule/metadata.xml
new file mode 100644
index 000000000000..ffff80acce27
--- /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>
+ <herd>net-p2p</herd>
+ <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/bitcoin-cli/Manifest b/net-p2p/bitcoin-cli/Manifest
new file mode 100644
index 000000000000..a0ae78b4789b
--- /dev/null
+++ b/net-p2p/bitcoin-cli/Manifest
@@ -0,0 +1,10 @@
+DIST bitcoin-0.10.0.ljr20150311.patches.tar.xz 34836 SHA256 353b82a933d234daaaed3f807f940a701646c7c9669867fbf5cdb48a1065312c SHA512 dc2a24f141d591f288e846f29a3263dea463f77dda22b92f91e781a8500c695be8b6f497251b6c960e1acdf43e839a7f0bc06fb7a18cdbda90b3d6a61f21c4af WHIRLPOOL 3b898c529e7967750dabcbb235657c19bab0ce75b6f47017ae7bdc7943acb8001cc19eff2d319e1ad405037ecf0674759a575116b1b0c1f32fde89a98f0052a3
+DIST bitcoin-0.10.1.ljr20150428.patches.tar.xz 34980 SHA256 f3770c478bd541fcc75c1f64664ae810aa67da7535f11859034dcc7067546713 SHA512 edf7c8aa81c8890da61224eddde61cec62058514fa76a50ab25cc7db272f6c656f5c46f8b9468f6059eb7c1be624de834867c0a7c1c2559a5231b763e40c13a2 WHIRLPOOL 2b8d878bf3d599393da177403e2199e63bb2634d14438079b5c8821c07441e26fb8b5cd150281c9923534f474763d9f3c2cab9424ab7a319de059c1b3bb49c4e
+DIST bitcoin-0.11.0.ljr20150711.patches.tar.xz 79740 SHA256 2f9608ee18f10fccaeda239baf82fd74180a562eb92aec72f7959c7211228bbb SHA512 cafa5cf0b7a56894b07e949bb401016c46456f6043da86f54023f930e9836a420c88ca9e94067edcf2150495cb637b1938478332f7f7669394ea90351f3b4623 WHIRLPOOL 1bab46c50b7bc8709359ea98a9a75f4b476dd81540421f6696b4085f4acf8fd3d040e591230df1f83625ada89d0d178040f747ae02f76d1dd73787c86e73dac4
+DIST bitcoin-0.9.3.ljr20141002.patch.xz 23320 SHA256 d0a480e11159d597a36e300398c858b5713de78d4f00295b46aa6612ed4b28cc SHA512 b6f225c1e6fc4b1b0b53084d62ff6a57af3b45ea48064fb790b51a081bd1a2333ad5ebffdd443da47babac76ca7394d3ccb645fb3e5e532252409de32a3cb768 WHIRLPOOL 2cdb0a3e3b8407ef11a9f6a56c47ca51c38eb7adbf1b0ceaf1b7fec00118a75892782f66a4c85e54f43e3a3107d1b4e3c799eb1171dff8eb9db69d162cde650a
+DIST bitcoin-cli-manpage-v0.11.0rc3.1 1609 SHA256 868d35484d12a649c3ceb5797abf915c4110393fb33b34509793ae0717963b9e SHA512 296006670bf64c54c408803244eed9db77fe96d1d3f642fb63442838fb4f086c50518d32f44f642a84757bfdf5f041fa6fc98f1e07d48739e41c1049a19b7666 WHIRLPOOL f63e632cb1ad82b4536cff7a04d55c55e981d6cc8e9cd2199e08a3267e4692dd7e732ccb0e66d08657c428a569046a0abc6fac9eec82ba6b997bd41fc96865a7
+DIST bitcoin-v0.10.0.tgz 5022212 SHA256 ecff92e184fac4a96684085590a67554a27db72d0ac235b7cc054887644c0b70 SHA512 f362a9d4ba405c02b2d01024a61b68f984dd6e441ef2254d05bf65cfe803c8b084bd3b14a76a3472251d96087e450091f95f26a691c248836c6d0b43dece8255 WHIRLPOOL 2185413c6d073b0dcb30001c8fb56301390206680ffc6d705ed99e102e68e5c4c1d08c495c38703631696fa9a4a3784befd71acfbec0e94b164bbbfde76158c3
+DIST bitcoin-v0.10.1.tgz 5053846 SHA256 51bff5ba2372ca53782c5fec3d9b4b4226e94b5ac0b1b4b2b5949b97082af256 SHA512 f89330b93f22ba5f393c9a7a48ce28196be0e16468e5d99c459e889c458cc3a7c3f6e4537996571aa8ccb0ebb2eedf80ad028da136a2e08e2f8631f69ac5f2fc WHIRLPOOL 0cfb182f355151cde75601d2260cc92801e2dc1231ae2fca67610e699bb5f0cae826b09f456ca8afa283730954f11a8b180f43ae5a5297d129093fc0f9f53b4e
+DIST bitcoin-v0.10.2-r1.tgz 5076702 SHA256 9bee2b9fe0c236f9f75bfc05c59df238c9424cbcffe4483db5009c5aaff8881b SHA512 5650dc281c749a6057d2dc29d61909619d680ace8c74c41df1581ef56e98950cb42bf4ea2c37264f00090cfa7762f2539f433c8117228484cd7628d397aa69fa WHIRLPOOL 02c2e74748c7572fa3968fc132d561323e33e6aadc07744bd06567abdddd3c7871afe6b46d30fc3389d92246c705454db708dd05946e93e3a93ad5d3b89a327b
+DIST bitcoin-v0.11.0.tgz 5898627 SHA256 a52cb63e96a13626243c78662ea659c90277728b8f40d27846e82fdf81ce58e3 SHA512 bf1e05e115ecc375bfe9e342bf65db74784926e599a05f42f33b43781775d0469826228876269fcdc8a469bce45cb3dd4513e1f9dda5d36cc40adbb9aaf6f054 WHIRLPOOL ca2f3feb9815ad9bfac0b573bc0a3a7bb55bb7467724d84a6baf6a469983625727bb0fd01722a0be74e2df0a29833aadc152d036819be660270733b57089e9bf
+DIST bitcoin-v0.9.3.tgz 4788997 SHA256 3ed92e8323cb4187cae015457c7c5920a5c658438f01c6c45f0ce3aabf9bd428 SHA512 cf6ff5bc586b0614b4e74e1c18b30e8f443f03db348382492e49c70ec31a0ef3a4d1989b34a8fdce289788c894b48b72b94d2562e497220453b668dc28ce0d66 WHIRLPOOL 6ce18de9a2b24cedd88e110088d0747452f8403b6239df9212b673e4a893e059bdea2640b13b6fde659a866d4a6a3b4fa62dde3adbf957b80104d41c0e4aeb18
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.10.0-r1.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.0-r1.ebuild
new file mode 100644
index 000000000000..99db4e09dbcb
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.0-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="047a89831760ff124740fe9f58411d57ee087078"
+BITCOINCORE_LJR_DATE="20150311"
+BITCOINCORE_IUSE=""
+inherit bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ bitcoincore_prepare
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --enable-util-cli
+}
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.10.1.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.1.ebuild
new file mode 100644
index 000000000000..d157b6b2aa88
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d8ac90184254fea3a7f4991fd0529dfbd750aea0"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE=""
+inherit bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+src_prepare() {
+ bitcoincore_prepare
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ bitcoincore_conf \
+ --enable-util-cli
+}
diff --git a/net-p2p/bitcoin-cli/bitcoin-cli-0.10.2.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.2.ebuild
new file mode 100644
index 000000000000..ce3e7b3b7e9a
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.10.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="16f45600c8c372a738ffef544292864256382601"
+BITCOINCORE_SRC_SUFFIX="-r1"
+BITCOINCORE_LJR_PV="0.10.1"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE=""
+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 ~x86 ~amd64-linux ~x86-linux"
+SRC_URI="${SRC_URI}
+ https://raw.githubusercontent.com/bitcoin/bitcoin/v0.11.0rc3/contrib/debian/manpages/bitcoin-cli.1 -> bitcoin-cli-manpage-v0.11.0rc3.1"
+
+src_prepare() {
+ sed -i 's/have bitcoind &&//;s/^\(complete -F _bitcoind \)bitcoind \(bitcoin-cli\)$/\1\2/' contrib/bitcoind.bash-completion
+ cp "${DISTDIR}/bitcoin-cli-manpage-v0.11.0rc3.1" contrib/debian/manpages/bitcoin-cli.1
+ 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.11.0.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.11.0.ebuild
new file mode 100644
index 000000000000..c1a252c99807
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.11.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d26f951802c762de04fb68e1a112d611929920ba"
+BITCOINCORE_LJR_DATE="20150711"
+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 ~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
+ 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.9.3.ebuild b/net-p2p/bitcoin-cli/bitcoin-cli-0.9.3.ebuild
new file mode 100644
index 000000000000..5d8a93ddddd0
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-0.9.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+MyPV="${PV/_/}"
+MyPN="bitcoin"
+MyP="${MyPN}-${MyPV}"
+LJR_PV="${PV}.ljr20141002"
+LJR_PATCH="bitcoin-${LJR_PV}.patch"
+
+DESCRIPTION="Command-line JSON-RPC client specifically designed for talking to Bitcoin Core Daemon"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyPN}-v${PV}.tgz
+ http://luke.dashjr.org/programs/bitcoin/files/bitcoind/luke-jr/0.9.x/${LJR_PV}/${LJR_PATCH}.xz
+"
+
+LICENSE="MIT ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="
+ >=dev-libs/boost-1.52.0[threads(+)]
+ dev-libs/openssl:0[-bindist]
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MyP}"
+
+src_prepare() {
+ epatch "${WORKDIR}/${LJR_PATCH}"
+ rm -r src/leveldb
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-ccache \
+ --without-miniupnpc \
+ --disable-tests \
+ --disable-wallet \
+ --without-daemon \
+ --without-gui
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/README.md doc/release-notes.md
+ dodoc doc/assets-attribution.md doc/tor.md
+}
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..4904ce462a32
--- /dev/null
+++ b/net-p2p/bitcoin-cli/bitcoin-cli-9999.ebuild
@@ -0,0 +1,25 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_NO_SYSLIBS=1
+BITCOINCORE_IUSE=""
+inherit bitcoincore
+
+DESCRIPTION="Command-line JSON-RPC 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
+ 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..c25ea048b4e3
--- /dev/null
+++ b/net-p2p/bitcoin-cli/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name='ljr'>Enable Luke Dashjr's patches</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest
new file mode 100644
index 000000000000..2b26496b593c
--- /dev/null
+++ b/net-p2p/bitcoin-qt/Manifest
@@ -0,0 +1,9 @@
+DIST bitcoin-0.10.1.ljr20150428.patches.tar.xz 34980 SHA256 f3770c478bd541fcc75c1f64664ae810aa67da7535f11859034dcc7067546713 SHA512 edf7c8aa81c8890da61224eddde61cec62058514fa76a50ab25cc7db272f6c656f5c46f8b9468f6059eb7c1be624de834867c0a7c1c2559a5231b763e40c13a2 WHIRLPOOL 2b8d878bf3d599393da177403e2199e63bb2634d14438079b5c8821c07441e26fb8b5cd150281c9923534f474763d9f3c2cab9424ab7a319de059c1b3bb49c4e
+DIST bitcoin-0.11.0.ljr20150711.patches.tar.xz 79740 SHA256 2f9608ee18f10fccaeda239baf82fd74180a562eb92aec72f7959c7211228bbb SHA512 cafa5cf0b7a56894b07e949bb401016c46456f6043da86f54023f930e9836a420c88ca9e94067edcf2150495cb637b1938478332f7f7669394ea90351f3b4623 WHIRLPOOL 1bab46c50b7bc8709359ea98a9a75f4b476dd81540421f6696b4085f4acf8fd3d040e591230df1f83625ada89d0d178040f747ae02f76d1dd73787c86e73dac4
+DIST bitcoin-rbf-v0.10.2-r1.patch 26987 SHA256 a5dcd50134fe9872c0460746da2d743864525a775150304473a5588aa6c516e6 SHA512 2e88d185dd8d5845a7286dda130ab6d73328a09f7623387d68437be5e655e9657a1e392e9c6a0004856127738f340a77283206a0a8183f2ee9407ddf43328e7f WHIRLPOOL 39ffca7486964eb25f5de4ccfc4a1aff4078b1a08d907300ea06f51189bdb0c6514dbd9565ce615de6d776bf01faa1dabae5cb0c4628ef8d3dd686f6300c037a
+DIST bitcoin-rbf-v0.10.2.patch 25171 SHA256 2610cca0d758c502b71a13184643fe00c9dcb7a2b258f943f33a4534ec1f6cd5 SHA512 855e5e497a371b1e503ab5a0c1fbdb7cb3c30c318b19c32c220d8e6e0b2ae06ca6e63ac27fcb23b51b01c5573c6ea94417ec9d395174ae4f01ad9a0ed4c28c51 WHIRLPOOL 9e67a1d03eb7e40431623818230f2c94e811402a5da6f36dd950cc8a92cc76797ba770c3586ff88477d74b7ee21c9b93704ccead7b489678911dda1394f34fda
+DIST bitcoin-rbf-v0.11.0rc3.patch 27178 SHA256 976e3007121a69630b74c6106f41ebc48b97476ac647e0872d3aaa08a64ec52f SHA512 dc1c46b731dd78bbcb2e7b066dd74aaf0adf39c672847349ed7ebf00012481d3105cebc753dd3bccbe0c35c49bf9dc1546cc8e4d0cc5509d449115e53e91fcc2 WHIRLPOOL de7bd2c1a45369baeac8e311fcd3f9b37e6ab84b99362bb05a5f3f8d6990ea2ad5f509b389b0962bf679ced9dca70c0825e35ae02d97b389101108d2d80be589
+DIST bitcoin-v0.10.2-r1.tgz 5076702 SHA256 9bee2b9fe0c236f9f75bfc05c59df238c9424cbcffe4483db5009c5aaff8881b SHA512 5650dc281c749a6057d2dc29d61909619d680ace8c74c41df1581ef56e98950cb42bf4ea2c37264f00090cfa7762f2539f433c8117228484cd7628d397aa69fa WHIRLPOOL 02c2e74748c7572fa3968fc132d561323e33e6aadc07744bd06567abdddd3c7871afe6b46d30fc3389d92246c705454db708dd05946e93e3a93ad5d3b89a327b
+DIST bitcoin-v0.10.2.tgz 5053846 SHA256 51bff5ba2372ca53782c5fec3d9b4b4226e94b5ac0b1b4b2b5949b97082af256 SHA512 f89330b93f22ba5f393c9a7a48ce28196be0e16468e5d99c459e889c458cc3a7c3f6e4537996571aa8ccb0ebb2eedf80ad028da136a2e08e2f8631f69ac5f2fc WHIRLPOOL 0cfb182f355151cde75601d2260cc92801e2dc1231ae2fca67610e699bb5f0cae826b09f456ca8afa283730954f11a8b180f43ae5a5297d129093fc0f9f53b4e
+DIST bitcoin-v0.11.0.tgz 5898627 SHA256 a52cb63e96a13626243c78662ea659c90277728b8f40d27846e82fdf81ce58e3 SHA512 bf1e05e115ecc375bfe9e342bf65db74784926e599a05f42f33b43781775d0469826228876269fcdc8a469bce45cb3dd4513e1f9dda5d36cc40adbb9aaf6f054 WHIRLPOOL ca2f3feb9815ad9bfac0b573bc0a3a7bb55bb7467724d84a6baf6a469983625727bb0fd01722a0be74e2df0a29833aadc152d036819be660270733b57089e9bf
+DIST bitcoinxt-v0.10.2.patch 72007 SHA256 f2694f976803dfd8cba11cddd6ee2bdd441737d9b82c9d7550f0f362603223b5 SHA512 6b993859b07d28ed8eac79711c0580d29267c1158838772970fe22e88d68f42f46758494e4430b9470ad529e05b24a936052bbb6747c04b54aa8a95694442747 WHIRLPOOL bbf0904cb06f547976edca2f36f49b1352d4c3e99798b19d45f5c34a74167c8db86017c9fdbaca90f3b7de38ece5f3c527e67e97ccbffdd99abd840f6cd335e4
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild
new file mode 100644
index 000000000000..b281629c2fec
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2-r1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="16f45600c8c372a738ffef544292864256382601"
+BITCOINCORE_SRC_SUFFIX="-r1"
+BITCOINCORE_LJR_PV="0.10.1"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE="1stclassmsg dbus kde ljr +qrcode qt4 qt5 test upnp +wallet xt zeromq"
+BITCOINCORE_POLICY_PATCHES="cpfp dcmp rbf spamfilter"
+LANGS="ach af_ZA ar be_BY bg bs ca ca@valencia ca_ES cmn cs cy da de el_GR en eo es es_CL es_DO es_MX es_UY et eu_ES fa fa_IR fi fr fr_CA gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_HK zh_CN 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 GPL-3 LGPL-2.1 || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/linguist-tools:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls src/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 'src/qt/bitcoin_locale.qrc'
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ # NOTE: --enable-zmq actually disables it
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ $(usex 1stclassmsg --enable-first-class-messaging '') \
+ --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/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.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/bitcoin-qt/bitcoin-qt-0.10.2.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild
new file mode 100644
index 000000000000..39ef0c9a1ddc
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.10.2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d8ac90184254fea3a7f4991fd0529dfbd750aea0"
+BITCOINCORE_LJR_PV="0.10.1"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE="1stclassmsg dbus kde ljr +qrcode qt4 qt5 test upnp +wallet xt zeromq"
+BITCOINCORE_POLICY_PATCHES="cpfp dcmp rbf spamfilter"
+LANGS="ach af_ZA ar be_BY bg bs ca ca@valencia ca_ES cmn cs cy da de el_GR en eo es es_CL es_DO es_MX es_UY et eu_ES fa fa_IR fi fr fr_CA gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_HK zh_CN 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 GPL-3 LGPL-2.1 || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/linguist-tools:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang=
+
+ 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 $(ls src/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 'src/qt/bitcoin_locale.qrc'
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ if has_version '>=dev-libs/leveldb-1.18-r1'; then
+ # Newer leveldb has changed header location.
+ sed -i \
+ -e '/#include/s:memenv.h:leveldb/helpers/memenv.h:' \
+ src/leveldbwrapper.cpp || die
+ fi
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ # NOTE: --enable-zmq actually disables it
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ $(usex 1stclassmsg --enable-first-class-messaging '') \
+ --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/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.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/bitcoin-qt/bitcoin-qt-0.11.0.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild
new file mode 100644
index 000000000000..62d8fa927a1e
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.11.0.ebuild
@@ -0,0 +1,102 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d26f951802c762de04fb68e1a112d611929920ba"
+BITCOINCORE_LJR_DATE="20150711"
+BITCOINCORE_IUSE="dbus kde ljr +qrcode qt4 qt5 test upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="cltv cpfp rbf spamfilter"
+LANGS="ach af_ZA ar be_BY bg bs ca ca@valencia ca_ES cmn cs cy da de el_GR en eo es es_CL es_DO es_MX es_UY et eu_ES fa fa_IR fi fr fr_CA gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_HK zh_CN 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/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/linguist-tools:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang=
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in $(ls src/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 'src/qt/bitcoin_locale.qrc'
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
+ 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
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.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/bitcoin-qt/bitcoin-qt-9999.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild
new file mode 100644
index 000000000000..8fe80587ffad
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-9999.ebuild
@@ -0,0 +1,99 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_IUSE="dbus kde +qrcode qt4 qt5 test upnp +wallet"
+LANGS="ach af_ZA ar be_BY bg bs ca ca@valencia ca_ES cmn cs cy da de el_GR en eo es es_CL es_DO es_MX es_UY et eu_ES fa fa_IR fi fr fr_CA gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_HK 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/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/linguist-tools:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="${REQUIRED_USE} ^^ ( qt4 qt5 )"
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang=
+
+ 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 $(ls src/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 'src/qt/bitcoin_locale.qrc'
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include'
+ 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
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.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/bitcoin-qt/files/0.8-openssl-101k.patch b/net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch
new file mode 100644
index 000000000000..5eaaba9a5788
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 75114c6..7fcb17d 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -376,11 +376,23 @@ bool CKey::SetCompactSignature(uint256 hash, const std::vector<unsigned char>& v
+
+ bool CKey::Verify(uint256 hash, const std::vector<unsigned char>& vchSig)
+ {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+
+- return true;
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool CKey::VerifyCompact(uint256 hash, const std::vector<unsigned char>& vchSig)
diff --git a/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch
new file mode 100644
index 000000000000..92f803f4e4f1
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch
@@ -0,0 +1,183 @@
+diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
+index cf80986..520b5df 100644
+--- a/bitcoin-qt.pro
++++ b/bitcoin-qt.pro
+@@ -4,7 +4,7 @@ macx:TARGET = "Bitcoin-Qt"
+ VERSION = 0.8.0
+ 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 @@ 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 b41764f..f71e801 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>
++#ifndef LEVELDB_WITHOUT_MEMENV
+ #include <memenv/memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -42,8 +44,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 081edaf..1735b89 100644
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -104,8 +104,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 \
+@@ -114,7 +113,6 @@ OBJS= \
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -134,24 +132,43 @@ OBJS= \
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.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: bitcoind
+
+ test check: test_bitcoin FORCE
+ ./test_bitcoin
+
++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
+@@ -162,26 +179,28 @@ 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)
+
+-bitcoind: $(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))
++bitcoind: $(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)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_bitcoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
diff --git a/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch b/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch
new file mode 100644
index 000000000000..80f64887425b
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 5b261bb..a845ba1 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -227,10 +227,23 @@ public:
+ }
+
+ bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+- return true;
++
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
diff --git a/net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 000000000000..60e9f2b20941
--- /dev/null
+++ b/net-p2p/bitcoin-qt/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/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch b/net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch
new file mode 100644
index 000000000000..35194662ecd2
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch
@@ -0,0 +1,12 @@
+diff --git a/src/script.cpp b/src/script.cpp
+index 24bbbad..a60d8b6 100644
+--- a/src/script.cpp
++++ b/src/script.cpp
+@@ -1870,6 +1870,7 @@ bool fIsBareMultisigStd = false;
+
+ const char *CScript::IsBlacklisted() const
+ {
++ return false;
+ if (this->size() >= 7 && this->at(0) == OP_DUP)
+ {
+ // pay-to-pubkeyhash
diff --git a/net-p2p/bitcoin-qt/files/9999-sys_libsecp256k1.patch b/net-p2p/bitcoin-qt/files/9999-sys_libsecp256k1.patch
new file mode 100644
index 000000000000..77ed10675e30
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/9999-sys_libsecp256k1.patch
@@ -0,0 +1,80 @@
+diff --git a/configure.ac b/configure.ac
+index 6784521..3598bab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -634,6 +634,12 @@ AC_ARG_WITH([daemon],
+
+ BITCOIN_QT_INIT
+
++PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true])
++AC_ARG_WITH([libsecp256k1-verify],[],[use_libsecp256k1=$withval],[use_libsecp256k1=yes])
++if test "x$use_libsecp256k1" = "xyes"; then
++ AC_DEFINE(USE_SECP256K1,1,[USE_SECP256K1])
++fi
++
+ if test x$use_pkgconfig = xyes; then
+
+ if test x"$PKG_CONFIG" = "x"; then
+@@ -869,9 +875,6 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+ unset PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
+-ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
+-AC_CONFIG_SUBDIRS([src/secp256k1])
+-
+ AC_OUTPUT
+
+ dnl Taken from https://wiki.debian.org/RpathIssue
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 0d45203..3a44a16 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,3 @@
+-DIST_SUBDIRS = secp256k1
+ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+
+
+@@ -20,7 +19,7 @@ endif
+ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
+ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
+
+-BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
++BITCOIN_INCLUDES += $(libsecp256k1_CFLAGS)
+
+ LIBBITCOIN_SERVER=libbitcoin_server.a
+ LIBBITCOIN_WALLET=libbitcoin_wallet.a
+@@ -30,10 +29,7 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+ LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
+ LIBBITCOINQT=qt/libbitcoinqt.a
+-LIBSECP256K1=secp256k1/libsecp256k1.la
+-
+-$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++LIBSECP256K1=$(libsecp256k1_LIBS)
+
+ # Make is not made aware of per-object dependencies to avoid limiting building parallelization
+ # But to build the less dependent modules first, we manually select their order here:
+@@ -364,7 +360,7 @@ libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
+ libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
+ libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
+ if USE_LIBSECP256K1
+-libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la
++libbitcoinconsensus_la_LIBADD += $(LIBSECP256K1)
+ endif
+ endif
+
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index 5fd2afe..014092a 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -104,9 +104,6 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
+ bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
+-check-local:
+- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
+-
+ %.json.h: %.json
+ @$(MKDIR_P) $(@D)
+ @echo "namespace json_tests{" > $@
diff --git a/net-p2p/bitcoin-qt/files/9999-syslibs.patch b/net-p2p/bitcoin-qt/files/9999-syslibs.patch
new file mode 100644
index 000000000000..2cdf2ab9837b
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/9999-syslibs.patch
@@ -0,0 +1,243 @@
+diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4
+index 66f106c..5f0a3b1 100644
+--- a/build-aux/m4/bitcoin_subdir_to_include.m4
++++ b/build-aux/m4/bitcoin_subdir_to_include.m4
+@@ -5,7 +5,7 @@ AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
+ AC_MSG_RESULT([default])
+ else
+ echo "#include <$2$3.h>" >conftest.cpp
+- newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
++ newinclpath=$(${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | sed [-E -e ':a' -e '/\\$/!b b' -e N -e 's/\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\]|\\.)*[[:space:]])*(([^[:space:]\]|\\.)*)]$3\.h[([[:space:]].*)?$/\3/' -e 't' -e d])
+ AC_MSG_RESULT([${newinclpath}])
+ if test "x${newinclpath}" != "x"; then
+ eval "$1=\"\$$1\"' -I${newinclpath}'"
+diff --git a/configure.ac b/configure.ac
+index 37fe47e..14e5c34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -170,6 +170,18 @@ AC_ARG_WITH([utils],
+ [build_bitcoin_utils=$withval],
+ [build_bitcoin_utils=yes])
+
++AC_ARG_ENABLE([util-cli],
++ [AS_HELP_STRING([--enable-util-cli],
++ [build bitcoin-cli])],
++ [build_bitcoin_cli=$enableval],
++ [build_bitcoin_cli=$build_bitcoin_utils])
++
++AC_ARG_ENABLE([util-tx],
++ [AS_HELP_STRING([--enable-util-tx],
++ [build bitcoin-tx])],
++ [build_bitcoin_tx=$enableval],
++ [build_bitcoin_tx=$build_bitcoin_utils])
++
+ AC_ARG_WITH([libs],
+ [AS_HELP_STRING([--with-libs],
+ [build libraries (default=yes)])],
+@@ -488,14 +500,65 @@ if test x$use_reduce_exports = xyes; then
+ [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
+ fi
+
++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=
++ AC_CHECK_LIB([leveldb],[main],[
++ LIBLEVELDB=-lleveldb
++ ],[
++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ TEMP_LIBS="$LIBS"
++ LIBS="$LIBS $LIBLEVELDB"
++ AC_CHECK_LIB([memenv],[main],[
++ LIBMEMENV=-lmemenv
++ ],[
++ AC_MSG_ERROR([LevelDB's memenv library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ LIBS="$TEMP_LIBS"
++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[
++ AC_MSG_CHECKING([for memenv.h path])
++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv])
++ ],[
++ AC_CHECK_HEADER([memenv.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ ])
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
+
++dnl Check for libsecp256k1, only if explicitly requested
++AC_ARG_WITH([system-libsecp256k1],
++ [AS_HELP_STRING([--with-system-libsecp256k1],
++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_libsecp256k1=$withval],
++ [system_libsecp256k1=no]
++)
++if test x$system_libsecp256k1 != xno; then
++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true])
++else
++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include'
++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la'
++fi
++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno])
++AC_SUBST(libsecp256k1_CFLAGS)
++AC_SUBST(libsecp256k1_LIBS)
++
+ if test x$enable_wallet != xno; then
+ dnl Check for libdb_cxx only if wallet enabled
+ BITCOIN_FIND_BDB48
+@@ -515,7 +578,7 @@ BITCOIN_QT_INIT
+ dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
+ BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
+
+-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
+ use_boost=no
+ else
+ use_boost=yes
+@@ -701,9 +764,13 @@ AC_MSG_CHECKING([whether to build bitcoind])
+ AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
+ AC_MSG_RESULT($build_bitcoind)
+
+-AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
+-AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
+-AC_MSG_RESULT($build_bitcoin_utils)
++AC_MSG_CHECKING([whether to build bitcoin-cli])
++AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
++AC_MSG_RESULT($build_bitcoin_cli)
++
++AC_MSG_CHECKING([whether to build bitcoin-tx])
++AM_CONDITIONAL([BUILD_BITCOIN_TX], [test x$build_bitcoin_tx = xyes])
++AC_MSG_RESULT($build_bitcoin_tx)
+
+ AC_MSG_CHECKING([whether to build libraries])
+ AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
+@@ -826,7 +893,7 @@ else
+ AC_MSG_RESULT([no])
+ fi
+
+-if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononononono; then
+ AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
+ fi
+
+@@ -895,8 +962,10 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+ unset PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
++if test x$system_libsecp256k1 = xno; then
+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no"
+ AC_CONFIG_SUBDIRS([src/secp256k1])
++fi
+
+ AC_OUTPUT
+
+diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
+index 9b31865..5bb187c 100755
+--- a/qa/pull-tester/rpc-tests.sh
++++ b/qa/pull-tester/rpc-tests.sh
+@@ -57,7 +57,7 @@ testScriptsExt=(
+ extArg="-extended"
+ passOn=${@#$extArg}
+
+-if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
++if [ "x${ENABLE_BITCOIND}${ENABLE_CLI}${ENABLE_WALLET}" = "x111" ]; then
+ for (( i = 0; i < ${#testScripts[@]}; i++ ))
+ do
+ if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
+diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in
+index 10f4d33..e0e407d 100755
+--- a/qa/pull-tester/tests-config.sh.in
++++ b/qa/pull-tester/tests-config.sh.in
+@@ -8,7 +8,7 @@ EXEEXT="@EXEEXT@"
+
+ # These will turn into comments if they were disabled when configuring.
+ @ENABLE_WALLET_TRUE@ENABLE_WALLET=1
+-@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
++@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=1
+ @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
+
+ REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1c2f770..4d60ddf 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,6 @@
++if EMBEDDED_LIBSECP256K1
+ DIST_SUBDIRS = secp256k1
++endif
+ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+
+
+@@ -20,7 +22,7 @@ endif
+ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
+ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
+
+-BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
++BITCOIN_INCLUDES += $(libsecp256k1_CFLAGS)
+
+ LIBBITCOIN_SERVER=libbitcoin_server.a
+ LIBBITCOIN_WALLET=libbitcoin_wallet.a
+@@ -30,10 +32,16 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+ LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
+ LIBBITCOINQT=qt/libbitcoinqt.a
++if EMBEDDED_LIBSECP256K1
+ LIBSECP256K1=secp256k1/libsecp256k1.la
++else
++LIBSECP256K1=$(libsecp256k1_LIBS)
++endif
+
++if EMBEDDED_LIBSECP256K1
+ $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++endif
+
+ # Make is not made aware of per-object dependencies to avoid limiting building parallelization
+ # But to build the less dependent modules first, we manually select their order here:
+@@ -63,8 +71,11 @@ if BUILD_BITCOIND
+ bin_PROGRAMS += bitcoind
+ endif
+
+-if BUILD_BITCOIN_UTILS
+- bin_PROGRAMS += bitcoin-cli bitcoin-tx
++if BUILD_BITCOIN_CLI
++ bin_PROGRAMS += bitcoin-cli
++endif
++if BUILD_BITCOIN_TX
++ bin_PROGRAMS += bitcoin-tx
+ endif
+
+ .PHONY: FORCE
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index 0997148..14b4deb 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -111,10 +111,12 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
+ bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
++if EMBEDDED_LIBSECP256K1
+ check-local:
+ @echo "Running test/bitcoin-util-test.py..."
+ $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
++endif
+
+ %.json.h: %.json
+ @$(MKDIR_P) $(@D)
diff --git a/net-p2p/bitcoin-qt/metadata.xml b/net-p2p/bitcoin-qt/metadata.xml
new file mode 100644
index 000000000000..fd52a3262863
--- /dev/null
+++ b/net-p2p/bitcoin-qt/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name='1stclassmsg'>Enable first-class Bitcoin message tools</flag>
+ <flag name='bitcoin_policy_cltv'>Check LockTime Verify policy: Your node will recognise and assist OP_CHECKLOCKTIMEVERIFY (BIP65) transactions</flag>
+ <flag name='bitcoin_policy_cpfp'>Child-Pays-For-Parent policy: If you mine, you will give consideration to child transaction fees to pay for their parents</flag>
+ <flag name='bitcoin_policy_dcmp'>Data Carrier Multi-Push policy: Your node will assist transactions with multiple pushes in their data carrier (if any)</flag>
+ <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='ljr'>Enable Luke Dashjr's patches</flag>
+ <flag name='qrcode'>Enable generation of QR Codes for receiving payments</flag>
+ <flag name='upnp'>Enable Universal Plug and Play</flag>
+ <flag name='wallet'>Enable wallet support</flag>
+ <flag name='xt'>Enable Mike Hearn's Bitcoin XT patches</flag>
+ <flag name='zeromq'>Report blocks and transactions via zeromq</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/bitcoind/Manifest b/net-p2p/bitcoind/Manifest
new file mode 100644
index 000000000000..2b26496b593c
--- /dev/null
+++ b/net-p2p/bitcoind/Manifest
@@ -0,0 +1,9 @@
+DIST bitcoin-0.10.1.ljr20150428.patches.tar.xz 34980 SHA256 f3770c478bd541fcc75c1f64664ae810aa67da7535f11859034dcc7067546713 SHA512 edf7c8aa81c8890da61224eddde61cec62058514fa76a50ab25cc7db272f6c656f5c46f8b9468f6059eb7c1be624de834867c0a7c1c2559a5231b763e40c13a2 WHIRLPOOL 2b8d878bf3d599393da177403e2199e63bb2634d14438079b5c8821c07441e26fb8b5cd150281c9923534f474763d9f3c2cab9424ab7a319de059c1b3bb49c4e
+DIST bitcoin-0.11.0.ljr20150711.patches.tar.xz 79740 SHA256 2f9608ee18f10fccaeda239baf82fd74180a562eb92aec72f7959c7211228bbb SHA512 cafa5cf0b7a56894b07e949bb401016c46456f6043da86f54023f930e9836a420c88ca9e94067edcf2150495cb637b1938478332f7f7669394ea90351f3b4623 WHIRLPOOL 1bab46c50b7bc8709359ea98a9a75f4b476dd81540421f6696b4085f4acf8fd3d040e591230df1f83625ada89d0d178040f747ae02f76d1dd73787c86e73dac4
+DIST bitcoin-rbf-v0.10.2-r1.patch 26987 SHA256 a5dcd50134fe9872c0460746da2d743864525a775150304473a5588aa6c516e6 SHA512 2e88d185dd8d5845a7286dda130ab6d73328a09f7623387d68437be5e655e9657a1e392e9c6a0004856127738f340a77283206a0a8183f2ee9407ddf43328e7f WHIRLPOOL 39ffca7486964eb25f5de4ccfc4a1aff4078b1a08d907300ea06f51189bdb0c6514dbd9565ce615de6d776bf01faa1dabae5cb0c4628ef8d3dd686f6300c037a
+DIST bitcoin-rbf-v0.10.2.patch 25171 SHA256 2610cca0d758c502b71a13184643fe00c9dcb7a2b258f943f33a4534ec1f6cd5 SHA512 855e5e497a371b1e503ab5a0c1fbdb7cb3c30c318b19c32c220d8e6e0b2ae06ca6e63ac27fcb23b51b01c5573c6ea94417ec9d395174ae4f01ad9a0ed4c28c51 WHIRLPOOL 9e67a1d03eb7e40431623818230f2c94e811402a5da6f36dd950cc8a92cc76797ba770c3586ff88477d74b7ee21c9b93704ccead7b489678911dda1394f34fda
+DIST bitcoin-rbf-v0.11.0rc3.patch 27178 SHA256 976e3007121a69630b74c6106f41ebc48b97476ac647e0872d3aaa08a64ec52f SHA512 dc1c46b731dd78bbcb2e7b066dd74aaf0adf39c672847349ed7ebf00012481d3105cebc753dd3bccbe0c35c49bf9dc1546cc8e4d0cc5509d449115e53e91fcc2 WHIRLPOOL de7bd2c1a45369baeac8e311fcd3f9b37e6ab84b99362bb05a5f3f8d6990ea2ad5f509b389b0962bf679ced9dca70c0825e35ae02d97b389101108d2d80be589
+DIST bitcoin-v0.10.2-r1.tgz 5076702 SHA256 9bee2b9fe0c236f9f75bfc05c59df238c9424cbcffe4483db5009c5aaff8881b SHA512 5650dc281c749a6057d2dc29d61909619d680ace8c74c41df1581ef56e98950cb42bf4ea2c37264f00090cfa7762f2539f433c8117228484cd7628d397aa69fa WHIRLPOOL 02c2e74748c7572fa3968fc132d561323e33e6aadc07744bd06567abdddd3c7871afe6b46d30fc3389d92246c705454db708dd05946e93e3a93ad5d3b89a327b
+DIST bitcoin-v0.10.2.tgz 5053846 SHA256 51bff5ba2372ca53782c5fec3d9b4b4226e94b5ac0b1b4b2b5949b97082af256 SHA512 f89330b93f22ba5f393c9a7a48ce28196be0e16468e5d99c459e889c458cc3a7c3f6e4537996571aa8ccb0ebb2eedf80ad028da136a2e08e2f8631f69ac5f2fc WHIRLPOOL 0cfb182f355151cde75601d2260cc92801e2dc1231ae2fca67610e699bb5f0cae826b09f456ca8afa283730954f11a8b180f43ae5a5297d129093fc0f9f53b4e
+DIST bitcoin-v0.11.0.tgz 5898627 SHA256 a52cb63e96a13626243c78662ea659c90277728b8f40d27846e82fdf81ce58e3 SHA512 bf1e05e115ecc375bfe9e342bf65db74784926e599a05f42f33b43781775d0469826228876269fcdc8a469bce45cb3dd4513e1f9dda5d36cc40adbb9aaf6f054 WHIRLPOOL ca2f3feb9815ad9bfac0b573bc0a3a7bb55bb7467724d84a6baf6a469983625727bb0fd01722a0be74e2df0a29833aadc152d036819be660270733b57089e9bf
+DIST bitcoinxt-v0.10.2.patch 72007 SHA256 f2694f976803dfd8cba11cddd6ee2bdd441737d9b82c9d7550f0f362603223b5 SHA512 6b993859b07d28ed8eac79711c0580d29267c1158838772970fe22e88d68f42f46758494e4430b9470ad529e05b24a936052bbb6747c04b54aa8a95694442747 WHIRLPOOL bbf0904cb06f547976edca2f36f49b1352d4c3e99798b19d45f5c34a74167c8db86017c9fdbaca90f3b7de38ece5f3c527e67e97ccbffdd99abd840f6cd335e4
diff --git a/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild b/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild
new file mode 100644
index 000000000000..dcac723e3ef3
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.10.2-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="16f45600c8c372a738ffef544292864256382601"
+BITCOINCORE_SRC_SUFFIX="-r1"
+BITCOINCORE_LJR_PV="0.10.1"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE="examples ljr logrotate test upnp +wallet xt zeromq"
+BITCOINCORE_POLICY_PATCHES="cpfp dcmp 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 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ logrotate? (
+ app-admin/logrotate
+ )
+"
+DEPEND="${RDEPEND}"
+
+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
+ epatch "${FILESDIR}/0.10.0-openrc-compat.patch"
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ # NOTE: --enable-zmq actually disables it
+ 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/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.10.2.ebuild b/net-p2p/bitcoind/bitcoind-0.10.2.ebuild
new file mode 100644
index 000000000000..90f110d072a4
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.10.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d8ac90184254fea3a7f4991fd0529dfbd750aea0"
+BITCOINCORE_LJR_PV="0.10.1"
+BITCOINCORE_LJR_DATE="20150428"
+BITCOINCORE_IUSE="examples ljr logrotate test upnp +wallet xt zeromq"
+BITCOINCORE_POLICY_PATCHES="cpfp dcmp 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 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ logrotate? (
+ app-admin/logrotate
+ )
+"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ local UG='bitcoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/bitcoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/0.10.0-openrc-compat.patch"
+ bitcoincore_src_prepare
+}
+
+src_configure() {
+ # NOTE: --enable-zmq actually disables it
+ 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/tor.md
+ doman contrib/debian/manpages/{bitcoind.1,bitcoin.conf.5}
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-0.11.0.ebuild b/net-p2p/bitcoind/bitcoind-0.11.0.ebuild
new file mode 100644
index 000000000000..616e33c5d2d3
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-0.11.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="d26f951802c762de04fb68e1a112d611929920ba"
+BITCOINCORE_LJR_DATE="20150711"
+BITCOINCORE_IUSE="examples ljr logrotate test upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="cltv cpfp 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"
+
+RDEPEND="
+ logrotate? (
+ app-admin/logrotate
+ )
+"
+DEPEND="${RDEPEND}"
+
+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
+ 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}
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+}
diff --git a/net-p2p/bitcoind/bitcoind-9999.ebuild b/net-p2p/bitcoind/bitcoind-9999.ebuild
new file mode 100644
index 000000000000..5c38561fd52b
--- /dev/null
+++ b/net-p2p/bitcoind/bitcoind-9999.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+BITCOINCORE_IUSE="examples logrotate test upnp +wallet"
+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=""
+
+RDEPEND="
+ logrotate? (
+ app-admin/logrotate
+ )
+"
+DEPEND="${RDEPEND}"
+
+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
+ 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}
+
+ newbashcomp contrib/${PN}.bash-completion ${PN}
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,qos,spendfrom,tidy_datadir.sh}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/bitcoind.logrotate-r1" bitcoind
+ fi
+}
diff --git a/net-p2p/bitcoind/files/0.10.0-openrc-compat.patch b/net-p2p/bitcoind/files/0.10.0-openrc-compat.patch
new file mode 100644
index 000000000000..a7c31d680ba8
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.10.0-openrc-compat.patch
@@ -0,0 +1,24 @@
+--- contrib/init/bitcoind.openrc 2015-03-03 09:37:59.919728713 +0000
++++ contrib/init/bitcoind.openrc 2015-03-03 09:38:08.109757531 +0000
+@@ -12,9 +12,11 @@
+ BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
+ BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
+ BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
+-BITCOIND_USER=${BITCOIND_USER:-bitcoin}
++BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}}
+ BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
+ BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
++BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
++BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
+
+ name="Bitcoin Core Daemon"
+ description="Bitcoin crypto-currency p2p network daemon"
+@@ -28,7 +30,7 @@
+
+ required_files="${BITCOIND_CONFIGFILE}"
+ start_stop_daemon_args="-u ${BITCOIND_USER} \
+- -N ${BITCOIND_NICE:-0} -w 2000"
++ -N ${BITCOIND_NICE} -w 2000"
+ pidfile="${BITCOIND_PIDFILE}"
+ retry=60
+
diff --git a/net-p2p/bitcoind/files/0.8-openssl-101k.patch b/net-p2p/bitcoind/files/0.8-openssl-101k.patch
new file mode 100644
index 000000000000..5eaaba9a5788
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.8-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 75114c6..7fcb17d 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -376,11 +376,23 @@ bool CKey::SetCompactSignature(uint256 hash, const std::vector<unsigned char>& v
+
+ bool CKey::Verify(uint256 hash, const std::vector<unsigned char>& vchSig)
+ {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+
+- return true;
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool CKey::VerifyCompact(uint256 hash, const std::vector<unsigned char>& vchSig)
diff --git a/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch
new file mode 100644
index 000000000000..2b9ab1a6d67e
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.8.2-sys_leveldb.patch
@@ -0,0 +1,185 @@
+diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
+index cf80986..520b5df 100644
+--- a/bitcoin-qt.pro
++++ b/bitcoin-qt.pro
+@@ -4,7 +4,7 @@ macx:TARGET = "Bitcoin-Qt"
+ VERSION = 0.8.0
+ 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 @@ 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 b41764f..30c524d 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>
+
+@@ -42,8 +44,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 081edaf..27f2199 100644
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -104,8 +104,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 \
+@@ -114,7 +113,6 @@ OBJS= \
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -134,24 +132,43 @@ OBJS= \
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.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: bitcoind
+
+ test check: test_bitcoin FORCE
+ ./test_bitcoin
+
++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)
++DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers/memenv)
+ 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
+@@ -162,26 +179,28 @@ 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)
+
+-bitcoind: $(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))
++bitcoind: $(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)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_bitcoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
diff --git a/net-p2p/bitcoind/files/0.9-openssl-101k.patch b/net-p2p/bitcoind/files/0.9-openssl-101k.patch
new file mode 100644
index 000000000000..80f64887425b
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.9-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 5b261bb..a845ba1 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -227,10 +227,23 @@ public:
+ }
+
+ bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+- return true;
++
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
diff --git a/net-p2p/bitcoind/files/0.9.0-sys_leveldb.patch b/net-p2p/bitcoind/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 000000000000..60e9f2b20941
--- /dev/null
+++ b/net-p2p/bitcoind/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/bitcoind/files/0.9.x-ljr_noblacklist.patch b/net-p2p/bitcoind/files/0.9.x-ljr_noblacklist.patch
new file mode 100644
index 000000000000..35194662ecd2
--- /dev/null
+++ b/net-p2p/bitcoind/files/0.9.x-ljr_noblacklist.patch
@@ -0,0 +1,12 @@
+diff --git a/src/script.cpp b/src/script.cpp
+index 24bbbad..a60d8b6 100644
+--- a/src/script.cpp
++++ b/src/script.cpp
+@@ -1870,6 +1870,7 @@ bool fIsBareMultisigStd = false;
+
+ const char *CScript::IsBlacklisted() const
+ {
++ return false;
+ if (this->size() >= 7 && this->at(0) == OP_DUP)
+ {
+ // pay-to-pubkeyhash
diff --git a/net-p2p/bitcoind/files/9999-syslibs.patch b/net-p2p/bitcoind/files/9999-syslibs.patch
new file mode 100644
index 000000000000..2cdf2ab9837b
--- /dev/null
+++ b/net-p2p/bitcoind/files/9999-syslibs.patch
@@ -0,0 +1,243 @@
+diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4
+index 66f106c..5f0a3b1 100644
+--- a/build-aux/m4/bitcoin_subdir_to_include.m4
++++ b/build-aux/m4/bitcoin_subdir_to_include.m4
+@@ -5,7 +5,7 @@ AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
+ AC_MSG_RESULT([default])
+ else
+ echo "#include <$2$3.h>" >conftest.cpp
+- newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
++ newinclpath=$(${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | sed [-E -e ':a' -e '/\\$/!b b' -e N -e 's/\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\]|\\.)*[[:space:]])*(([^[:space:]\]|\\.)*)]$3\.h[([[:space:]].*)?$/\3/' -e 't' -e d])
+ AC_MSG_RESULT([${newinclpath}])
+ if test "x${newinclpath}" != "x"; then
+ eval "$1=\"\$$1\"' -I${newinclpath}'"
+diff --git a/configure.ac b/configure.ac
+index 37fe47e..14e5c34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -170,6 +170,18 @@ AC_ARG_WITH([utils],
+ [build_bitcoin_utils=$withval],
+ [build_bitcoin_utils=yes])
+
++AC_ARG_ENABLE([util-cli],
++ [AS_HELP_STRING([--enable-util-cli],
++ [build bitcoin-cli])],
++ [build_bitcoin_cli=$enableval],
++ [build_bitcoin_cli=$build_bitcoin_utils])
++
++AC_ARG_ENABLE([util-tx],
++ [AS_HELP_STRING([--enable-util-tx],
++ [build bitcoin-tx])],
++ [build_bitcoin_tx=$enableval],
++ [build_bitcoin_tx=$build_bitcoin_utils])
++
+ AC_ARG_WITH([libs],
+ [AS_HELP_STRING([--with-libs],
+ [build libraries (default=yes)])],
+@@ -488,14 +500,65 @@ if test x$use_reduce_exports = xyes; then
+ [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
+ fi
+
++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=
++ AC_CHECK_LIB([leveldb],[main],[
++ LIBLEVELDB=-lleveldb
++ ],[
++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ TEMP_LIBS="$LIBS"
++ LIBS="$LIBS $LIBLEVELDB"
++ AC_CHECK_LIB([memenv],[main],[
++ LIBMEMENV=-lmemenv
++ ],[
++ AC_MSG_ERROR([LevelDB's memenv library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ LIBS="$TEMP_LIBS"
++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[
++ AC_MSG_CHECKING([for memenv.h path])
++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv])
++ ],[
++ AC_CHECK_HEADER([memenv.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ ])
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
+
++dnl Check for libsecp256k1, only if explicitly requested
++AC_ARG_WITH([system-libsecp256k1],
++ [AS_HELP_STRING([--with-system-libsecp256k1],
++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_libsecp256k1=$withval],
++ [system_libsecp256k1=no]
++)
++if test x$system_libsecp256k1 != xno; then
++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true])
++else
++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include'
++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la'
++fi
++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno])
++AC_SUBST(libsecp256k1_CFLAGS)
++AC_SUBST(libsecp256k1_LIBS)
++
+ if test x$enable_wallet != xno; then
+ dnl Check for libdb_cxx only if wallet enabled
+ BITCOIN_FIND_BDB48
+@@ -515,7 +578,7 @@ BITCOIN_QT_INIT
+ dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
+ BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
+
+-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
+ use_boost=no
+ else
+ use_boost=yes
+@@ -701,9 +764,13 @@ AC_MSG_CHECKING([whether to build bitcoind])
+ AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
+ AC_MSG_RESULT($build_bitcoind)
+
+-AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
+-AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
+-AC_MSG_RESULT($build_bitcoin_utils)
++AC_MSG_CHECKING([whether to build bitcoin-cli])
++AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
++AC_MSG_RESULT($build_bitcoin_cli)
++
++AC_MSG_CHECKING([whether to build bitcoin-tx])
++AM_CONDITIONAL([BUILD_BITCOIN_TX], [test x$build_bitcoin_tx = xyes])
++AC_MSG_RESULT($build_bitcoin_tx)
+
+ AC_MSG_CHECKING([whether to build libraries])
+ AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
+@@ -826,7 +893,7 @@ else
+ AC_MSG_RESULT([no])
+ fi
+
+-if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononononono; then
+ AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
+ fi
+
+@@ -895,8 +962,10 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+ unset PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
++if test x$system_libsecp256k1 = xno; then
+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no"
+ AC_CONFIG_SUBDIRS([src/secp256k1])
++fi
+
+ AC_OUTPUT
+
+diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
+index 9b31865..5bb187c 100755
+--- a/qa/pull-tester/rpc-tests.sh
++++ b/qa/pull-tester/rpc-tests.sh
+@@ -57,7 +57,7 @@ testScriptsExt=(
+ extArg="-extended"
+ passOn=${@#$extArg}
+
+-if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
++if [ "x${ENABLE_BITCOIND}${ENABLE_CLI}${ENABLE_WALLET}" = "x111" ]; then
+ for (( i = 0; i < ${#testScripts[@]}; i++ ))
+ do
+ if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
+diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in
+index 10f4d33..e0e407d 100755
+--- a/qa/pull-tester/tests-config.sh.in
++++ b/qa/pull-tester/tests-config.sh.in
+@@ -8,7 +8,7 @@ EXEEXT="@EXEEXT@"
+
+ # These will turn into comments if they were disabled when configuring.
+ @ENABLE_WALLET_TRUE@ENABLE_WALLET=1
+-@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
++@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=1
+ @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
+
+ REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1c2f770..4d60ddf 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,6 @@
++if EMBEDDED_LIBSECP256K1
+ DIST_SUBDIRS = secp256k1
++endif
+ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+
+
+@@ -20,7 +22,7 @@ endif
+ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
+ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
+
+-BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
++BITCOIN_INCLUDES += $(libsecp256k1_CFLAGS)
+
+ LIBBITCOIN_SERVER=libbitcoin_server.a
+ LIBBITCOIN_WALLET=libbitcoin_wallet.a
+@@ -30,10 +32,16 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+ LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
+ LIBBITCOINQT=qt/libbitcoinqt.a
++if EMBEDDED_LIBSECP256K1
+ LIBSECP256K1=secp256k1/libsecp256k1.la
++else
++LIBSECP256K1=$(libsecp256k1_LIBS)
++endif
+
++if EMBEDDED_LIBSECP256K1
+ $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++endif
+
+ # Make is not made aware of per-object dependencies to avoid limiting building parallelization
+ # But to build the less dependent modules first, we manually select their order here:
+@@ -63,8 +71,11 @@ if BUILD_BITCOIND
+ bin_PROGRAMS += bitcoind
+ endif
+
+-if BUILD_BITCOIN_UTILS
+- bin_PROGRAMS += bitcoin-cli bitcoin-tx
++if BUILD_BITCOIN_CLI
++ bin_PROGRAMS += bitcoin-cli
++endif
++if BUILD_BITCOIN_TX
++ bin_PROGRAMS += bitcoin-tx
+ endif
+
+ .PHONY: FORCE
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index 0997148..14b4deb 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -111,10 +111,12 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
+ bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
++if EMBEDDED_LIBSECP256K1
+ check-local:
+ @echo "Running test/bitcoin-util-test.py..."
+ $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
++endif
+
+ %.json.h: %.json
+ @$(MKDIR_P) $(@D)
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/bitcoin.confd b/net-p2p/bitcoind/files/bitcoin.confd
new file mode 100644
index 000000000000..7c0868c3f535
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/bitcoin
+
+# owner of bitcoind process (don't change, must be existing)
+BITCOIN_USER="bitcoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+BITCOIN_OPTS="${BITCOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/bitcoind/files/bitcoin.initd-r1 b/net-p2p/bitcoind/files/bitcoin.initd-r1
new file mode 100644
index 000000000000..79ae6afec2e0
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoin.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+vardir="/var/lib/bitcoin"
+conffile="${vardir}/.bitcoin/bitcoin.conf"
+bitcoind_user="${BITCOIN_USER:-nobody:nobody}"
+
+description="Bitcoin crypto-currency wallet for automated services"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/bitcoind"
+command_args="${BITCOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${bitcoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${bitcoind_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/bitcoind/files/bitcoind.logrotate b/net-p2p/bitcoind/files/bitcoind.logrotate
new file mode 100644
index 000000000000..36d8dc2b1344
--- /dev/null
+++ b/net-p2p/bitcoind/files/bitcoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/bitcoin/.bitcoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP bitcoind
+ endscript
+}
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..288a5b532901
--- /dev/null
+++ b/net-p2p/bitcoind/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name='bitcoin_policy_cltv'>Check LockTime Verify policy: Your node will recognise and assist OP_CHECKLOCKTIMEVERIFY (BIP65) transactions</flag>
+ <flag name='bitcoin_policy_cpfp'>Child-Pays-For-Parent policy: If you mine, you will give consideration to child transaction fees to pay for their parents</flag>
+ <flag name='bitcoin_policy_dcmp'>Data Carrier Multi-Push policy: Your node will assist transactions with multiple pushes in their data carrier (if any)</flag>
+ <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='ljr'>Enable Luke Dashjr's patches</flag>
+ <flag name='logrotate'>Use app-admin/logrotate for rotating logs</flag>
+ <flag name='upnp'>Enable Universal Plug and Play</flag>
+ <flag name='wallet'>Enable wallet support</flag>
+ <flag name='xt'>Enable Mike Hearn's Bitcoin XT patches</flag>
+ <flag name='zeromq'>Report blocks and transactions via zeromq</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/bitflu/Manifest b/net-p2p/bitflu/Manifest
new file mode 100644
index 000000000000..a6c48ed58ea9
--- /dev/null
+++ b/net-p2p/bitflu/Manifest
@@ -0,0 +1,3 @@
+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
diff --git a/net-p2p/bitflu/bitflu-1.50.ebuild b/net-p2p/bitflu/bitflu-1.50.ebuild
new file mode 100644
index 000000000000..7977e673e970
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.50.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a10446781ca4
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.51.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a10446781ca4
--- /dev/null
+++ b/net-p2p/bitflu/bitflu-1.52.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..41a1696b0b7d
--- /dev/null
+++ b/net-p2p/bitflu/files/bitflu.initd
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..3ae07452f616
--- /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>
+ <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..ffeba603f013
--- /dev/null
+++ b/net-p2p/bittornado/Manifest
@@ -0,0 +1 @@
+DIST BitTornado-0.3.18.tar.gz 189227 SHA256 d9e6ad0bf5b2e9820bab809c5a4fcd94e844a57f396ac51547fe47dbe255d9e0 SHA512 61a55726d93ddb245e18e47f41dea982b8faa7d3296c3a7221d00e0fe71db772613c3ee113bb7df18390807dda8c77859ed7159a03535446ca417a1344e3c0d6 WHIRLPOOL f3393b5907a86c590e7d760760f11e8b671d90c9c8ff14d783904fce688243bd06abf46f6938fc9992f44653198eba99b062c1f19836cb4502ca9569e6b0c598
diff --git a/net-p2p/bittornado/bittornado-0.3.18-r2.ebuild b/net-p2p/bittornado/bittornado-0.3.18-r2.ebuild
new file mode 100644
index 000000000000..18a43a7d40de
--- /dev/null
+++ b/net-p2p/bittornado/bittornado-0.3.18-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# note: wxGTK interface has been removed wrt #391685. this ebuild is only for
+# cmdline tools as is.
+
+EAPI=3
+PYTHON_DEPEND=2
+
+inherit distutils eutils
+
+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"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="alpha amd64 ppc ppc64 ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-python/pycrypto"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ >=sys-apps/sed-4.0.5"
+
+S=${WORKDIR}/${MY_PN}-CVS
+PIXMAPLOC=/usr/share/pixmaps/bittornado
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ # 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
+ epatch "${FILESDIR}"/${P}-wxversion.patch
+
+ python_convert_shebangs -r 2 .
+}
+
+src_install() {
+ distutils_src_install
+
+ # get rid of any reference to the not-installed gui version
+ rm "${ED}"/usr/bin/*gui.py
+
+ newconfd "${FILESDIR}"/bttrack.conf bttrack
+ newinitd "${FILESDIR}"/bttrack.rc bttrack
+}
diff --git a/net-p2p/bittornado/bittornado-0.3.18-r3.ebuild b/net-p2p/bittornado/bittornado-0.3.18-r3.ebuild
new file mode 100644
index 000000000000..78b6ee50e3d4
--- /dev/null
+++ b/net-p2p/bittornado/bittornado-0.3.18-r3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# note: wxGTK interface has been removed wrt #391685. this ebuild is only for
+# cmdline tools as is.
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils
+
+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"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~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
+ epatch "${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/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..dc86cc1bcebf
--- /dev/null
+++ b/net-p2p/bittornado/files/bttrack.conf
@@ -0,0 +1,18 @@
+# /etc/conf.d/bttrack
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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..d08110fe215d
--- /dev/null
+++ b/net-p2p/bittornado/files/bttrack.rc
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..aa0f3664825f
--- /dev/null
+++ b/net-p2p/bittornado/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/bittorrent/Manifest b/net-p2p/bittorrent/Manifest
new file mode 100644
index 000000000000..693530b88e00
--- /dev/null
+++ b/net-p2p/bittorrent/Manifest
@@ -0,0 +1 @@
+DIST BitTorrent-4.4.0.tar.gz 1255281 SHA256 1c9338ed384240258b5733a814670e2dee8ca2fb65babf3f0ca07978707301e0 SHA512 04ac6690fe11225c182c10dd3e7a84b53d84fd795efdc8a8d502835bc1c728a95c6cb12cc42173aadc483eff39bfaaba3df418fc86114c240748631e91d6ddd8 WHIRLPOOL 99e38f8da90e9eadaa0e3d14cc4bf102964443e951da98a423383d5d428b253a736bbee4ed6c4475e8a0ba5456f515e28346c1ea2328b5ed8c642cf50a13b15c
diff --git a/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild b/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild
new file mode 100644
index 000000000000..bda46fcecfa0
--- /dev/null
+++ b/net-p2p/bittorrent/bittorrent-4.4.0-r2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="threads"
+
+# Maintainer note:
+# keep this package at 4.4.0.
+# 5.x - requires wxpython-2.6 which we don't carry
+# 6.x - binary-only non-free crap
+# Fedora has also frozen bittorrent at 4.4.0 and is a good source of patches
+# http://pkgs.fedoraproject.org/gitweb/?p=bittorrent.git
+
+inherit distutils eutils fdo-mime python
+
+MY_P="${P/bittorrent/BitTorrent}"
+
+DESCRIPTION="Tool for distributing files via a distributed network of nodes"
+HOMEPAGE="http://www.bittorrent.com/"
+SRC_URI="http://www.bittorrent.com/dl/${MY_P}.tar.gz"
+
+LICENSE="BitTorrent"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="aqua gtk"
+
+RDEPEND=">=dev-python/pycrypto-2.0
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=dev-python/pygtk-2.6:2 )"
+DEPEND="${RDEPEND}"
+# dev-python/dnspython"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS="README.txt TRACKERLESS.txt"
+PYTHON_MODNAME="BitTorrent khashmir"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}"/${P}-no-version-check.patch
+ epatch "${FILESDIR}"/${P}-pkidir.patch
+ epatch "${FILESDIR}"/${P}-fastresume.patch
+ epatch "${FILESDIR}"/${P}-pygtk-thread-warnings.patch
+ epatch "${FILESDIR}"/${P}-python26-syntax.patch
+ epatch "${FILESDIR}"/${P}-bencode-float.patch
+ epatch "${FILESDIR}"/${P}-keyerror.patch
+ epatch "${FILESDIR}"/${P}-hashlib.patch
+
+ # fix doc path #109743
+ sed -i -e "/dp.*appdir/ s:appdir:'${PF}':" BitTorrent/platform.py
+}
+
+src_install() {
+ distutils_src_install
+
+ if use gtk; then
+ doicon images/bittorrent.ico
+ domenu "${FILESDIR}"/${PN}.desktop
+ elif use !aqua; then
+ rm -f "${ED}"usr/bin/{bit,make}torrent
+ fi
+
+ insinto /etc/pki/bittorrent/
+ doins public.key
+
+ newinitd "${FILESDIR}"/bittorrent-tracker.initd bittorrent-tracker
+ newconfd "${FILESDIR}"/bittorrent-tracker.confd bittorrent-tracker
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ use gtk && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ use gtk && fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/bittorrent/bittorrent-4.4.0-r3.ebuild b/net-p2p/bittorrent/bittorrent-4.4.0-r3.ebuild
new file mode 100644
index 000000000000..2652019e5e4b
--- /dev/null
+++ b/net-p2p/bittorrent/bittorrent-4.4.0-r3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads'
+
+# Maintainer note:
+# keep this package at 4.4.0.
+# 5.x - requires wxpython-2.6 which we don't carry
+# 6.x - binary-only non-free crap
+# Fedora has also frozen bittorrent at 4.4.0 and is a good source of patches
+# http://pkgs.fedoraproject.org/gitweb/?p=bittorrent.git
+
+inherit distutils-r1 eutils fdo-mime
+
+MY_P="${P/bittorrent/BitTorrent}"
+
+DESCRIPTION="Tool for distributing files via a distributed network of nodes"
+HOMEPAGE="http://www.bittorrent.com/"
+SRC_URI="http://www.bittorrent.com/dl/${MY_P}.tar.gz"
+
+LICENSE="BitTorrent"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="aqua gtk"
+
+RDEPEND=">=dev-python/pycrypto-2.0[${PYTHON_USEDEP}]
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=dev-python/pygtk-2.6:2[${PYTHON_USEDEP}] )"
+DEPEND="${RDEPEND}"
+# dev-python/dnspython"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( credits.txt credits-l10n.txt README.txt TRACKERLESS.txt )
+
+python_prepare_all() {
+ epatch "${FILESDIR}"/${P}-no-version-check.patch
+ epatch "${FILESDIR}"/${P}-pkidir.patch
+ epatch "${FILESDIR}"/${P}-fastresume.patch
+ epatch "${FILESDIR}"/${P}-pygtk-thread-warnings.patch
+ epatch "${FILESDIR}"/${P}-python26-syntax.patch
+ epatch "${FILESDIR}"/${P}-bencode-float.patch
+ epatch "${FILESDIR}"/${P}-keyerror.patch
+ epatch "${FILESDIR}"/${P}-hashlib.patch
+
+ # fix doc path #109743
+ sed -i -e "/dp.*appdir/ s:appdir:'${PF}':" BitTorrent/platform.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ if ! use gtk && ! use aqua; then
+ rm -f "${ED}"usr/bn/{bit,make}torrent || die
+ rm -f "${D}$(python_get_scriptdir)"/{bit,make}torrent || die
+ fi
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ if use gtk; then
+ doicon images/bittorrent.ico
+ domenu "${FILESDIR}"/${PN}.desktop
+ fi
+
+ insinto /etc/pki/bittorrent/
+ doins public.key
+
+ newinitd "${FILESDIR}"/bittorrent-tracker.initd bittorrent-tracker
+ newconfd "${FILESDIR}"/bittorrent-tracker.confd bittorrent-tracker
+}
+
+pkg_postinst() {
+ use gtk && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ use gtk && fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch
new file mode 100644
index 000000000000..c14a7b668c25
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-bencode-float.patch
@@ -0,0 +1,75 @@
+Add bencode support for floating point values.
+
+https://bugzilla.redhat.com/451496
+
+--- a/BitTorrent/bencode.py
++++ b/BitTorrent/bencode.py
+@@ -14,6 +14,8 @@ from BitTorrent.obsoletepythonsupport import *
+
+ from BitTorrent import BTFailure
+
++import string
++
+ def decode_int(x, f):
+ f += 1
+ newf = x.index('e', f)
+@@ -25,6 +27,23 @@ def decode_int(x, f):
+ raise ValueError
+ return (n, newf+1)
+
++def assert_finite(n):
++ """Raises ValueError if n is NaN or infinite."""
++
++ valid_chars = '0123456789.-+eE'
++ if repr(n).translate(string.maketrans('',''), valid_chars) != '':
++ raise ValueError('encountered NaN or infinite')
++
++def decode_float(x, f):
++ f += 1
++ newf = x.index('e', f)
++ try:
++ n = float(x[f:newf].replace('E', 'e'))
++ assert_finite(n)
++ except (OverflowError, ValueError):
++ raise ValueError('encountered NaN or infinite')
++ return (n, newf+1)
++
+ def decode_string(x, f):
+ colon = x.index(':', f)
+ n = int(x[f:colon])
+@@ -55,6 +74,7 @@ decode_func = {}
+ decode_func['l'] = decode_list
+ decode_func['d'] = decode_dict
+ decode_func['i'] = decode_int
++decode_func['f'] = decode_float
+ decode_func['0'] = decode_string
+ decode_func['1'] = decode_string
+ decode_func['2'] = decode_string
+@@ -75,7 +95,7 @@ def bdecode(x):
+ raise BTFailure, _("invalid bencoded value (data after valid prefix)")
+ return r
+
+-from types import StringType, IntType, LongType, DictType, ListType, TupleType
++from types import StringType, IntType, LongType, DictType, ListType, TupleType, FloatType
+
+
+ class Bencached(object):
+@@ -91,6 +111,10 @@ def encode_bencached(x,r):
+ def encode_int(x, r):
+ r.extend(('i', str(x), 'e'))
+
++def encode_float(x, r):
++ assert_finite(x)
++ r.extend(('f', repr(x).replace('e', 'E'), 'e'))
++
+ def encode_bool(x, r):
+ if x:
+ encode_int(1, r)
+@@ -119,6 +143,7 @@ encode_func = {}
+ encode_func[Bencached] = encode_bencached
+ encode_func[IntType] = encode_int
+ encode_func[LongType] = encode_int
++encode_func[FloatType] = encode_float
+ encode_func[StringType] = encode_string
+ encode_func[ListType] = encode_list
+ encode_func[TupleType] = encode_list
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch
new file mode 100644
index 000000000000..b282afde170b
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-fastresume.patch
@@ -0,0 +1,23 @@
+"Could not load fastresume data: invalid literal for int() with base 10: '1300250602.1'
+Will perform full hash check."
+
+--- a/BitTorrent/Storage.py
++++ b/BitTorrent/Storage.py
+@@ -213,7 +213,7 @@ class Storage(object):
+ resumefile.write(str(amount_done) + '\n')
+ for x, x, filename in self.ranges:
+ resumefile.write(str(os.path.getsize(filename)) + ' ' +
+- str(os.path.getmtime(filename)) + '\n')
++ str(int(os.path.getmtime(filename))) + '\n')
+
+ def check_fastresume(self, resumefile, return_filelist=False,
+ piece_size=None, numpieces=None, allfiles=None):
+@@ -237,7 +237,7 @@ class Storage(object):
+ else:
+ raise BTFailure(_("Another program appears to have moved, renamed, or deleted the file, "
+ "or %s may have crashed last time it was run.") % app_name)
+- if fsize > 0 and mtime != os.path.getmtime(filename):
++ if fsize > 0 and mtime != int(os.path.getmtime(filename)):
+ raise BTFailure(_("Another program appears to have modified the file, "
+ "or %s may have crashed last time it was run.") % app_name)
+ if size != fsize:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch
new file mode 100644
index 000000000000..28bfaa76a90a
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-hashlib.patch
@@ -0,0 +1,142 @@
+DeprecationWarning: the sha module is deprecated; use the hashlib module instead
+
+--- a/BitTorrent/ConvertedMetainfo.py
++++ b/BitTorrent/ConvertedMetainfo.py
+@@ -15,7 +15,10 @@ from __future__ import generators
+
+ import os
+ import sys
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ from BitTorrent.obsoletepythonsupport import *
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -15,7 +15,10 @@ import sys
+ import zurllib
+ import pickle
+ import threading
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ DEBUG = False
+
+--- a/BitTorrent/PeerID.py
++++ b/BitTorrent/PeerID.py
+@@ -11,7 +11,10 @@
+ # Written by Matt Chisholm
+
+ import os
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from time import time
+ try:
+ getpid = os.getpid
+--- a/BitTorrent/StorageWrapper.py
++++ b/BitTorrent/StorageWrapper.py
+@@ -12,7 +12,10 @@
+
+ from __future__ import division
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from array import array
+ from binascii import b2a_hex
+
+--- a/BitTorrent/download.py
++++ b/BitTorrent/download.py
+@@ -19,7 +19,10 @@ import sys
+ import threading
+ import errno
+ import gc
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from socket import error as socketerror
+ from random import seed
+ from time import time
+--- a/BitTorrent/makemetafile.py
++++ b/BitTorrent/makemetafile.py
+@@ -16,7 +16,10 @@ from __future__ import division
+
+ import os
+ import sys
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from time import time
+ from threading import Event
+
+--- a/BitTorrent/parsedir.py
++++ b/BitTorrent/parsedir.py
+@@ -11,7 +11,10 @@
+ # Written by John Hoffman and Uoti Urpala
+
+ import os
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+
+ from BitTorrent.bencode import bencode, bdecode
+ from BitTorrent.btformats import check_message
+--- a/khashmir/khash.py
++++ b/khashmir/khash.py
+@@ -8,7 +8,10 @@
+ # for the specific language governing rights and limitations under the
+ # License.
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from random import randint
+
+ #this is ugly, hopefully os.entropy will be in 2.4
+--- a/khashmir/khashmir.py
++++ b/khashmir/khashmir.py
+@@ -13,7 +13,10 @@ from socket import gethostbyname
+
+ from BitTorrent.platform import bttime as time
+
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ import re
+ from BitTorrent.defaultargs import common_options, rare_options
+ from BitTorrent.RawServer_magic import RawServer
+--- a/khashmir/utkhashmir.py
++++ b/khashmir/utkhashmir.py
+@@ -13,7 +13,10 @@ from actions import *
+ from khash import newID
+ from krpc import KRPCProtocolError, KRPCFailSilently
+ from cache import Cache
+-from sha import sha
++try:
++ from hashlib import sha1 as sha
++except ImportError:
++ from sha import sha
+ from util import *
+ from threading import Thread
+ from socket import gethostbyname
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch
new file mode 100644
index 000000000000..c2730d1d004f
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-keyerror.patch
@@ -0,0 +1,15 @@
+Fix bug with error: KeyError: <type 'float'>
+
+https://bugzilla.redhat.com/451496
+
+--- a/BitTorrent/track.py
++++ b/BitTorrent/track.py
+@@ -107,6 +107,8 @@ defaults = [
+ _("scrape access allowed (can be none, specific or full)")),
+ ('max_give', 200,
+ _("maximum number of peers to give with any one request")),
++ ('max_incomplete', 100,
++ _("max number of outgoing incomplete connections")),
+ ('twisted', -1,
+ _("Use Twisted network libraries for network connections. 1 means use twisted, 0 means do not use twisted, -1 means autodetect, and prefer twisted")),
+ ('pid', '/var/run/bittorrent-tracker.pid',
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch
new file mode 100644
index 000000000000..b0c20fde497b
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-no-version-check.patch
@@ -0,0 +1,14 @@
+Disable check for new versions.
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -128,6 +128,9 @@ class Updater(object):
+
+
+ def get(self):
++ self.debug('Skipping version check')
++ return
++
+ try:
+ self.get_available()
+ except BTFailure, e:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch
new file mode 100644
index 000000000000..98f9f81c177f
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-pkidir.patch
@@ -0,0 +1,13 @@
+Install public key in standard place.
+
+--- a/BitTorrent/NewVersion.py
++++ b/BitTorrent/NewVersion.py
+@@ -163,7 +163,7 @@ class Updater(object):
+ self.threadwrap(self.errorfunc, WARNING, '\n'.join(terrors))
+
+ if torrentfile and signature:
+- public_key_file = open(os.path.join(doc_root, 'public.key'), 'rb')
++ public_key_file = open('/etc/pki/bittorrent/public.key', 'rb')
+ public_key = pickle.load(public_key_file)
+ h = sha(torrentfile).digest()
+ if public_key.verify(h, signature):
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch
new file mode 100644
index 000000000000..c4a232622def
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-pygtk-thread-warnings.patch
@@ -0,0 +1,81 @@
+GtkDeprecationWarning: gtk.threads_leave is deprecated, use gtk.gdk.threads_leave instead
+
+--- a/BitTorrent/GUI.py
++++ b/BitTorrent/GUI.py
+@@ -25,9 +25,9 @@ from BitTorrent import app_name, FAQ_URL, languages, language_names
+ from BitTorrent.platform import image_root, read_language_file, write_language_file
+
+ def lock_wrap(function, *args):
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+ function(*args)
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def gtk_wrap(function, *args):
+ gobject.idle_add(lock_wrap, function, *args)
+@@ -377,10 +377,10 @@ class AutoScrollingWindow(ScrolledWindow):
+
+ def scroll_and_wait(self, amount, lock_held):
+ if not lock_held:
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+ self.scroll_by(0, amount)
+ if not lock_held:
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+ if self.vscrolltimeout is not None:
+ gobject.source_remove(self.vscrolltimeout)
+ self.vscrolltimeout = gobject.timeout_add(100, self.scroll_and_wait, amount, False)
+--- a/bittorrent.py
++++ b/bittorrent.py
+@@ -2742,7 +2742,7 @@ class DownloadInfoFrame(object):
+ if self.config['start_minimized']:
+ self.mainwindow.iconify()
+
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+
+ self.mainwindow.set_border_width(0)
+
+@@ -2942,7 +2942,7 @@ class DownloadInfoFrame(object):
+
+ self.nag()
+
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def window_event(self, widget, event, *args):
+ if event.changed_mask == gtk.gdk.WINDOW_STATE_ICONIFIED:
+@@ -3758,14 +3758,14 @@ class MainLoop:
+ self.mainwindow = None
+ self.started = 0
+
+- gtk.threads_init()
++ gtk.gdk.threads_init()
+
+ def set_mainwindow(self, mainwindow):
+ self.mainwindow = mainwindow
+
+ def run(self):
+ self.mainwindow.traythread.start()
+- gtk.threads_enter()
++ gtk.gdk.threads_enter()
+
+ if self.mainwindow:
+ self.mainwindow.ssbutton.set_paused(self.mainwindow.config['pause'])
+@@ -3777,12 +3777,12 @@ class MainLoop:
+ self.started = 1
+ gtk.main()
+ except KeyboardInterrupt:
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+ if self.mainwindow:
+ self.mainwindow.torrentqueue.set_done()
+ raise
+
+- gtk.threads_leave()
++ gtk.gdk.threads_leave()
+
+ def quit(self):
+ if self.mainwindow:
diff --git a/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch b/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch
new file mode 100644
index 000000000000..1ad8751528f6
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-4.4.0-python26-syntax.patch
@@ -0,0 +1,45 @@
+Fix syntax errors with python 2.6.
+
+https://bugs.gentoo.org/265784
+
+--- a/khashmir/inserter.py
++++ b/khashmir/inserter.py
+@@ -28,7 +28,6 @@ def d(n):
+ done = done+1
+
+ if __name__=="__main__":
+- global done
+ host, port = sys.argv[1:]
+ x = UTKhashmir("", 22038, "/tmp/cgcgcgc")
+ x.addContact(host, int(port))
+--- a/khashmir/test_krpc.py
++++ b/khashmir/test_krpc.py
+@@ -44,20 +44,20 @@ class KRPCTests(TestCase):
+ self.r = RawServer(Event(), d)
+
+ addr = ('127.0.0.1', 1180)
+- self.as = self.r.create_udpsocket(addr[1], addr[0], True)
++ self.asock = self.r.create_udpsocket(addr[1], addr[0], True)
+ self.af = Receiver(addr)
+- self.a = hostbroker(self.af, addr, self.as, self.r.add_task)
+- self.r.start_listening_udp(self.as, self.a)
++ self.a = hostbroker(self.af, addr, self.asock, self.r.add_task)
++ self.r.start_listening_udp(self.asock, self.a)
+
+ addr = ('127.0.0.1', 1181)
+- self.bs = self.r.create_udpsocket(addr[1], addr[0], True)
++ self.bsock = self.r.create_udpsocket(addr[1], addr[0], True)
+ self.bf = Receiver(addr)
+- self.b = hostbroker(self.bf, addr, self.bs, self.r.add_task)
+- self.r.start_listening_udp(self.bs, self.b)
++ self.b = hostbroker(self.bf, addr, self.bsock, self.r.add_task)
++ self.r.start_listening_udp(self.bsock, self.b)
+
+ def tearDown(self):
+- self.as.close()
+- self.bs.close()
++ self.asock.close()
++ self.bsock.close()
+
+ def testSimpleMessage(self):
+ self.noisy = 0
diff --git a/net-p2p/bittorrent/files/bittorrent-tracker.confd b/net-p2p/bittorrent/files/bittorrent-tracker.confd
new file mode 100644
index 000000000000..71e29cb861c4
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-tracker.confd
@@ -0,0 +1,15 @@
+# /etc/conf.d/bittorrent-tracker: config file for /etc/init.d/bittorrent-tracker
+
+# 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/pixmaps/bittorrent.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/bittorrent/files/bittorrent-tracker.initd b/net-p2p/bittorrent/files/bittorrent-tracker.initd
new file mode 100644
index 000000000000..49de33bb912c
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent-tracker.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting bttrack"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/bttrack.pid \
+ --exec /usr/bin/bittorrent-tracker -- --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/bittorrent/files/bittorrent.desktop b/net-p2p/bittorrent/files/bittorrent.desktop
new file mode 100644
index 000000000000..a6a5312d4392
--- /dev/null
+++ b/net-p2p/bittorrent/files/bittorrent.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=BitTorrent File Transfer
+Comment=Distributed download of files from the Internet
+Exec=bittorrent
+Icon=/usr/share/pixmaps/bittorrent.ico
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Network;FileTransfer;P2P;
+MimeType=application/x-bittorrent;
diff --git a/net-p2p/bittorrent/metadata.xml b/net-p2p/bittorrent/metadata.xml
new file mode 100644
index 000000000000..2a0f322b939c
--- /dev/null
+++ b/net-p2p/bittorrent/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <maintainer>
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/btpd/Manifest b/net-p2p/btpd/Manifest
new file mode 100644
index 000000000000..ae5aca141e5f
--- /dev/null
+++ b/net-p2p/btpd/Manifest
@@ -0,0 +1 @@
+DIST btpd-0.15.tar.gz 144706 SHA256 c2229244c3cb370ac95560e2e9ff7f5d094612ee2b2a1e36237ec7f27707db9d
diff --git a/net-p2p/btpd/btpd-0.15.ebuild b/net-p2p/btpd/btpd-0.15.ebuild
new file mode 100644
index 000000000000..13c60546bdf9
--- /dev/null
+++ b/net-p2p/btpd/btpd-0.15.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="BitTorrent client consisting of a daemon and client"
+HOMEPAGE="http://www.murmeldjur.se/btpd/"
+SRC_URI="http://www.murmeldjur.se/btpd/${P}.tar.gz http://people.su.se/~rnyberg/btpd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="net-misc/curl
+ dev-libs/openssl"
+DEPEND="${RDEPEND}"
+
+# for the init.d script; this should probably be fixed not to require
+# this so that it can work on G/FBSD too.
+RDEPEND="${RDEPEND}
+ virtual/shadow"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ newinitd "${FILESDIR}/initd_btpd" btpd || die
+ newconfd "${FILESDIR}/confd_btpd" btpd || die
+
+ dodoc CHANGES COPYRIGHT README || die
+}
diff --git a/net-p2p/btpd/files/confd_btpd b/net-p2p/btpd/files/confd_btpd
new file mode 100644
index 000000000000..a7318f64d092
--- /dev/null
+++ b/net-p2p/btpd/files/confd_btpd
@@ -0,0 +1,5 @@
+# owner of btpd process (must be existing)
+#BTPDUSER="p2p"
+
+# Extra arguments for btpd
+#BTPDEXTRARGS="-p 43729"
diff --git a/net-p2p/btpd/files/initd_btpd b/net-p2p/btpd/files/initd_btpd
new file mode 100644
index 000000000000..02505e95252c
--- /dev/null
+++ b/net-p2p/btpd/files/initd_btpd
@@ -0,0 +1,79 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+BTPDUSERHOME=`getent passwd ${BTPDUSER} | cut -d : -f 6`
+BTPDHOME=${BTPDUSERHOME}/.btpd
+BTPDSTARTUPLOG=${BTPDHOME}/startup.log
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z ${BTPDUSER} ]; then
+
+ eerror "Must edit /etc/conf.d/btpd first."
+ return 1
+
+ elif [ -z "`getent passwd ${BTPDUSER}`" ]; then
+
+ eerror "Check /etc/conf.d/btpd's \${BTPDUSER}. '${BTPDUSER}' doesn't exist."
+ return 1
+ fi
+}
+
+start() {
+
+ ebegin "Starting BitTorrent Protocol Daemon"
+ checkconfig || return 1
+
+ if pgrep -u ${BTPDUSER} btpd >/dev/null; then
+ eerror "An instance of btpd is already running"
+ return 1
+ else
+ su ${BTPDUSER} -c "btpd ${BTPDEXTRARGS}"
+
+ sleep 2
+
+ if ! pgrep -u ${BTPDUSER} btpd > /dev/null; then
+ eerror "BitTorrent Protocol Daemon couldn't be started ! Check logfile: ${BTPDSTARTUPLOG}"
+ return 1
+ fi
+ fi
+
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+
+ local retries=0
+
+ ebegin "Stopping BitTorrent Protocol Daemon"
+ while [ -n "`pgrep -u ${BTPDUSER} btpd`" ] && [ ${retries} -lt 4 ]; do
+ if test ${retries} -eq 0; then
+ su ${BTPDUSER} -c "btcli kill"
+ else
+ kill -9 "`pgrep -u ${BTPDUSER} btpd`"
+ fi
+
+ sleep 1
+ retries=$(( $retries + 1 ))
+ done
+
+ if [ ${retries} -lt 4 ]; then
+ return 0
+ else
+ eerror "Unable to stop btpd"
+ return 1
+ fi
+
+ eend $?
+}
+
+restart() {
+ svc_stop
+ sleep 3
+ svc_start
+}
diff --git a/net-p2p/btpd/metadata.xml b/net-p2p/btpd/metadata.xml
new file mode 100644
index 000000000000..5050ab751732
--- /dev/null
+++ b/net-p2p/btpd/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ricardo.cordeiro@iscte.pt</email>
+ <name> Ricardo Cordeiro</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/classified-ads/Manifest b/net-p2p/classified-ads/Manifest
new file mode 100644
index 000000000000..8cf07eb8b18a
--- /dev/null
+++ b/net-p2p/classified-ads/Manifest
@@ -0,0 +1,4 @@
+DIST classified-ads-0.07.tar.gz 2194177 SHA256 882874da2d1610d64c952969222b9295bab59b519de8a7da69790805fecca394 SHA512 a42e9604ce922968b0d7f345d623b250dae39fad2f43648b996ab10f3e7941ec3de95e89d94f4ec28bba882cf2bd38ea28aac88885522a7375926aee3c5d0843 WHIRLPOOL a797387e0f8537ab5366c55554c8909d656436122c3cbf2b35c7c8cc989a8cf76c3f0d6d39a99ac54e0b7cbcd8063dd1a4ec3a99b320f243338081f665f3b933
+DIST classified-ads-0.07_p20150728.tar.gz 2197413 SHA256 e8d488b6c44b198bf1150c7a33ae698887cfb345cb4473d91a5949abeb846d95 SHA512 1cb42252ab695e90212d05144255a66b0d8dc63d8d010b5781e470a4c5e9cdf9c4dce1b9e44cba83d5fb2fef99e3d46fd5cc1b9880db69c9c163475b7e4349fc WHIRLPOOL 458d3947f00709c633d652b753b7801496479f610da0d249e8e2f5f7ddecb341fb885184c027b453aa2f9db7998a74fcbd60bbb9d0bb5765b7b7e45bcdcfc2c0
+DIST classified-ads-graphics-0.07.tar.gz 340476 SHA256 12bd4f581f82c4c805bbf19cc794f7462f9ec0e71358fbc1628fd872169295e2 SHA512 c59f65f37a8e4dddb753dbcdec835e946d9de021c5273319b3cd95ef1c3343715ce4b87d76b2d96264acc791a6cced32967521c74978131bd76fbcfc37bb344d WHIRLPOOL 2535170cdc4cc1d4ad2e204e85b546089b3aa404e4cee0e2ab9d094d6cda869043f24fba29d6f68b37f450ff947c13f02336e63b3236b404cbae528f801cc1ad
+DIST classified-ads-graphics-0.07_p20150728.tar.gz 340476 SHA256 12bd4f581f82c4c805bbf19cc794f7462f9ec0e71358fbc1628fd872169295e2 SHA512 c59f65f37a8e4dddb753dbcdec835e946d9de021c5273319b3cd95ef1c3343715ce4b87d76b2d96264acc791a6cced32967521c74978131bd76fbcfc37bb344d WHIRLPOOL 2535170cdc4cc1d4ad2e204e85b546089b3aa404e4cee0e2ab9d094d6cda869043f24fba29d6f68b37f450ff947c13f02336e63b3236b404cbae528f801cc1ad
diff --git a/net-p2p/classified-ads/classified-ads-0.07.ebuild b/net-p2p/classified-ads/classified-ads-0.07.ebuild
new file mode 100644
index 000000000000..31a937f74a6b
--- /dev/null
+++ b/net-p2p/classified-ads/classified-ads-0.07.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="en fi sv"
+PLOCALE_BACKUP="en"
+inherit qt4-r2
+
+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="debug doc test"
+
+DEPEND="dev-libs/openssl:0
+ dev-libs/qjson
+ >=net-libs/libnatpmp-20130911
+ <=net-libs/libnatpmp-20140401-r1
+ >=net-libs/miniupnpc-1.8
+ sys-apps/file
+ dev-qt/qtgui:4[debug?]
+ test? ( dev-libs/libgcrypt:0
+ dev-qt/qttest:4
+ sys-devel/gdb:0 )
+ doc? ( app-doc/doxygen[dot] )"
+RDEPEND="dev-libs/openssl:0
+ dev-libs/qjson
+ >=net-libs/libnatpmp-20130911
+ <=net-libs/libnatpmp-20140401-r1
+ >=net-libs/miniupnpc-1.8
+ sys-apps/file
+ dev-qt/qtgui:4[debug?]"
+
+src_prepare() {
+ # preprocessed graphics are unpacked into wrong directory
+ # so lets move them into correct location:
+ mv ../ui/* ui/ || die
+ # then just run qmake
+ qt4-r2_src_prepare
+}
+
+src_compile() {
+ qt4-r2_src_compile
+ if use doc; then
+ cd doc || die
+ doxygen || die
+ fi
+}
+
+src_test() {
+ cd test || die "test suite missing"
+ qmake || die "test suite configure failed"
+ make
+
+ if [ -e $HOME/.classified_ads/sqlite_db ]; then
+ mv $HOME/.classified_ads/sqlite_db $HOME/.classified_ads/sqlite_db.backup \
+ || die "datafile backup failed"
+ fi
+ ./testca
+ result=$?
+ rm $HOME/.classified_ads/sqlite_db || true
+
+ if [ -e $HOME/.classified_ads/sqlite_db.backup ]; then
+ mv $HOME/.classified_ads/sqlite_db.backup $HOME/.classified_ads/sqlite_db \
+ || die "datafile restore failed"
+ fi
+
+ if [ $result != "0" ]; then
+ die "test failed with code $result"
+ fi
+
+ return $result
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}"
+ use doc && dodoc -r doc/doxygen.generated/html/
+}
diff --git a/net-p2p/classified-ads/classified-ads-0.07_p20150728.ebuild b/net-p2p/classified-ads/classified-ads-0.07_p20150728.ebuild
new file mode 100644
index 000000000000..eaf67d4ad294
--- /dev/null
+++ b/net-p2p/classified-ads/classified-ads-0.07_p20150728.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PLOCALES="en fi sv"
+PLOCALE_BACKUP="en"
+inherit qt4-r2 vcs-snapshot
+
+COMMIT_ID="dd2017f3be9d5d68d5fb85af2d626424b3e712e0"
+DESCRIPTION="Program for displaying classified advertisement items"
+HOMEPAGE="http://katiska.org/classified-ads/"
+SRC_URI="https://github.com/operatornormal/classified-ads/archive/${COMMIT_ID}.tar.gz -> ${P}.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="debug doc test"
+
+RDEPEND="dev-libs/openssl:0
+ dev-libs/qjson
+ >=net-libs/libnatpmp-20130911
+ <=net-libs/libnatpmp-20140401-r1
+ >=net-libs/miniupnpc-1.8
+ sys-apps/file
+ dev-qt/qtgui:4[debug?]"
+
+DEPEND="${RDEPEND}
+ dev-qt/qttest:4
+ sys-devel/gdb:0
+ doc? ( app-doc/doxygen[dot] )
+ test? ( dev-libs/libgcrypt:0 )
+ "
+
+src_prepare() {
+ # preprocessed graphics are unpacked into wrong directory
+ # so lets move them into correct location:
+ mv ../classified-ads-graphics-${PV}/* ui/ || die
+ # then just run qmake
+ qt4-r2_src_prepare
+}
+
+src_compile() {
+ qt4-r2_src_compile
+ if use doc; then
+ cd doc || die
+ doxygen || die
+ fi
+}
+
+src_test() {
+ cd test || die "test suite missing"
+ qmake || die "test suite configure failed"
+ emake
+
+ if [ -e $HOME/.classified_ads/sqlite_db ]; then
+ mv $HOME/.classified_ads/sqlite_db $HOME/.classified_ads/sqlite_db.backup \
+ || die "datafile backup failed"
+ fi
+ ./testca
+ result=$?
+ rm $HOME/.classified_ads/sqlite_db || true
+
+ if [ -e $HOME/.classified_ads/sqlite_db.backup ]; then
+ mv $HOME/.classified_ads/sqlite_db.backup $HOME/.classified_ads/sqlite_db \
+ || die "datafile restore failed"
+ fi
+
+ if [ $result != "0" ]; then
+ die "test failed with code $result"
+ fi
+
+ return $result
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${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..ee823cc1d09d
--- /dev/null
+++ b/net-p2p/classified-ads/metadata.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>idella4@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>antti.jarvinen@katiska.org</email>
+ <name>Antti Järvinen</name>
+ <description>proxy maintainer</description>
+ </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>
+ </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..a36c3794de29
--- /dev/null
+++ b/net-p2p/createtorrent/Manifest
@@ -0,0 +1 @@
+DIST createtorrent-1.1.4.tar.gz 80605 SHA256 5bb8ae4cc450406afe06609ed4d29a3531ab1a65f519668c5fdbc2eab0b922af SHA512 d15c6d38e90a2941c578396fafaaa1778d5ce597681e0db89189b5c6719e8b69202dd6bb9dd2c279ef939eef8a74dd8e7ca3f0c224a5a4eaa277c3fd9543c24f WHIRLPOOL c7e52a689a4db24df2e92f4b5892d4505f92a7006c5709d8d2654b9ddf8b2258f97a0ff5f97e30cd51f6e7e9b6ee78fdfd0c1be0e394a6670d56c62964c088bd
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..a13e47b312d3
--- /dev/null
+++ b/net-p2p/createtorrent/createtorrent-1.1.4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..aa0f3664825f
--- /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>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/ctcs/Manifest b/net-p2p/ctcs/Manifest
new file mode 100644
index 000000000000..cd67210a507f
--- /dev/null
+++ b/net-p2p/ctcs/Manifest
@@ -0,0 +1 @@
+DIST ctcs-1.4.1.tar.gz 27384 SHA256 9614e88d07c6b128677d4d2638a4a05ae00812ec5157ae0788012abed3172355
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..5816d820be04
--- /dev/null
+++ b/net-p2p/ctcs/ctcs-1.4.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..aa0f3664825f
--- /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>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/ctorrent/Manifest b/net-p2p/ctorrent/Manifest
new file mode 100644
index 000000000000..65fb60f7669b
--- /dev/null
+++ b/net-p2p/ctorrent/Manifest
@@ -0,0 +1 @@
+DIST ctorrent-dnh3.3.2.tar.gz 219053 SHA256 c87366c91475931f75b924119580abd06a7b3cb3f00fef47346552cab1e24863 SHA512 e59b2b899b8603e42a5754d5ce65f661b135b8e107140e0472af379b2b06ee2985239ed0ebf19dcaef788e617b99eac35ad32ad2d10352e2fcf5a6dc084d27dd WHIRLPOOL e89518e8fccd27e91027b954e0a25367536ebab1d91a959d51229a6779cdd0649154536df61316b88c4d9f236af90e0638d81df5c56d8230a4081a35604dc910
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..751caa55c09d
--- /dev/null
+++ b/net-p2p/ctorrent/ctorrent-3.3.2-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+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"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-CVE-2009-1759.patch
+ epatch "${FILESDIR}"/${P}-negative-ints.patch
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog README-DNH.TXT README NEWS
+}
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..41020ae5888f
--- /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>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">dtorrent</remote-id>
+ </upstream>
+</pkgmetadata>
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..a69cbe83ae67
--- /dev/null
+++ b/net-p2p/datacoin-hp/datacoin-hp-9999.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..7a1f414ab9cb
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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.logrotate b/net-p2p/datacoin-hp/files/datacoin.logrotate
new file mode 100644
index 000000000000..910bafe7de1d
--- /dev/null
+++ b/net-p2p/datacoin-hp/files/datacoin.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/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/metadata.xml b/net-p2p/datacoin-hp/metadata.xml
new file mode 100644
index 000000000000..0fb5c9c60a36
--- /dev/null
+++ b/net-p2p/datacoin-hp/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>
+ <email>email@missionaccomplish.com</email>
+ <name>Fernando V.</name>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</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..0ab94ff97279
--- /dev/null
+++ b/net-p2p/dbhub/Manifest
@@ -0,0 +1 @@
+DIST dbhub-0.451.tbz2 239911 SHA256 941b384d11c181ed270d546f0867dc517693d05fdcdacb14b0b7c682022663b8
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..9b7009cd96e3
--- /dev/null
+++ b/net-p2p/dbhub/dbhub-0.451-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..b801d1628357
--- /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>
+ <herd>net-p2p</herd>
+ <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/dclib/Manifest b/net-p2p/dclib/Manifest
new file mode 100644
index 000000000000..cf90b79247f3
--- /dev/null
+++ b/net-p2p/dclib/Manifest
@@ -0,0 +1 @@
+DIST dclib-0.3.23.tar.bz2 517251 SHA256 757b67cb1158a93fd826ef358ec094f59ba9dca0dde94a1d7325833f222e4dd0
diff --git a/net-p2p/dclib/dclib-0.3.23.ebuild b/net-p2p/dclib/dclib-0.3.23.ebuild
new file mode 100644
index 000000000000..3945a73501a5
--- /dev/null
+++ b/net-p2p/dclib/dclib-0.3.23.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="DirectConnect client library"
+HOMEPAGE="http://sourceforge.net/projects/wxdcgui"
+SRC_URI="mirror://sourceforge/wxdcgui/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86"
+IUSE="socks5 ssl"
+
+DEPEND="app-arch/bzip2
+ sys-libs/zlib
+ dev-libs/libxml2
+ socks5? ( net-proxy/dante )
+ ssl? ( dev-libs/openssl )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-openssl-1.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable socks5 socks) \
+ $(use_enable ssl)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-p2p/dclib/files/dclib-0.3.23-asneeded.patch b/net-p2p/dclib/files/dclib-0.3.23-asneeded.patch
new file mode 100644
index 000000000000..d3634c424c2e
--- /dev/null
+++ b/net-p2p/dclib/files/dclib-0.3.23-asneeded.patch
@@ -0,0 +1,16 @@
+Changing order allows ACX_PHTREAD to find -lthread
+before trying to use -pthread
+
+http://bugs.gentoo.org/show_bug.cgi?id=282426
+
+--- m4/acx_pthread.m4
++++ m4/acx_pthread.m4
+@@ -123,7 +123,7 @@
+ # which indicates that we try without any flags at all, and "pthread-config"
+ # which is a program returning the flags for the Pth emulation library.
+
+-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
++acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config"
+
+ # The ordering *is* (sometimes) important. Some notes on the
+ # individual items follow:
diff --git a/net-p2p/dclib/files/dclib-0.3.23-openssl-1.patch b/net-p2p/dclib/files/dclib-0.3.23-openssl-1.patch
new file mode 100644
index 000000000000..f8b4a4bc2af2
--- /dev/null
+++ b/net-p2p/dclib/files/dclib-0.3.23-openssl-1.patch
@@ -0,0 +1,52 @@
+http://bugs.gentoo.org/330291
+
+--- dclib/core/cssl.cpp
++++ dclib/core/cssl.cpp
+@@ -86,7 +86,11 @@
+ /** */
+ SSL_CTX * CSSL::InitClientCTX()
+ {
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *method;
++ #else
+ SSL_METHOD *method;
++ #endif
+ SSL_CTX *ctx = NULL;
+
+ method = SSLv23_client_method(); /* Create new client-method instance */
+@@ -109,7 +113,11 @@
+ /** */
+ SSL_CTX * CSSL::InitServerCTX()
+ {
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *method;
++ #else
+ SSL_METHOD *method;
++ #endif
+ SSL_CTX *ctx = NULL;
+
+ method = SSLv23_server_method(); /* Create new client-method instance */
+@@ -130,7 +138,11 @@
+ /** */
+ SSL_CTX * CSSL::NewTLSv1ClientCTX()
+ {
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD * method = TLSv1_client_method();
++ #else
+ SSL_METHOD * method = TLSv1_client_method();
++ #endif
+ SSL_CTX * ctx = NULL;
+
+ if ( method != NULL )
+@@ -149,7 +161,11 @@
+ /** */
+ SSL_CTX * CSSL::NewTLSv1ServerCTX()
+ {
++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD * method = TLSv1_server_method();
++ #else
+ SSL_METHOD * method = TLSv1_server_method();
++ #endif
+ SSL_CTX * ctx = NULL;
+
+ if ( method != NULL )
diff --git a/net-p2p/dclib/metadata.xml b/net-p2p/dclib/metadata.xml
new file mode 100644
index 000000000000..b6e0d287755a
--- /dev/null
+++ b/net-p2p/dclib/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">wxdcgui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/deluge/Manifest b/net-p2p/deluge/Manifest
new file mode 100644
index 000000000000..2fb82ca2e51f
--- /dev/null
+++ b/net-p2p/deluge/Manifest
@@ -0,0 +1,2 @@
+DIST deluge-1.3.11.tar.bz2 1792459 SHA256 83e1f41b8a2a6e7ba86a54474692d4686db509b75441173d9603447f9e0ec898 SHA512 d56c03f3c687cdee65f8d7f26728a46cae1fd665c49313bd2b91243d26df0f5b2292048fd542333cbc538383eb53cd961bc3427230f9081317268735df367272 WHIRLPOOL 52820837a24ef3d4917a1b018fa30c8ec662a6c2366cb848fb984b716175bad63131e7cc4eea7688405e380102cf0ebb5ae4b58dcd7c90fd7dde9dcc9dada444
+DIST deluge-1.3.6.tar.bz2 1725202 SHA256 756a025d88752f39133aa34d8fc96d4ce216113919488d60098ee41f860a1f60 SHA512 22a8308c139e95190b3832ee9547e7c84a56cf1cc6f18ecebaf7af7997d73efe41664fd875e7e1753eb0b1e616f12e5e54f5fb2790261753b85f5512b8882e12 WHIRLPOOL f43a5ae5a94fc49cb76ee3561b18b9aeaff759c72a77d629170f4294e63c90f883e346eb0a5c75c0d13683fdf1848b07af2bfcd6432253cd40642735e50d10e1
diff --git a/net-p2p/deluge/deluge-1.3.11.ebuild b/net-p2p/deluge/deluge-1.3.11.ebuild
new file mode 100644
index 000000000000..d42c92d8b4eb
--- /dev/null
+++ b/net-p2p/deluge/deluge-1.3.11.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1 eutils systemd
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-2
+ 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="geoip gtk libnotify setproctitle sound webinterface"
+
+DEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
+ dev-util/intltool"
+RDEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ >=dev-python/twisted-core-8.1[${PYTHON_USEDEP}]
+ >=dev-python/twisted-web-8.1[${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}] )
+ )
+ setproctitle? ( dev-python/setproctitle[${PYTHON_USEDEP}] )
+ webinterface? ( dev-python/mako[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.5-disable_libtorrent_internal_copy.patch
+ )
+
+ distutils-r1_python_prepare_all
+}
+
+_distutils-r1_create_setup_cfg() {
+ # 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.
+ :
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ newinitd "${FILESDIR}"/deluged.init deluged
+ newconfd "${FILESDIR}"/deluged.conf deluged
+ systemd_dounit "${FILESDIR}"/deluged.service
+ systemd_dounit "${FILESDIR}"/deluge-web.service
+}
+
+pkg_postinst() {
+ elog
+ elog "If after upgrading it 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 "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
diff --git a/net-p2p/deluge/deluge-1.3.6.ebuild b/net-p2p/deluge/deluge-1.3.6.ebuild
new file mode 100644
index 000000000000..dd87373482e4
--- /dev/null
+++ b/net-p2p/deluge/deluge-1.3.6.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2:2.5"
+
+inherit distutils eutils python systemd
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+SRC_URI="http://download.deluge-torrent.org/source/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~sparc x86"
+IUSE="geoip gtk libnotify setproctitle sound webinterface"
+
+DEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
+ dev-python/setuptools
+ dev-util/intltool"
+RDEPEND="${DEPEND}
+ dev-python/chardet
+ dev-python/pyopenssl
+ dev-python/pyxdg
+ || ( dev-lang/python:2.7 dev-lang/python:2.6 dev-python/simplejson )
+ >=dev-python/twisted-core-8.1
+ >=dev-python/twisted-web-8.1
+ geoip? ( dev-libs/geoip )
+ gtk? (
+ sound? ( dev-python/pygame )
+ dev-python/pygobject:2
+ >=dev-python/pygtk-2.12
+ gnome-base/librsvg
+ libnotify? ( dev-python/notify-python )
+ )
+ setproctitle? ( dev-python/setproctitle )
+ webinterface? ( dev-python/mako )"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ distutils_src_prepare
+ python_convert_shebangs -r 2 .
+ epatch "${FILESDIR}/${PN}-1.3.5-disable_libtorrent_internal_copy.patch"
+
+}
+
+src_install() {
+ distutils_src_install
+ newinitd "${FILESDIR}"/deluged.init deluged
+ newconfd "${FILESDIR}"/deluged.conf deluged
+ systemd_dounit "${FILESDIR}"/deluged.service
+ systemd_dounit "${FILESDIR}"/deluge-web.service
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ elog
+ elog "If after upgrading it 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 "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..7aa1cdb941fc
--- /dev/null
+++ b/net-p2p/deluge/deluge-9999.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1 eutils systemd
+
+DESCRIPTION="BitTorrent client with a client/server model"
+HOMEPAGE="http://deluge-torrent.org/"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-2
+ 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="geoip gtk libnotify setproctitle sound webinterface"
+
+DEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
+ dev-util/intltool"
+RDEPEND=">=net-libs/rb_libtorrent-0.14.9[python]
+ dev-python/chardet
+ dev-python/pyopenssl
+ dev-python/pyxdg
+ >=dev-python/twisted-core-8.1
+ >=dev-python/twisted-web-8.1
+ geoip? ( dev-libs/geoip )
+ gtk? (
+ sound? ( dev-python/pygame )
+ dev-python/pygobject:2
+ >=dev-python/pygtk-2.12
+ gnome-base/librsvg
+ libnotify? ( dev-python/notify-python )
+ )
+ setproctitle? ( dev-python/setproctitle )
+ webinterface? ( dev-python/mako )"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.5-disable_libtorrent_internal_copy.patch
+ )
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ newinitd "${FILESDIR}"/deluged.init deluged
+ newconfd "${FILESDIR}"/deluged.conf deluged
+ systemd_dounit "${FILESDIR}"/deluged.service
+ systemd_dounit "${FILESDIR}"/deluge-web.service
+}
+
+pkg_postinst() {
+ elog
+ elog "If after upgrading it 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 "For more information look at http://dev.deluge-torrent.org/wiki/Faq"
+ elog
+}
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..235b7f7c2438
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.5-disable_libtorrent_internal_copy.patch
@@ -0,0 +1,42 @@
+--- setup.py
++++ 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-1.3.5-rb_libtorrent-disable-python-bindings b/net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings
new file mode 100644
index 000000000000..301019e04aed
--- /dev/null
+++ b/net-p2p/deluge/files/deluge-1.3.5-rb_libtorrent-disable-python-bindings
@@ -0,0 +1,60 @@
+https://bugs.gentoo.org/show_bug.cgi?id=437356
+
+From 37ea2854a21e50debdf7bc953a3411e5934b74d9 Mon Sep 17 00:00:00 2001
+From: Calum Lind <calumlind+deluge@gmail.com>
+Date: Thu, 27 Sep 2012 16:53:22 +0000
+Subject: Fix 2160 : Disable use of python bindings for libtorrent extensions and replace with session flag
+
+The fixes a GIL issue causing libtorrent segfault. https://code.google.com/p/libtorrent/issues/detail?id=369
+
+Note: The ut_pex plugin (Peer Exchange) will now always be enabled.
+---
+diff --git a/deluge/core/core.py b/deluge/core/core.py
+index 4bda811..4ca3d96 100644
+--- a/deluge/core/core.py
++++ b/deluge/core/core.py
+@@ -84,7 +84,10 @@ class Core(component.Component):
+ while len(version) < 4:
+ version.append(0)
+
+- self.session = lt.session(lt.fingerprint("DE", *version), flags=0)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ # Setting session flags to 1 enables all libtorrent default plugins
++ self.session = lt.session(lt.fingerprint("DE", *version), flags=1)
+
+ # Load the session state if available
+ self.__load_session_state()
+@@ -103,9 +106,11 @@ class Core(component.Component):
+ self.session.set_settings(self.settings)
+
+ # Load metadata extension
+- self.session.add_extension(lt.create_metadata_plugin)
+- self.session.add_extension(lt.create_ut_metadata_plugin)
+- self.session.add_extension(lt.create_smart_ban_plugin)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ # self.session.add_extension(lt.create_metadata_plugin)
++ # self.session.add_extension(lt.create_ut_metadata_plugin)
++ # self.session.add_extension(lt.create_smart_ban_plugin)
+
+ # Create the components
+ self.eventmanager = EventManager()
+diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py
+index 40070bb..2a5cb1b 100644
+--- a/deluge/core/preferencesmanager.py
++++ b/deluge/core/preferencesmanager.py
+@@ -338,7 +338,10 @@ class PreferencesManager(component.Component):
+ def _on_set_utpex(self, key, value):
+ log.debug("utpex value set to %s", value)
+ if value:
+- self.session.add_extension(lt.create_ut_pex_plugin)
++ # Note: All libtorrent python bindings to set plugins/extensions need to be disabled
++ # due to GIL issue. https://code.google.com/p/libtorrent/issues/detail?id=369
++ #self.session.add_extension(lt.create_ut_pex_plugin)
++ pass
+
+ def _on_set_encryption(self, key, value):
+ log.debug("encryption value %s set to %s..", key, value)
+--
+cgit v0.9.0.2
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/deluged.conf b/net-p2p/deluge/files/deluged.conf
new file mode 100644
index 000000000000..0918f45fc7ff
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.conf
@@ -0,0 +1,8 @@
+# /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_OPTS="-p 58846"
+DELUGEUI_START="false"
+DELUGEUI_OPTS="-u web"
+
diff --git a/net-p2p/deluge/files/deluged.init b/net-p2p/deluge/files/deluged.init
new file mode 100644
index 000000000000..e60945df1558
--- /dev/null
+++ b/net-p2p/deluge/files/deluged.init
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+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 /var/run/deluged.pid --background --make-pidfile \
+ --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 \
+ /var/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 /var/run/deluged.pid
+ eend $?
+
+
+ if [ "${DELUGEUI_START}" = "true" ] ; then
+ ebegin "Stopping Deluge"
+ start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
+ --name deluge --pidfile /var/run/deluge.pid
+ eend $?
+ fi
+}
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/metadata.xml b/net-p2p/deluge/metadata.xml
new file mode 100644
index 000000000000..169929587be5
--- /dev/null
+++ b/net-p2p/deluge/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+<use>
+ <flag name='setproctitle'>Install dependencies needed for beautifying
+ the process name</flag>
+ <flag name='webinterface'>Install dependencies needed for the web
+ interface</flag>
+</use>
+</pkgmetadata>
diff --git a/net-p2p/dogecoin-qt/Manifest b/net-p2p/dogecoin-qt/Manifest
new file mode 100644
index 000000000000..4a14f09b5e76
--- /dev/null
+++ b/net-p2p/dogecoin-qt/Manifest
@@ -0,0 +1 @@
+DIST dogecoin-1.6.tar.gz 3405829 SHA256 cab04d7a33de1b429440bfa98506d4a64417a70bddcb9a33342b38837edf54fd SHA512 dd40d96f87aa787af3ae7da38ec33c94bdc15b1176c2468c3a7408778b3b0e64f2c2bdafa3a85e72ef02fe4b9f931cbe7dec33b1da3bc867978d747f31662621 WHIRLPOOL 9721725f24d712caeab03b863115b9f3d553951cdf48885a3cdc4899f5e5a5eec5a7c1c63c22b5bf7ff93c73cc90b15f8b9c1f4318d8737c1cfa4f7e5aafd1ae
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..56c901ef1f9e
--- /dev/null
+++ b/net-p2p/dogecoin-qt/dogecoin-qt-1.6.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..0439a5a398a1
--- /dev/null
+++ b/net-p2p/dogecoin-qt/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>
+ <email>sdamashek@gentoo.org</email>
+ <name>Samuel Damashek</name>
+ </maintainer>
+ <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..e52f53d1715c
--- /dev/null
+++ b/net-p2p/ed2k_hash/Manifest
@@ -0,0 +1 @@
+DIST ed2k_hash-0.4.0.tar.gz 113158 SHA256 554b2d9fb3ce668312341f43bafc95cf985059d83bf5e82f92547610c7f2bf18 SHA512 f924c6b39bf82fe0d4e68decb5ae9fb5ce2999e8b1d3083ba97c178f3f716634603982962947cecb2ef20de56672b10e833d104bae9627ae180ba629c9e1b4c6 WHIRLPOOL e65036d632a6dfed746c851c76727fe43ae3fbb7818a0ec2d26d0190279b9a119c2854158124c5bc493ada9421acc0bfcf9229ab3f016e291ac9f8f0c7264481
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..666a7b1de820
--- /dev/null
+++ b/net-p2p/ed2k_hash/ed2k_hash-0.4.0-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/files/ed2k_64bit.patch b/net-p2p/ed2k_hash/files/ed2k_64bit.patch
new file mode 100644
index 000000000000..7425bb0c03fc
--- /dev/null
+++ b/net-p2p/ed2k_hash/files/ed2k_64bit.patch
@@ -0,0 +1,12 @@
+--- ed2k_hash-0.4.0/work/ed2k_hash-0.4.0/ed2k_hash/md4.h 2002-09-04 18:24:37.000000000 +0100
++++ ed2k_hash-0.4.0_orig/work/ed2k_hash-0.4.0/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..d3e5908971f1
--- /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>
+ <herd>net-p2p</herd>
+ <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..a9d1493487fa
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/Manifest
@@ -0,0 +1 @@
+DIST eiskaltdcpp-2.2.9.tar.xz 2327732 SHA256 3d9170645450f9cb0a605278b8646fec2110b9637910d86fd27cf245cbe24eaf SHA512 0de95d3dcfb860f262073497e8dacc6bb4371d72a13f23bf7981e96203d7361a2e078b45826c12a81cc8fbe8423ee231232e2874a02bcef76f96b516cb7e301c WHIRLPOOL a1ab51ef32a96cb6af5b6988068f93cade26def068509f269eb95a934e07adfddf850e85d1c48eb5fb3ba75cff97d5e4bf6843a4375c099dcb2658be983c008f
diff --git a/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.9.ebuild b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.9.ebuild
new file mode 100644
index 000000000000..10ce22e79776
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/eiskaltdcpp-2.2.9.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="be bg cs de el en es fr hu it pl pt_BR ru sk sr@latin uk"
+
+inherit cmake-utils eutils l10n fdo-mime gnome2-utils
+[[ ${PV} = *9999* ]] && inherit git-r3
+
+DESCRIPTION="Qt based client for DirectConnect and ADC protocols, based on DC++ library"
+HOMEPAGE="https://code.google.com/p/eiskaltdc/"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="cli daemon dbus +dht +emoticons examples -gtk idn -javascript json libcanberra libnotify lua +minimal pcre +qt4 sound spell sqlite upnp -xmlrpc"
+
+REQUIRED_USE="
+ cli? ( ^^ ( json xmlrpc ) )
+ emoticons? ( || ( gtk qt4 ) )
+ dbus? ( qt4 )
+ javascript? ( qt4 )
+ json? ( !xmlrpc )
+ libcanberra? ( gtk )
+ libnotify? ( gtk )
+ spell? ( qt4 )
+ sound? ( || ( gtk qt4 ) )
+ sqlite? ( qt4 )
+"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://eiskaltdc.googlecode.com/files/${P}.tar.xz"
+ KEYWORDS="amd64 x86"
+else
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ KEYWORDS=""
+fi
+
+RDEPEND="
+ app-arch/bzip2
+ >=dev-libs/boost-1.38:=
+ >=dev-libs/openssl-0.9.8
+ sys-apps/attr
+ sys-libs/zlib
+ virtual/libiconv
+ virtual/libintl
+ idn? ( net-dns/libidn )
+ lua? ( >=dev-lang/lua-5.1 )
+ pcre? ( >=dev-libs/libpcre-4.2 )
+ upnp? ( >=net-libs/miniupnpc-1.6 )
+ cli? (
+ >=dev-lang/perl-5.10
+ virtual/perl-Getopt-Long
+ dev-perl/Data-Dump
+ dev-perl/Term-ShellUI
+ json? ( dev-perl/JSON-RPC )
+ xmlrpc? ( dev-perl/RPC-XML )
+ )
+ daemon? ( xmlrpc? ( >=dev-libs/xmlrpc-c-1.19.0[abyss,cxx] ) )
+ gtk? (
+ x11-libs/pango
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.24:2
+ x11-themes/hicolor-icon-theme
+ libcanberra? ( media-libs/libcanberra )
+ libnotify? ( >=x11-libs/libnotify-0.4.1 )
+ )
+ qt4? (
+ >=dev-qt/qtcore-4.6.0:4
+ >=dev-qt/qtgui-4.6.0:4
+ dbus? ( >=dev-qt/qtdbus-4.6.0:4 )
+ javascript? (
+ dev-qt/qtscript:4
+ x11-libs/qtscriptgenerator
+ )
+ spell? ( app-text/aspell )
+ sqlite? ( dev-qt/qtsql:4[sqlite] )
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+DOCS=( AUTHORS ChangeLog.txt )
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 4 ]] ) \
+ && die "Sorry, but gcc-4.4 and earlier won't work."
+ fi
+}
+
+src_prepare() {
+ l10n_find_plocales_changes 'eiskaltdcpp-qt/translations' '' '.ts'
+
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -Dlinguas="$(l10n_get_locales)"
+ -DLOCAL_MINIUPNP=OFF
+ -DUSE_GTK=OFF
+ -DUSE_LIBGNOME2=OFF
+ "$(use cli && cmake-utils_use json USE_CLI_JSONRPC)"
+ "$(use cli && cmake-utils_use xmlrpc USE_CLI_XMLRPC)"
+ "$(cmake-utils_use daemon NO_UI_DAEMON)"
+ "$(use daemon && cmake-utils_use json JSONRPC_DAEMON)"
+ "$(use daemon && cmake-utils_use xmlrpc XMLRPC_DAEMON)"
+ "$(cmake-utils_use dbus DBUS_NOTIFY)"
+ "$(cmake-utils_use dht WITH_DHT)"
+ "$(cmake-utils_use emoticons WITH_EMOTICONS)"
+ "$(cmake-utils_use examples WITH_EXAMPLES)"
+ "$(cmake-utils_use gtk USE_GTK3)"
+ "$(cmake-utils_use idn USE_IDNA)"
+ "$(cmake-utils_use javascript USE_JS)"
+ "$(cmake-utils_use libcanberra LIBCANBERRA)"
+ "$(cmake-utils_use libnotify USE_LIBNOTIFY)"
+ "$(cmake-utils_use lua LUA_SCRIPT)"
+ "$(cmake-utils_use lua WITH_LUASCRIPTS)"
+ "$(cmake-utils_use !minimal WITH_DEV_FILES)"
+ "$(cmake-utils_use pcre PERL_REGEX)"
+ "$(cmake-utils_use qt4 USE_QT)"
+ "$(cmake-utils_use sound WITH_SOUNDS)"
+ "$(cmake-utils_use spell USE_ASPELL)"
+ "$(cmake-utils_use sqlite USE_QT_SQLITE)"
+ "$(cmake-utils_use upnp USE_MINIUPNP)"
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_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..749060466978
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/eiskaltdcpp-9999.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="be bg cs de el en es fr hu it pl pt_BR ru sk sr@latin sv_SE uk vi zh_CN"
+
+inherit cmake-utils eutils l10n fdo-mime gnome2-utils
+[[ ${PV} = *9999* ]] && inherit git-r3
+
+DESCRIPTION="Qt based client for DirectConnect and ADC protocols, based on DC++ library"
+HOMEPAGE="https://code.google.com/p/eiskaltdc/"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="cli daemon dbus +dht +emoticons examples -gtk idn -javascript json libcanberra libnotify lua +minimal pcre +qt4 sound spell sqlite upnp -xmlrpc"
+
+REQUIRED_USE="
+ cli? ( ^^ ( json xmlrpc ) )
+ emoticons? ( || ( gtk qt4 ) )
+ dbus? ( qt4 )
+ javascript? ( qt4 )
+ json? ( !xmlrpc )
+ libcanberra? ( gtk )
+ libnotify? ( gtk )
+ spell? ( qt4 )
+ sound? ( || ( gtk qt4 ) )
+ sqlite? ( qt4 )
+"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://eiskaltdc.googlecode.com/files/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+else
+ EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
+ KEYWORDS=""
+fi
+
+RDEPEND="
+ app-arch/bzip2
+ >=dev-libs/boost-1.38:=
+ >=dev-libs/openssl-0.9.8
+ sys-apps/attr
+ sys-libs/zlib
+ virtual/libiconv
+ virtual/libintl
+ idn? ( net-dns/libidn )
+ lua? ( >=dev-lang/lua-5.1 )
+ pcre? ( >=dev-libs/libpcre-4.2 )
+ upnp? ( >=net-libs/miniupnpc-1.6 )
+ cli? (
+ >=dev-lang/perl-5.10
+ virtual/perl-Getopt-Long
+ dev-perl/Data-Dump
+ dev-perl/Term-ShellUI
+ json? ( dev-perl/JSON-RPC )
+ xmlrpc? ( dev-perl/RPC-XML )
+ )
+ daemon? ( xmlrpc? ( >=dev-libs/xmlrpc-c-1.19.0[abyss,cxx] ) )
+ gtk? (
+ x11-libs/pango
+ x11-libs/gtk+:3
+ >=dev-libs/glib-2.24:2
+ x11-themes/hicolor-icon-theme
+ libcanberra? ( media-libs/libcanberra )
+ libnotify? ( >=x11-libs/libnotify-0.4.1 )
+ )
+ qt4? (
+ >=dev-qt/qtcore-4.6.0:4
+ >=dev-qt/qtgui-4.6.0:4
+ dbus? ( >=dev-qt/qtdbus-4.6.0:4 )
+ javascript? (
+ dev-qt/qtscript:4
+ x11-libs/qtscriptgenerator
+ )
+ spell? ( app-text/aspell )
+ sqlite? ( dev-qt/qtsql:4[sqlite] )
+ )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+DOCS=( AUTHORS ChangeLog.txt )
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -le 4 ]] ) \
+ && die "Sorry, but gcc-4.4 and earlier won't work."
+ fi
+}
+
+src_prepare() {
+ l10n_find_plocales_changes 'eiskaltdcpp-qt/translations' '' '.ts'
+
+ epatch_user
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -Dlinguas="$(l10n_get_locales)"
+ -DLOCAL_MINIUPNP=OFF
+ -DUSE_GTK=OFF
+ -DUSE_LIBGNOME2=OFF
+ "$(use cli && cmake-utils_use json USE_CLI_JSONRPC)"
+ "$(use cli && cmake-utils_use xmlrpc USE_CLI_XMLRPC)"
+ "$(cmake-utils_use daemon NO_UI_DAEMON)"
+ "$(use daemon && cmake-utils_use json JSONRPC_DAEMON)"
+ "$(use daemon && cmake-utils_use xmlrpc XMLRPC_DAEMON)"
+ "$(cmake-utils_use dbus DBUS_NOTIFY)"
+ "$(cmake-utils_use dht WITH_DHT)"
+ "$(cmake-utils_use emoticons WITH_EMOTICONS)"
+ "$(cmake-utils_use examples WITH_EXAMPLES)"
+ "$(cmake-utils_use gtk USE_GTK3)"
+ "$(cmake-utils_use idn USE_IDNA)"
+ "$(cmake-utils_use javascript USE_JS)"
+ "$(cmake-utils_use libcanberra LIBCANBERRA)"
+ "$(cmake-utils_use libnotify USE_LIBNOTIFY)"
+ "$(cmake-utils_use lua LUA_SCRIPT)"
+ "$(cmake-utils_use lua WITH_LUASCRIPTS)"
+ "$(cmake-utils_use !minimal WITH_DEV_FILES)"
+ "$(cmake-utils_use pcre PERL_REGEX)"
+ "$(cmake-utils_use qt4 USE_QT)"
+ "$(cmake-utils_use sound WITH_SOUNDS)"
+ "$(cmake-utils_use spell USE_ASPELL)"
+ "$(cmake-utils_use sqlite USE_QT_SQLITE)"
+ "$(cmake-utils_use upnp USE_MINIUPNP)"
+ )
+ cmake-utils_src_configure
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/eiskaltdcpp/metadata.xml b/net-p2p/eiskaltdcpp/metadata.xml
new file mode 100644
index 000000000000..22fd8fd7bb0a
--- /dev/null
+++ b/net-p2p/eiskaltdcpp/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+</maintainer>
+<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="emoticons">Install emoticon packs</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>
+</pkgmetadata>
diff --git a/net-p2p/fms/Manifest b/net-p2p/fms/Manifest
new file mode 100644
index 000000000000..1886ec79ae72
--- /dev/null
+++ b/net-p2p/fms/Manifest
@@ -0,0 +1,2 @@
+DIST fms-src-0.3.73.zip 3519550 SHA256 f20985efa71c77c843f7cd16e437414ba2810c5a69d7917456e2a2e6e551a6e5 SHA512 457a6808e85dce8ac3cc31ac465eeb6e271294b6aac9436a12adb21f1dacc5ef8726c558dd6734a7418cff1ce92c172062e0eb5b4642e29a83235cccc9198d2c WHIRLPOOL 8fd8a4b59b003df5b3b91f9d9dde134b3832fb572a772e3129889c56c5c9be10040161cff8fcb1b6183ebe156b9b340bef2481d43519044a8cb54ed0887624a4
+DIST fms-src-0.3.75.zip 3691556 SHA256 1fe5e84aba572143fe95ffb384177e150d5cd4dff2930462b9df24b59c03d85e SHA512 ce5754c0f15c18c0e9692bb840119576ffa9eca05ca38060a0778fc170a614d394ffcc06274bcdc4db5659d176f00e993904a76099382e7eea5685c3a83d3cd8 WHIRLPOOL 405198eff290d8b55e5b5c164fbbd845c086ed76d6d17efa24ab630c109d09b83c8a956b45d6613672b08a19101275a6a8375ba06065e6d9e9b20e1da6c759af
diff --git a/net-p2p/fms/files/fms b/net-p2p/fms/files/fms
new file mode 100644
index 000000000000..8def4b0eba60
--- /dev/null
+++ b/net-p2p/fms/files/fms
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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-libs2.patch b/net-p2p/fms/files/fms-use-system-libs2.patch
new file mode 100644
index 000000000000..39e62e341794
--- /dev/null
+++ b/net-p2p/fms/files/fms-use-system-libs2.patch
@@ -0,0 +1,22 @@
+--- CMakeLists.txt 2012-03-04 13:01:24.000000000 +0100
++++ CMakeLists.txt.new 2012-03-08 22:14:27.000000000 +0100
+@@ -353,9 +353,16 @@
+ ENDIF(AUDIO_CAPTCHA)
+
+ IF(FROST_SUPPORT)
+- ADD_SUBDIRECTORY(libs/polarssl)
+- TARGET_LINK_LIBRARIES(fms polarssl)
+- INCLUDE_DIRECTORIES(libs/polarssl/include)
++
++ FIND_LIBRARY(POLARSSL_LIBRARY NAMES polarssl libpolarssl)
++
++ IF(POLARSSL_LIBRARY)
++ TARGET_LINK_LIBRARIES(fms ${POLARSSL_LIBRARY})
++ ELSE(POLARSSL_LIBRARY)
++ ADD_SUBDIRECTORY(libs/polarssl)
++ TARGET_LINK_LIBRARIES(fms polarssl)
++ INCLUDE_DIRECTORIES(libs/polarssl/include)
++ ENDIF(POLARSSL_LIBRARY)
+
+ ADD_DEFINITIONS(-DFROST_SUPPORT)
+
diff --git a/net-p2p/fms/fms-0.3.73.ebuild b/net-p2p/fms/fms-0.3.73.ebuild
new file mode 100644
index 000000000000..4db60f324d86
--- /dev/null
+++ b/net-p2p/fms/fms-0.3.73.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/polarssl )
+ >=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() {
+ edos2unix src/http/pages/showfilepage.cpp
+ epatch "${FILESDIR}"/${PN}-use-system-libs2.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/fms-0.3.75.ebuild b/net-p2p/fms/fms-0.3.75.ebuild
new file mode 100644
index 000000000000..c3014c21a68f
--- /dev/null
+++ b/net-p2p/fms/fms-0.3.75.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/polarssl )
+ >=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() {
+ edos2unix src/http/pages/showfilepage.cpp
+ epatch "${FILESDIR}"/${PN}-use-system-libs2.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..6c6e72a6d9fb
--- /dev/null
+++ b/net-p2p/fms/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>
+ <email>tommy@gentoo.org</email>
+ <name>Thomas Sachau (Tommy[D])</name>
+ </maintainer>
+ <herd>net-p2p</herd>
+ <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..f0a9d4308820
--- /dev/null
+++ b/net-p2p/freenet/Manifest
@@ -0,0 +1,5 @@
+DIST freenet-0.7.5_p1466.zip 4713492 SHA256 561819f7ca186bbc171d3123ad23f5692ab9d90a6237986a0ee4f16edde44d40 SHA512 0406eaae3c456e24db83886d2b619d5f063efb1cb313017e95437214e7a73bd48190c4128f22a9b4d919dc03acdd45bd2d20f51d35552c3777ca14644e26ec03 WHIRLPOOL f0f5778c939997f0fd2db58e5f78d6d32c95ee1768aff19d68f5b057c0623faafb712574db30a39524510cabf49138d920a9fb7e55232111dc3e8ddba3ea93b5
+DIST freenet-0.7.5_p1467.zip 4715115 SHA256 1547ffea356c35a03ce62a35d9fa601b45beee1d8f78e17116e09461a4d0e27f SHA512 419651183b804f66735d2d5aa78ba571373a140f7da53c05499462caf8fe774edcaa2ad34b04b94340a0064b6f334a2d53c4d1c25f4c02e1b79940f62e8878cd WHIRLPOOL ebb23f738bcf10e66d364b3be5621a1d8e5b52862919ef8f1892624a1993a2b361a1b1cc57a342699fd55303920ddc795f11502eef25d26c9deff753d11df2c5
+DIST freenet-ant-1.7.1.jar 1327167 SHA256 634e0b616d65d611419920e8b379b7b66399e44f520baa772147ed73743433b1 SHA512 2c84378d995fed0630169fffab020bde89c3edb7b3bc1e14e2251ed71be684dc2520fdeed8bae382de362984e25a31dcd59326ef8735f8066166c1e8d98ca408 WHIRLPOOL 667be2b1581c5fd847907b63522a0f83c595a6b8f1805d714e978a5cb0f05de4804153c89605618adf5c3b097a7019e7d7e9de0bf0987c7b1adb0dbc54e0f055
+DIST seednodes-20140810.fref.bz2 11566 SHA256 51650b15395b0b57a01c2a917854007021bc5d3284b6eb3d3c167e8d0fa5bf58 SHA512 9d999f57cafd26ef7e5e0768d07dca18d923c82da0b9da447ad78a0ec8cfe087168c3fc17e776e8120e68149d7839cabf03e7a18086a32f11f7348d1d64768e1 WHIRLPOOL 90035bef3351681cc0bcb97bcd98431eeb2566c9c39ccf4eadf5c555f494a1faeb687569881501c88f54270db91139408c820fe6f541aab3c695277a2ec04df0
+DIST seednodes-20150427.fref.bz2 12926 SHA256 6f2a50e8dbfdf81840b11bcb64bf37587efd08afe521709d0071f9dbc4366812 SHA512 821b204fac745b7baad23dd0fd0effc956f7a2013ac96e76daa3475113b254dd332c87a306cc78e80a806800b052d04ce35d2007c1afced2cc180e327cf0ebb5 WHIRLPOOL 3ae7880e8b1bad93b2ca2f47c2bd384bce4ead13f665c8c9fbee5fbf5d211e135a5c89ad2dd05b47cade4e03fd33780cf11aa6989da019ca22adb74e1e8a3e61
diff --git a/net-p2p/freenet/files/0.7.5_p1302-ext.patch b/net-p2p/freenet/files/0.7.5_p1302-ext.patch
new file mode 100644
index 000000000000..035b4e638cc6
--- /dev/null
+++ b/net-p2p/freenet/files/0.7.5_p1302-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 = RECOMMENDED_EXT_BUILD_NUMBER;
++ 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_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/freenet b/net-p2p/freenet/files/freenet
new file mode 100644
index 000000000000..f276ee4ea0f4
--- /dev/null
+++ b/net-p2p/freenet/files/freenet
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ start-stop-daemon --start --chuid freenet --exec /bin/sh /var/freenet/run.sh start 2>/dev/null
+ eend 0
+}
+
+status() {
+ start-stop-daemon --start --chuid freenet --exec /bin/sh /var/freenet/run.sh status 2>/dev/null
+ eend 0
+}
+
+stop() {
+ start-stop-daemon --start --chuid 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_p1384-libraryloader-just-try-loading.patch b/net-p2p/freenet/files/freenet-0.7.5_p1384-libraryloader-just-try-loading.patch
new file mode 100644
index 000000000000..ffe9354dc846
--- /dev/null
+++ b/net-p2p/freenet/files/freenet-0.7.5_p1384-libraryloader-just-try-loading.patch
@@ -0,0 +1,17 @@
+--- freenet-0.7.5_p1384/src/freenet/support/LibraryLoader.java.orig 2011-07-29 17:32:37.000000000 +0200
++++ freenet-0.7.5_p1384/src/freenet/support/LibraryLoader.java 2011-07-29 17:35:02.000000000 +0200
+@@ -48,12 +48,11 @@
+ final String libraryNameWithPrefixAndArchAndSuffix = libraryNameWithPrefixAndArch + prefix;
+ String resourceName = path + libraryNameWithPrefixAndArchAndSuffix;
+
+- File nativeLib = new File((System.getProperty("java.library.path")) + "/lib" + libraryName + prefix);
+- if (nativeLib.exists()) {
++ try {
+ System.out.println("Attempting to load the NativeThread library ["+libraryName+']');
+ System.loadLibrary(libraryName);
+ success = true;
+- } else {
++ } catch(UnsatisfiedLinkError ule) {
+ try {
+ // Get the resource
+ URL resource = LibraryLoader.class.getResource(resourceName);
diff --git a/net-p2p/freenet/files/freenet-0.7.5_p1384-nativebiginteger-no-nativedoublevalue.patch b/net-p2p/freenet/files/freenet-0.7.5_p1384-nativebiginteger-no-nativedoublevalue.patch
new file mode 100644
index 000000000000..5300fb196235
--- /dev/null
+++ b/net-p2p/freenet/files/freenet-0.7.5_p1384-nativebiginteger-no-nativedoublevalue.patch
@@ -0,0 +1,28 @@
+--- freenet-0.7.5_p1384/src/net/i2p/util/NativeBigInteger.java.orig 2011-07-29 16:48:36.000000000 +0200
++++ freenet-0.7.5_p1384/src/net/i2p/util/NativeBigInteger.java 2011-07-29 16:50:20.000000000 +0200
+@@ -193,12 +193,6 @@
+ */
+ public native static byte[] nativeModPow(byte base[], byte exponent[], byte modulus[]);
+
+- /**
+- * Converts a BigInteger byte-array to a 'double'
+- * @param ba Big endian twos complement representation of the BigInteger to convert to a double
+- * @return The plain double-value represented by 'ba'
+- */
+- public native static double nativeDoubleValue(byte ba[]);
+ private byte[] cachedBa = null;
+
+ /**
+@@ -286,11 +280,7 @@
+
+ @Override
+ public double doubleValue() {
+- // TODO Recent tests show that Java version is quicker. Maybe drop?
+- if(_nativeOk)
+- return nativeDoubleValue(toByteArray());
+- else
+- return super.doubleValue();
++ return super.doubleValue();
+ }
+
+ /**
diff --git a/net-p2p/freenet/files/freenet-0.7.5_p1389-wrapper.conf b/net-p2p/freenet/files/freenet-0.7.5_p1389-wrapper.conf
new file mode 100644
index 000000000000..066f62474293
--- /dev/null
+++ b/net-p2p/freenet/files/freenet-0.7.5_p1389-wrapper.conf
@@ -0,0 +1,49 @@
+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=128
+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=256M
+
+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
+
+# Name of the service
+wrapper.ntservice.name=freenet-darknet
+
+# Display name of the service
+wrapper.ntservice.displayname=Freenet 0.7 darknet
+
+# Description of the service
+wrapper.ntservice.description=The Free Network Project daemon
+
+# Service dependencies. Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed. AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+
+wrapper.ntservice.process_priority=BELOW_NORMAL
+
+# Start services with a different user than SYSTEM
+# SEE http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-account.html BEFORE PROCEEDING !
diff --git a/net-p2p/freenet/files/freenet-0.7.5_p1422-wrapper.conf b/net-p2p/freenet/files/freenet-0.7.5_p1422-wrapper.conf
new file mode 100644
index 000000000000..a8176aaadb76
--- /dev/null
+++ b/net-p2p/freenet/files/freenet-0.7.5_p1422-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=256
+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=256M
+
+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.old b/net-p2p/freenet/files/freenet.old
new file mode 100644
index 000000000000..d0df97e471ba
--- /dev/null
+++ b/net-p2p/freenet/files/freenet.old
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ start-stop-daemon --start --chuid freenet --exec /var/freenet/run.sh start 2>/dev/null
+ eend 0
+}
+
+status() {
+ start-stop-daemon --start --chuid freenet --exec /var/freenet/run.sh status 2>/dev/null
+ eend 0
+}
+
+stop() {
+ start-stop-daemon --start --chuid freenet --exec /var/freenet/run.sh stop 2>/dev/null
+ eend 0
+}
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/libraryloader-revert-using-of-absolute-path.patch b/net-p2p/freenet/files/libraryloader-revert-using-of-absolute-path.patch
new file mode 100644
index 000000000000..e252aed003d5
--- /dev/null
+++ b/net-p2p/freenet/files/libraryloader-revert-using-of-absolute-path.patch
@@ -0,0 +1,19 @@
+commit bad37bf86798d30292769581aca7e71471c34485
+Author: Matthew Toseland <toad@amphibian.dyndns.org>
+Date: Fri Nov 5 23:30:43 2010 +0000
+
+ Use the specific, absolute path, rather than loading from path, for NativeBigInteger library.
+
+diff --git a/src/freenet/support/LibraryLoader.java b/src/freenet/support/LibraryLoader.java
+index d4a22a0..2470d40 100644
+--- a/src/freenet/support/LibraryLoader.java
++++ b/src/freenet/support/LibraryLoader.java
+@@ -45,7 +45,7 @@ public class LibraryLoader {
+ File nativeLib = new File((System.getProperty("java.library.path")) + "/lib" + libraryName + prefix);
+ if (nativeLib.exists()) {
+ System.out.println("Attempting to load the NativeThread library ["+libraryName+']');
+- System.loadLibrary(libraryName);
++ System.loadLibrary(nativeLib.getAbsolutePath());
+ success = true;
+ } else {
+ try {
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_p1466.ebuild b/net-p2p/freenet/freenet-0.7.5_p1466.ebuild
new file mode 100644
index 000000000000..92d7654f2b5a
--- /dev/null
+++ b/net-p2p/freenet/freenet-0.7.5_p1466.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+DATE=20140810
+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.49
+ dev-java/commons-compress:0
+ dev-db/db-je:3.3
+ dev-java/fec:0
+ dev-java/java-service-wrapper:0
+ dev-java/db4o-jdk11:0
+ dev-java/db4o-jdk12:0
+ dev-java/db4o-jdk5: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.6
+ ${CDEPEND}
+ test? ( dev-java/junit:0
+ dev-java/ant-junit:0 )
+ dev-java/ant-core:0"
+RDEPEND=">=virtual/jre-1.6
+ 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.49,commons-compress,db4o-jdk5,db4o-jdk12,db4o-jdk11,db-je-3.3,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}
+
+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
+ mv "${WORKDIR}"/freenet-fred-* "${S}"
+}
+
+java_prepare() {
+ cp "${FILESDIR}"/freenet-0.7.5_p1422-wrapper.conf freenet-wrapper.conf || die
+ cp "${FILESDIR}"/run.sh-20090501 run.sh || die
+ epatch "${FILESDIR}"/0.7.5_p1321-ext.patch
+
+ 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
+
+ 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
+ done
+ done
+ IFS=${ifs_original}
+ echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf
+
+ 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 || die
+ newdoc README.md README || die
+ insinto /etc
+ doins freenet-wrapper.conf || die
+ insinto /var/freenet
+ doins run.sh || die
+ newins "${WORKDIR}"/seednodes-${DATE}.fref seednodes.fref || die
+ 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_p1467.ebuild b/net-p2p/freenet/freenet-0.7.5_p1467.ebuild
new file mode 100644
index 000000000000..001072432b39
--- /dev/null
+++ b/net-p2p/freenet/freenet-0.7.5_p1467.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+DATE=20150427
+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.49
+ dev-java/commons-compress:0
+ dev-db/db-je:3.3
+ dev-java/fec:0
+ dev-java/java-service-wrapper:0
+ dev-java/db4o-jdk11:0
+ dev-java/db4o-jdk12:0
+ dev-java/db4o-jdk5: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.6
+ ${CDEPEND}
+ test? ( dev-java/junit:0
+ dev-java/ant-junit:0 )
+ dev-java/ant-core:0"
+RDEPEND=">=virtual/jre-1.6
+ 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.49,commons-compress,db4o-jdk5,db4o-jdk12,db4o-jdk11,db-je-3.3,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}
+
+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
+ mv "${WORKDIR}"/freenet-fred-* "${S}"
+}
+
+java_prepare() {
+ cp "${FILESDIR}"/freenet-0.7.5_p1422-wrapper.conf freenet-wrapper.conf || die
+ cp "${FILESDIR}"/run.sh-20090501 run.sh || die
+ epatch "${FILESDIR}"/0.7.5_p1321-ext.patch
+
+ 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
+
+ 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
+ done
+ done
+ IFS=${ifs_original}
+ echo "wrapper.java.classpath.$((i++))=/usr/share/freenet/lib/ant.jar" >> freenet-wrapper.conf
+
+ 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 || die
+ newdoc README.md README || die
+ insinto /etc
+ doins freenet-wrapper.conf || die
+ insinto /var/freenet
+ doins run.sh || die
+ newins "${WORKDIR}"/seednodes-${DATE}.fref seednodes.fref || die
+ 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..005173b245ef
--- /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>
+ <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/gift-ares/Manifest b/net-p2p/gift-ares/Manifest
new file mode 100644
index 000000000000..e83633317a0f
--- /dev/null
+++ b/net-p2p/gift-ares/Manifest
@@ -0,0 +1 @@
+DIST gift-ares-0.3.0.tar.bz2 311141 SHA256 bfbd6673c58b8d7304cbfffd0dbb776b4fd6ca0ac5c807d71cdd702d3f411419
diff --git a/net-p2p/gift-ares/gift-ares-0.3.0-r1.ebuild b/net-p2p/gift-ares/gift-ares-0.3.0-r1.ebuild
new file mode 100644
index 000000000000..21e9139b041d
--- /dev/null
+++ b/net-p2p/gift-ares/gift-ares-0.3.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE=""
+
+DESCRIPTION="Ares Plugin for giFT"
+HOMEPAGE="http://gift-ares.berlios.de/"
+SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ia64 ~ppc sparc x86 ~x86-fbsd"
+
+RDEPEND=">=net-p2p/gift-0.11.8"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_compile() {
+ econf --datadir=/usr/share/giFT || die "Ares plugin failed to configure"
+ emake || die "Ares plugin failed to build"
+}
+
+src_install() {
+ make DESTDIR=${D} plugindir=/usr/$(get_libdir)/giFT install || die "Ares plugin failed to install"
+ dodoc AUTHORS COPYING ChangeLog NEWS README TODO
+}
+
+pkg_postinst() {
+ einfo "It is recommended that you re-run gift-setup as"
+ einfo "the user you will run the giFT daemon as:"
+ einfo "\tgift-setup"
+ echo
+ einfo "Alternatively, if this plugin is already"
+ einfo "configured, you can add the following line"
+ einfo "to ~/.giFT/giftd.conf"
+ einfo "plugins = Ares"
+}
diff --git a/net-p2p/gift-ares/metadata.xml b/net-p2p/gift-ares/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/gift-ares/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/gift-fasttrack/Manifest b/net-p2p/gift-fasttrack/Manifest
new file mode 100644
index 000000000000..89f7927d5d70
--- /dev/null
+++ b/net-p2p/gift-fasttrack/Manifest
@@ -0,0 +1 @@
+DIST giFT-FastTrack-0.8.9.tar.gz 449505 SHA256 910a3b053e50ac149efd1edab8dc5b79e79a67720afc7c81e68c5f6481e2cad1
diff --git a/net-p2p/gift-fasttrack/gift-fasttrack-0.8.9-r1.ebuild b/net-p2p/gift-fasttrack/gift-fasttrack-0.8.9-r1.ebuild
new file mode 100644
index 000000000000..d711901dc8ec
--- /dev/null
+++ b/net-p2p/gift-fasttrack/gift-fasttrack-0.8.9-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit multilib
+
+IUSE=""
+
+MY_P=${P/gift-fasttrack/giFT-FastTrack}
+
+DESCRIPTION="FastTrack Plugin for giFT"
+HOMEPAGE="https://developer.berlios.de/projects/gift-fasttrack/"
+SRC_URI="mirror://berlios/${PN}/${MY_P}.tar.gz"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ia64 ~ppc sparc x86 ~x86-fbsd"
+
+RDEPEND=">=net-p2p/gift-0.11.1"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ make DESTDIR=${D} \
+ giftconfdir=/etc/giFT \
+ plugindir=/usr/$(get_libdir)/giFT \
+ libgiftincdir=/usr/include/libgift \
+ install || die "Install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
+
+pkg_postinst() {
+ einfo "It is recommended that you re-run gift-setup as"
+ einfo "the user you will run the giFT daemon as:"
+ einfo "\tgift-setup"
+ echo
+ einfo "Alternatively you can add the following line to"
+ einfo "your ~/.giFT/giftd.conf configuration file:"
+ einfo "plugins = OpenFT:FastTrack"
+}
diff --git a/net-p2p/gift-fasttrack/metadata.xml b/net-p2p/gift-fasttrack/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/gift-fasttrack/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/gift-gnutella/Manifest b/net-p2p/gift-gnutella/Manifest
new file mode 100644
index 000000000000..ad7879ed5ede
--- /dev/null
+++ b/net-p2p/gift-gnutella/Manifest
@@ -0,0 +1 @@
+DIST gift-gnutella-0.0.11.tar.bz2 405742 SHA256 5a28fd53ad617a6acdc3042144829e74822510d80963a6ca35e7d256d5a06f86
diff --git a/net-p2p/gift-gnutella/files/cacheupdate.sh b/net-p2p/gift-gnutella/files/cacheupdate.sh
new file mode 100644
index 000000000000..ee6f832aae28
--- /dev/null
+++ b/net-p2p/gift-gnutella/files/cacheupdate.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CACHE_LIST="g2.tjtech.org/g2/
+ gwc1c.olden.ch.3557.nyud.net:8080/gwc/
+ gwc.eod.cc/skulls.php
+ skulls.mi-cha-el.org/skulls.php
+ gwc.frodoslair.net/skulls/skulls"
+
+URLFILE="?urlfile=1\&client=GEN2\&version=0.2"
+HOSTFILE="?hostfile=1\&client=GEN2\&version=0.2"
+
+if [ -d ~/.giFT/Gnutella/ ]; then
+ cd ~/.giFT/Gnutella
+
+ # Try to fetch an updated list
+ wget http://gcachescan.jonatkins.com/ -O .my_list &> /dev/null
+ if [[ $? -eq 0 ]] ; then
+ my_cache_list=$(grep gcachedetail .my_list | sed -e "s:.*gcachedetail.cgi?\(.*\)\">?</a>.*:\1:g" | head -n 10)
+ [[ -n ${my_cache_list} ]] && CACHE_LIST=${my_cache_list}
+ else
+ echo "Failed to fetch gwebcaches' list, trying with local list."
+ fi
+
+ # Fetch gwebcaches
+ ok=0
+ for cache in ${CACHE_LIST} ; do
+ wget ${cache}${URLFILE} -O .gwebcaches.new &> /dev/null
+ if [[ $? -ne 0 ]] ; then
+ echo "Failed to fetch gwebcaches file from ${cache}"
+ #CACHE_LIST=${CACHE_LIST/${cache}/}
+ elif [[ -z $(grep -e "^http://.*" .gwebcaches.new) ]] || [[ -n $(grep ERROR .gwebcaches.new) ]] ; then
+ echo "Fetched file from ${cache} is invalid"
+ else
+ mv .gwebcaches.new gwebcaches
+ echo -e "\ngwebcaches fetched\n"
+ ok=1
+ break
+ fi
+ done
+ if [[ $ok -ne 1 ]] ; then
+ echo "Couldn't fetch gwebcaches!"
+ exit 1
+ fi
+
+ # Fetch nodes
+ ok=0
+ for cache in ${CACHE_LIST} ; do
+ wget ${cache}${HOSTFILE} -O .nodes.new &> /dev/null
+ if [[ $? -ne 0 ]] ; then
+ echo "Failed to fetch nodes file from ${cache}"
+ #CACHE_LIST=${CACHE_LIST/${cache}/}
+ elif [[ -n $(grep ERROR .nodes.new) ]] ; then
+ echo "Fetched file from ${cache} is invalid"
+ else
+ mv .nodes.new nodes
+ echo -e "\nnodes fetched\n"
+ ok=1
+ break
+ fi
+ done
+ if [[ $ok -ne 1 ]] ; then
+ echo "Couldn't fetch nodes!"
+ exit 1
+ fi
+
+ rm .my_list
+ echo -e "\nUpdate complete!"
+else
+ echo " ~/.giFT/Gnutella/ does not exist. Please run gift-setup."
+fi
diff --git a/net-p2p/gift-gnutella/gift-gnutella-0.0.11.ebuild b/net-p2p/gift-gnutella/gift-gnutella-0.0.11.ebuild
new file mode 100644
index 000000000000..43c817730a04
--- /dev/null
+++ b/net-p2p/gift-gnutella/gift-gnutella-0.0.11.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="The giFT Gnutella plugin"
+HOMEPAGE="http://gift.sf.net/"
+SRC_URI="mirror://sourceforge/gift/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ia64 ~ppc sparc x86 ~x86-fbsd"
+IUSE="xml"
+
+RDEPEND=">=net-p2p/gift-0.11.6"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/bzip2
+ dev-libs/libxml2"
+
+src_compile() {
+ econf $(use_with xml libxml) || die "failed to configure"
+ emake || die "failed to build"
+}
+
+src_install() {
+ einstall giftconfdir="${D}"/etc/giFT \
+ plugindir="${D}"/usr/$(get_libdir)/giFT \
+ datadir="${D}"/usr/share \
+ giftperldir="${D}"/usr/bin \
+ libgiftincdir="${D}"/usr/include/libgift || die "einstall failed"
+ newbin "${FILESDIR}"/cacheupdate.sh ${PN}-cacheupdate.sh
+}
+
+pkg_postinst() {
+ elog "It is recommended that you re-run gift-setup as"
+ elog "the user you will run the giFT daemon as:"
+ elog "\tgift-setup"
+ echo
+ elog "Alternatively you can add the following line to"
+ elog "your ~/.giFT/giftd.conf configuration file:"
+ elog "plugins = Gnutella"
+ echo
+ elog "To update your caches, run:"
+ elog "\t${PN}-cacheupdate.sh"
+}
diff --git a/net-p2p/gift-gnutella/metadata.xml b/net-p2p/gift-gnutella/metadata.xml
new file mode 100644
index 000000000000..166c0c557414
--- /dev/null
+++ b/net-p2p/gift-gnutella/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">gift</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/gift-openft/Manifest b/net-p2p/gift-openft/Manifest
new file mode 100644
index 000000000000..2bd42c4206a2
--- /dev/null
+++ b/net-p2p/gift-openft/Manifest
@@ -0,0 +1 @@
+DIST gift-openft-0.2.1.6.tar.bz2 338786 SHA256 7b8db8d18b11e31c051c5687eee0e61182b53087edcaee3211dd767d7b31f47d
diff --git a/net-p2p/gift-openft/gift-openft-0.2.1.6.ebuild b/net-p2p/gift-openft/gift-openft-0.2.1.6.ebuild
new file mode 100644
index 000000000000..0f01a0bd1975
--- /dev/null
+++ b/net-p2p/gift-openft/gift-openft-0.2.1.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+IUSE="berkdb"
+DESCRIPTION="The giFT OpenFT plugin"
+HOMEPAGE="http://gift.sf.net/"
+SRC_URI="mirror://sourceforge/gift/${P}.tar.bz2"
+RESTRICT="mirror"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 ia64 ~ppc sparc x86 ~x86-fbsd"
+
+RDEPEND=">=net-p2p/gift-0.11.8
+ berkdb? ( >=sys-libs/db-3.3 )"
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+src_compile() {
+ econf $(use_enable berkdb libdb) || die "failed to configure"
+ emake || die "failed to build"
+}
+
+src_install() {
+ einstall giftconfdir=${D}/etc/giFT \
+ plugindir=${D}/usr/$(get_libdir)/giFT \
+ datadir=${D}/usr/share/giFT \
+ giftperldir=${D}/usr/bin \
+ libgiftincdir=${D}/usr/include/libgift || die "Install failed"
+ dodoc README NEWS ChangeLog TODO
+}
+
+pkg_postinst() {
+ if ! use berkdb; then
+ ewarn "To become a search node, you must have berkdb set"
+ ewarn "in your USE flags."
+ echo
+ fi
+ einfo "It is recommended that you re-run gift-setup as"
+ einfo "the user you will run the giFT daemon as:"
+ einfo "\tgift-setup"
+ echo
+ einfo "Alternatively you can add the following line to"
+ einfo "your ~/.giFT/giftd.conf configuration file:"
+ einfo "plugins = OpenFT"
+}
diff --git a/net-p2p/gift-openft/metadata.xml b/net-p2p/gift-openft/metadata.xml
new file mode 100644
index 000000000000..166c0c557414
--- /dev/null
+++ b/net-p2p/gift-openft/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">gift</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/gift/Manifest b/net-p2p/gift/Manifest
new file mode 100644
index 000000000000..410b03b7991b
--- /dev/null
+++ b/net-p2p/gift/Manifest
@@ -0,0 +1 @@
+DIST gift-0.11.8.1.tar.bz2 541446 SHA256 7b22e6d36482119a0d2dfd3e911a208439be32f554919536629b4c7c22ea5882
diff --git a/net-p2p/gift/files/gift.confd b/net-p2p/gift/files/gift.confd
new file mode 100644
index 000000000000..be9036eedcd4
--- /dev/null
+++ b/net-p2p/gift/files/gift.confd
@@ -0,0 +1,22 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# /etc/conf.d/gift
+# Config file for gift control script
+
+# Change the following vars only if you know
+# what you're doing, there's no checking for
+# invalid data yet!
+
+# owner of giFTd process (don't change, must be existing)
+USER="p2p"
+
+# directory with configuration
+LOCAL_DIR="/usr/share/giFT"
+
+# logfile (/dev/null for nowhere)
+LOG="/var/log/giftd.log"
+
+# nice level, 0<x<19, more nice -> less cpuspeed consumed
+NICE="19"
diff --git a/net-p2p/gift/files/gift.initd b/net-p2p/gift/files/gift.initd
new file mode 100644
index 000000000000..193cb23adf21
--- /dev/null
+++ b/net-p2p/gift/files/gift.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting giFTd"
+ start-stop-daemon --quiet --start -c ${USER} --make-pidfile \
+ --pidfile /var/run/giftd.pid --exec /usr/bin/giftd \
+ --nicelevel ${NICE} -- \
+ --local-dir=${LOCAL_DIR} &>${LOG} &
+ result=$?
+ sleep 1
+ [ -z "`pgrep -u ${USER} giftd`" ] && result=1
+ if [ $result -eq 1 ]; then
+ eerror "Failed to start gift. Check ${LOG} for more information"
+ fi;
+ eend $result
+}
+
+stop() {
+ ebegin "Stopping giFTd - please wait"
+ start-stop-daemon --stop --quiet --pidfile /var/run/giftd.pid
+ eend $?
+}
+
+restart() {
+ svc_stop
+ sleep 10
+ svc_start
+}
diff --git a/net-p2p/gift/gift-0.11.8.1-r1.ebuild b/net-p2p/gift/gift-0.11.8.1-r1.ebuild
new file mode 100644
index 000000000000..a51fe1f3f0d0
--- /dev/null
+++ b/net-p2p/gift/gift-0.11.8.1-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils libtool user
+
+DESCRIPTION="A OpenFT, Gnutella and FastTrack p2p network daemon"
+HOMEPAGE="http://gift.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+IUSE="ares fasttrack gnutella imagemagick openft vorbis"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ~ppc sparc x86 ~x86-fbsd"
+
+DEPEND=">=sys-libs/zlib-1.1.4
+ sys-apps/file
+ imagemagick? ( >=media-gfx/imagemagick-5.5.7.15 )
+ vorbis? ( >=media-libs/libvorbis-1 )"
+PDEPEND="ares? ( net-p2p/gift-ares )
+ fasttrack? ( net-p2p/gift-fasttrack )
+ gnutella? ( net-p2p/gift-gnutella )
+ openft? ( net-p2p/gift-openft )"
+
+GIFTUSER="p2p"
+
+pkg_preinst() {
+ # Add a new user
+ enewuser ${GIFTUSER} -1 /bin/bash /home/p2p users
+}
+
+src_compile() {
+ econf --enable-libmagic \
+ `use_enable imagemagick` \
+ `use_enable vorbis libvorbis` || die
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "Install failed"
+
+ # init scripts for users who want a central server
+ newconfd ${FILESDIR}/gift.confd gift
+ newinitd ${FILESDIR}/gift.initd gift
+
+ touch ${D}/usr/share/giFT/giftd.log
+ chown ${GIFTUSER}:root ${D}/usr/share/giFT/giftd.log
+}
+
+pkg_postinst() {
+ elog "Configure gift in /usr/share/giFT/ or run gift-setup"
+ elog "as normal user and make:"
+ elog 'cp -R $HOME/.giFT/* /usr/share/giFT/'
+ elog "chown -R p2p:root /usr/share/giFT/*"
+ elog "(be carefull while specyfing directories in gift-setup;"
+ elog "keep in mind that giFT will run as process of user "
+ elog 'specified in /etc/conf.d/gift with his $HOME directory)'
+ echo
+ elog "Also, if you will be using the giFT init script, you"
+ elog "will need to create /usr/share/giFT/giftd.conf"
+ elog "This method is only recommended for users with a"
+ elog "central giFT server."
+ echo
+}
diff --git a/net-p2p/gift/metadata.xml b/net-p2p/gift/metadata.xml
new file mode 100644
index 000000000000..f3039a551975
--- /dev/null
+++ b/net-p2p/gift/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <use>
+ <flag name="ares">pull in Ares plugin</flag>
+ <flag name="fasttrack">pull in FastTrack plugin</flag>
+ <flag name="gnutella">pull in Gnutella plugin</flag>
+ <flag name="openft">pull in OpenFT plugin</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gift</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/giftcurs/Manifest b/net-p2p/giftcurs/Manifest
new file mode 100644
index 000000000000..372d55fa5990
--- /dev/null
+++ b/net-p2p/giftcurs/Manifest
@@ -0,0 +1 @@
+DIST giFTcurs-0.6.2.tar.gz 455055 SHA256 80db72ac16463ce084e76dc9aaae5b54ce8db085610c98fe2975c5b8f51a598d
diff --git a/net-p2p/giftcurs/giftcurs-0.6.2.ebuild b/net-p2p/giftcurs/giftcurs-0.6.2.ebuild
new file mode 100644
index 000000000000..b799aa5db91e
--- /dev/null
+++ b/net-p2p/giftcurs/giftcurs-0.6.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="giFTcurs-${PV}"
+S="${WORKDIR}/${MY_P}"
+DESCRIPTION="A ncurses frontend to the giFT daemon"
+SRC_URI="http://savannah.nongnu.org/download/${PN}/${MY_P}.tar.gz"
+HOMEPAGE="http://www.nongnu.org/giftcurs/"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="gpm nls unicode"
+KEYWORDS="alpha amd64 ~ia64 ~ppc sparc x86 ~x86-fbsd"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.2
+ >=dev-libs/glib-2.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_compile() {
+ local myconf=""
+
+ use gpm || myconf="${myconf} --disable-mouse --disable-libgpm"
+ use nls || myconf="${myconf} --disable-nls"
+ use unicode && myconf="${myconf} --with-ncursesw"
+
+ econf $myconf || die "./configure failed"
+
+ emake || die "Compilation failed"
+}
+
+src_install() {
+ einstall || die "Installation failed"
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/net-p2p/giftcurs/metadata.xml b/net-p2p/giftcurs/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/giftcurs/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/gnut/Manifest b/net-p2p/gnut/Manifest
new file mode 100644
index 000000000000..18c0ec0d8de5
--- /dev/null
+++ b/net-p2p/gnut/Manifest
@@ -0,0 +1,2 @@
+DIST gnut-0.4.28-patches.tar.bz2 8663 SHA256 c9a4e06f79bea33542576132c44f69f5acc5b68a28fc3f3e1817d166bc2c5bbb
+DIST gnut-0.4.28.tar.gz 333625 SHA256 f82aa6287c84376b2cb5fdabe6be2c27a0f72ed25672e277c2a9b521417f0fec
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..22bacd643c9e
--- /dev/null
+++ b/net-p2p/gnut/gnut-0.4.28-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..aa0f3664825f
--- /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>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/gtk-gnutella/Manifest b/net-p2p/gtk-gnutella/Manifest
new file mode 100644
index 000000000000..ece2724078d7
--- /dev/null
+++ b/net-p2p/gtk-gnutella/Manifest
@@ -0,0 +1,2 @@
+DIST gtk-gnutella-1.1.1.tar.bz2 35342037 SHA256 6e077204ddc23d0b8a044c3d7f12f40e8876b523f12a90c00b6725170611b501 SHA512 c8226f74bbbc901a608aa59544ba5d7f924f5bcef0e98ba16145c4ae07a93dc710376201cf46bedaddcefb4438e18c259ce06be076a5f365a80b445cf788ec02 WHIRLPOOL 19e41cea5dfbfc27d21c7a5ed7ea69a14ef4fb4c0285eedd218d2506a6a133bb9f81462e4396bc936528618216d419f1ac38e53ff887c9e640cd51264727d824
+DIST gtk-gnutella-1.1.3.tar.bz2 19504243 SHA256 2659ddb846f60d13789674e926a71bbb4a8b9d3ca98c6b034a95eaa073531405 SHA512 df143b6e89b0a4c6e8ddbba24ddcab3603f04e7df1fab7d389241a112c6cd3297e4837dfc0d225289997b99867a5466a5b8697c68ef2bdc5817261fbc103d505 WHIRLPOOL fe1a1375e75204bdf92c9690f1885211dc456c2cc466f4d7e47c865fc0e1c77ce07d27b58ff2e53c4c28214d055878c7d805f0b79043748e1448c6b8ac398c82
diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.1.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.1.ebuild
new file mode 100644
index 000000000000..62a6075dc610
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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
+}
+
+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.3.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.3.ebuild
new file mode 100644
index 000000000000..154b509fd546
--- /dev/null
+++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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
+}
+
+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..ab027197642b
--- /dev/null
+++ b/net-p2p/gtk-gnutella/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>
+ <email>graaff@gentoo.org</email>
+ </maintainer>
+ <herd>net-p2p</herd>
+ <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..08f39adfc8a0
--- /dev/null
+++ b/net-p2p/gtorrentviewer/Manifest
@@ -0,0 +1 @@
+DIST GTorrentViewer-0.2b.tar.gz 247584 SHA256 6e56351103f5d46a45be160baa1b7b956b4416fcdb4533b3d17a309665690c95 SHA512 4e8a0181d0492e9a88de09fe6399b9c6e4ca16913550b53597c00c2a413cd4c332b305b4b24735fa2b84bea87618ce7c22b111779f452a8d977470830d145b10 WHIRLPOOL 081245cbec27e98bf3931cd7fda06c275228028cb521eb67dbfcbdf003c7ebe88625a5addc4bba34b440babeeca1f2a0ae34b33702d593289dbe371d92d4175c
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..825e26735d0e
--- /dev/null
+++ b/net-p2p/gtorrentviewer/gtorrentviewer-0.2b.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..a2e44fa192cb
--- /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>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">gtorrentviewer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/hx/Manifest b/net-p2p/hx/Manifest
new file mode 100644
index 000000000000..cecfa5f5899a
--- /dev/null
+++ b/net-p2p/hx/Manifest
@@ -0,0 +1 @@
+DIST mhxd-0.4.11.tar.bz2 970664 SHA256 54906798fd9155cf3f53c171f0d839ed1e5a329fa89e56bbcdfda4ce8dda0b91
diff --git a/net-p2p/hx/hx-0.4.11.ebuild b/net-p2p/hx/hx-0.4.11.ebuild
new file mode 100644
index 000000000000..d82e40767d91
--- /dev/null
+++ b/net-p2p/hx/hx-0.4.11.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools
+
+LICENSE="GPL-2"
+KEYWORDS="ppc ~sparc x86"
+MY_P=mhxd-${PV}
+
+DESCRIPTION="This is a Hotline 1.5+ compatible *nix Hotline Client in CLI. It supports IRC compatibility"
+SRC_URI="http://projects.acidbeats.de/${MY_P}.tar.bz2"
+HOMEPAGE="http://hotlinex.sf.net/"
+
+IUSE="ssl"
+
+DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ >=sys-libs/zlib-1.1.4"
+
+SLOT="0"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ `use_enable ssl idea` \
+ `use_enable ssl cipher` \
+ `use_enable ssl hope` \
+ `use_enable ssl compress` \
+ --enable-hx || die "bad configure"
+ emake || die "compile problem"
+ make install || die "compile problem"
+}
+
+src_install() {
+ dodoc AUTHORS INSTALL PROBLEMS README* ChangeLog TODO NEWS run/hx/ghxvars run/hx/ghxvars.jp \
+ run/hx/hxrc run/hx/hxvars
+
+ dobin run/hx/bin/hx
+}
diff --git a/net-p2p/hx/metadata.xml b/net-p2p/hx/metadata.xml
new file mode 100644
index 000000000000..b8f4c471b1cc
--- /dev/null
+++ b/net-p2p/hx/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <longdescription>
+ hx is an Hotline Client under the GPL for Linux/Unixes.
+ It supports the Hotline Protocol from 1.2.3 up to 1.5+.
+ See http://www.hotspringsinc.com/
+ </longdescription>
+</pkgmetadata>
diff --git a/net-p2p/i2p/Manifest b/net-p2p/i2p/Manifest
new file mode 100644
index 000000000000..cd5a61ebb019
--- /dev/null
+++ b/net-p2p/i2p/Manifest
@@ -0,0 +1 @@
+DIST i2psource_0.9.18.tar.bz2 24147960 SHA256 6f02f38c933662874c485cb52ca800a9e07c36e74a26fdfeece65e25979beb4b SHA512 6cc336f94f8e4331b26d6e42958808f193ad3709ab6098981077c9390749233fb3d20df5c8fea34ec7810bc8846fd2e11ed7a79bf7c1ec68402b1ccacae999d6 WHIRLPOOL 467285b189af69b300c56756992e53979aa049515cb89ce0d5cbff80b9270c4ab1188f419dd0206b2406780b36ddde73861b5e2e69c7b2e7d8ed00b7bcaaa7a7
diff --git a/net-p2p/i2p/files/i2p-0.9.18_fix-paths.patch b/net-p2p/i2p/files/i2p-0.9.18_fix-paths.patch
new file mode 100644
index 000000000000..d1c207f10e96
--- /dev/null
+++ b/net-p2p/i2p/files/i2p-0.9.18_fix-paths.patch
@@ -0,0 +1,137 @@
+--- clients.config 2015-03-15 02:02:29.021408673 -0700
++++ clients.config 2015-03-15 02:24:33.460308396 -0700
+@@ -60,7 +60,7 @@
+ clientApp.4.name=Open Router Console in web browser at startup
+ clientApp.4.args=http://127.0.0.1:7657/
+ clientApp.4.delay=3
+-clientApp.4.startOnLoad=true
++clientApp.4.startOnLoad=false
+
+ # BOB bridge
+ clientApp.5.args=
+--- eepget 2015-03-15 02:02:29.078407997 -0700
++++ eepget 2015-03-15 02:17:51.441075791 -0700
+@@ -1,3 +1,3 @@
+ #!/bin/sh
+-I2P="%INSTALL_PATH"
++I2P="/usr/share/i2p"
+ java -cp "$I2P/lib/i2p.jar" net.i2p.util.EepGet "$@"
+--- i2prouter 2015-03-15 02:02:29.079407985 -0700
++++ i2prouter 2015-03-15 02:11:13.023194731 -0700
+@@ -28,20 +28,22 @@
+ # Note that (percent)INSTALL_PATH, (percent)USER_HOME, and (percent)SYSTEM_java_io_tmpdir
+ # should have been replaced by the izpack installer.
+ # If you did not run the installer, replace them with the appropriate paths.
+-I2P="%INSTALL_PATH"
++USER_HOME="$HOME"
++SYSTEM_java_io_tmpdir="$USER_HOME/.i2p"
++I2P="/usr/share/i2p"
+ if [ "`uname -s`" = "Darwin" ]; then
+- if [ -d "%USER_HOME/Library/Application Support" ]; then
+- I2P_CONFIG_DIR="%USER_HOME/Library/Application Support/i2p"
++ if [ -d "$USER_HOME/Library/Application Support" ]; then
++ I2P_CONFIG_DIR="$USER_HOME/Library/Application Support/i2p"
+ else
+- I2P_CONFIG_DIR="%USER_HOME/.i2p"
++ I2P_CONFIG_DIR="$USER_HOME/.i2p"
+ fi
+ else
+- I2P_CONFIG_DIR="%USER_HOME/.i2p"
++ I2P_CONFIG_DIR="$USER_HOME/.i2p"
+ fi
+-I2PTEMP="%SYSTEM_java_io_tmpdir"
++I2PTEMP="$SYSTEM_java_io_tmpdir"
+ # PORTABLE installation:
+ # Use the following instead.
+-#I2PTEMP="%INSTALL_PATH"
++#I2PTEMP="/usr/share/i2p"
+
+ # Application
+ APP_NAME="i2p"
+--- runplain.sh 2015-03-15 02:02:29.078407997 -0700
++++ runplain.sh 2015-03-15 02:18:46.530422508 -0700
+@@ -11,8 +11,8 @@
+ # Note that (percent)INSTALL_PATH and (percent)SYSTEM_java_io_tmpdir
+ # should have been replaced by the izpack installer.
+ # If you did not run the installer, replace them with the appropriate path.
+-I2P="%INSTALL_PATH"
+-I2PTEMP="%SYSTEM_java_io_tmpdir"
++I2P="/usr/share/i2p"
++I2PTEMP="$SYSTEM_java_io_tmpdir"
+
+ # Having IPv6 enabled can cause problems with certain configurations. Changing the
+ # next value to true may help.
+--- wrapper.config 2015-03-15 02:02:29.022408661 -0700
++++ wrapper.config 2015-03-15 02:21:50.666238909 -0700
+@@ -60,13 +60,17 @@
+ # classes, or all the classes of i2p.jar, are in a different directory).
+ # Be sure there are no other duplicate classes.
+ #
+-wrapper.java.classpath.1=$INSTALL_PATH/lib/*.jar
++wrapper.java.classpath.1=/usr/share/i2p/lib/*.jar
++wrapper.java.classpath.2=/usr/share/jakarta-jstl/lib/*.jar
++wrapper.java.classpath.3=/usr/share/java-service-wrapper/lib/*.jar
++wrapper.java.classpath.4=/usr/share/bcprov/lib/*.jar
+ # uncomment this to use the system classpath as well (e.g. to get tools.jar)
+ # wrapper.java.classpath.2=%CLASSPATH%
+
+ # Java Library Path (location of Wrapper.DLL or libwrapper.so)
+-wrapper.java.library.path.1=$INSTALL_PATH
+-wrapper.java.library.path.2=$INSTALL_PATH/lib
++wrapper.java.library.path.1=/usr/share/i2p
++wrapper.java.library.path.2=/usr/share/i2p/lib
++wrapper.java.library.path.3=/usr/lib/java-service-wrapper
+
+ # Java Bits. On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
+ wrapper.java.additional.auto_bits=TRUE
+@@ -76,7 +80,7 @@
+ wrapper.java.additional.1=-DloggerFilenameOverride=logs/log-router-@.txt
+ wrapper.java.additional.2=-Dorg.mortbay.http.Version.paranoid=true
+ wrapper.java.additional.3=-Dorg.mortbay.xml.XmlParser.NotValidating=true
+-wrapper.java.additional.4=-Di2p.dir.base="$INSTALL_PATH"
++wrapper.java.additional.4=-Di2p.dir.base="/usr/share/i2p"
+ wrapper.java.additional.4.stripquotes=TRUE
+
+ # On some IPv6 enabled systems, I2P and other network-enabled java applications
+@@ -96,11 +100,11 @@
+ # wrapper.java.additional.7=-Dorg.mortbay.util.FileResource.checkAliases=false
+ # PORTABLE installation:
+ # uncomment the following
+-#wrapper.java.additional.7=-Di2p.dir.pid="$INSTALL_PATH"
++#wrapper.java.additional.7=-Di2p.dir.pid="/usr/share/i2p"
+ #wrapper.java.additional.7.stripquotes=TRUE
+-#wrapper.java.additional.8=-Di2p.dir.temp="$INSTALL_PATH"
++#wrapper.java.additional.8=-Di2p.dir.temp="/usr/share/i2p"
+ #wrapper.java.additional.8.stripquotes=TRUE
+-#wrapper.java.additional.9=-Di2p.dir.config="$INSTALL_PATH"
++#wrapper.java.additional.9=-Di2p.dir.config="/usr/share/i2p"
+ #wrapper.java.additional.9.stripquotes=TRUE
+ #
+ # Uncomment this for better performance.
+@@ -147,7 +151,7 @@
+ # PORTABLE installation:
+ # Use the following instead. I2P will find the logfile here,
+ # no need for a wrapper.java.additional line too.
+-#wrapper.logfile=$INSTALL_PATH/wrapper.log
++#wrapper.logfile=/usr/share/i2p/wrapper.log
+
+ # Format of output for the log file.
+ # The format consists of the tokens 'L' for log level, 'P' for prefix, 'D' for thread,
+@@ -220,7 +224,7 @@
+ #wrapper.java.pidfile=$SYSTEM_java_io_tmpdir/routerjvm.pid
+ # PORTABLE installation:
+ # Use the following instead.
+-#wrapper.java.pidfile=$INSTALL_PATH/routerjvm.pid
++#wrapper.java.pidfile=/usr/share/i2p/routerjvm.pid
+ # pid file for the service monitoring the JVM
+ #
+ # From i2prouter:
+@@ -238,7 +242,7 @@
+ #wrapper.pidfile=$SYSTEM_java_io_tmpdir/i2p.pid
+ # PORTABLE installation:
+ # Use the following instead.
+-#wrapper.pidfile=$INSTALL_PATH/i2p.pid
++#wrapper.pidfile=/usr/share/i2p/i2p.pid
+
+ #********************************************************************
+ # Wrapper General Properties
diff --git a/net-p2p/i2p/files/i2p.initd b/net-p2p/i2p/files/i2p.initd
new file mode 100644
index 000000000000..ca39586113ed
--- /dev/null
+++ b/net-p2p/i2p/files/i2p.initd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+HOME="/var/lib/i2p"
+USER_HOME="$HOME"
+JAVABINARY="/etc/java-config-2/current-system-vm/bin/java"
+INSTALL_PATH="/usr/share/i2p"
+I2P="$INSTALL_PATH"
+I2P_CONFIG_DIR="$USER_HOME/.i2p"
+SYSTEM_java_io_tmpdir="$I2P_CONFIG_DIR"
+I2PTEMP="$SYSTEM_java_io_tmpdir"
+LOGFILE="$I2P_CONFIG_DIR/wrapper.log"
+PIDFILE="/var/run/i2p.pid"
+WRAPPER_CMD="$I2P/i2psvc"
+WRAPPER_CONF="$I2P/wrapper.config"
+
+start() {
+ ebegin "Starting I2P"
+ start-stop-daemon --start -b -m -u i2p --pidfile "$PIDFILE" --quiet --exec $WRAPPER_CMD -- -c $WRAPPER_CONF wrapper.daemonize=FALSE wrapper.syslog.ident=i2p wrapper.java.command="$JAVABINARY" wrapper.name=i2p wrapper.displayname="I2P Service" wrapper.statusfile="$I2P_CONFIG_DIR/i2p.status" wrapper.java.statusfile="$I2P_CONFIG_DIR/i2p.java.status" wrapper.logfile="$LOGFILE"
+ sleep 1
+ [ -e "$PIDFILE" -a -e /proc/$(cat "$PIDFILE") ]
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping I2P"
+ start-stop-daemon --stop -u i2p --pidfile "$PIDFILE" --quiet --exec $WRAPPER_CMD -R SIGTERM/20 SIGKILL/20 -P
+ eend $?
+}
+
diff --git a/net-p2p/i2p/files/i2p.service b/net-p2p/i2p/files/i2p.service
new file mode 100644
index 000000000000..ccbadbd4d167
--- /dev/null
+++ b/net-p2p/i2p/files/i2p.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Invisible Internet Project
+After=network.target
+
+[Service]
+User=i2p
+Type=forking
+ExecReload=/usr/bin/i2prouter restart
+ExecStart=/usr/bin/i2prouter start
+ExecStop=/usr/bin/i2prouter stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/i2p/i2p-0.9.18.ebuild b/net-p2p/i2p/i2p-0.9.18.ebuild
new file mode 100644
index 000000000000..22ac101f0325
--- /dev/null
+++ b/net-p2p/i2p/i2p-0.9.18.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils java-pkg-2 java-ant-2 systemd user
+
+DESCRIPTION="A privacy-centric, anonymous network."
+HOMEPAGE="https://geti2p.net"
+SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2"
+
+LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
+SLOT="0"
+# Until the deps reach other arches
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+# dev-java/ant-core is automatically added due to java-ant-2.eclass
+DEPEND=">=dev-java/bcprov-1.50
+ dev-java/eclipse-ecj:*
+ dev-java/jakarta-jstl
+ dev-java/java-service-wrapper
+ dev-java/jrobin
+ dev-java/slf4j-api
+ dev-libs/gmp:*
+ nls? ( sys-devel/gettext )
+ >=virtual/jdk-1.6:="
+RDEPEND="${DEPEND} >=virtual/jre-1.6"
+
+EANT_BUILD_TARGET="pkg"
+EANT_GENTOO_CLASSPATH="jakarta-jstl,java-service-wrapper,jrobin,slf4j-api"
+
+pkg_setup() {
+ enewgroup i2p
+ enewuser i2p -1 -1 /var/lib/i2p i2p -m
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ java-ant_rewrite-classpath
+}
+
+src_prepare() {
+ # We're on GNU/Linux, we don't need .exe files
+ echo "noExe=true" > override.properties
+ if ! use nls; then
+ echo "require.gettext=false" >> override.properties
+ fi
+}
+
+src_install() {
+ # Using ${D} here results in an error. Docs say use $ROOT
+ i2p_home="${ROOT}/usr/share/i2p"
+ # Patch the relevant files. This needs to be in src_install due to
+ # preinst() generating the files we're patching
+ cd pkg-temp
+ epatch "${FILESDIR}/i2p-0.9.18_fix-paths.patch"
+
+ # This is ugly, but to satisfy all non-system .jar dependencies, jetty and
+ # systray4j would need to be packaged. The former would be too large a task
+ # for an unseasoned developer and systray4j hasn't been touched in over 10
+ # years. This seems to be the most pragmatic solution
+ java-pkg_jarinto "${i2p_home}/lib"
+ for i in BOB commons-el commons-logging i2p i2psnark i2ptunnel \
+ jasper-compiler jasper-runtime javax.servlet jbigi jetty* mstreaming org.mortbay.* router* \
+ sam standard streaming systray systray4j; do
+ java-pkg_dojar lib/${i}.jar
+ done
+
+ # Set up symlinks for binaries
+ dosym /usr/bin/wrapper ${i2p_home}/i2psvc
+ dosym ${i2p_home}/i2prouter /usr/bin/i2prouter
+ dosym ${i2p_home}/eepget /usr/bin/eepget
+
+ # Install main files and basic documentation
+ exeinto ${i2p_home}
+ insinto ${i2p_home}
+ doins blocklist.txt hosts.txt *.config
+ doexe eepget i2prouter runplain.sh
+ dodoc history.txt INSTALL-headless.txt LICENSE.txt
+ doman man/*
+
+ # Install other directories
+ doins -r certificates docs eepsite geoip scripts
+ dodoc -r licenses
+ java-pkg_dowar webapps/*.war
+
+ # Install daemon files
+ newinitd "${FILESDIR}/i2p.initd" i2p
+ systemd_newunit "${FILESDIR}"/i2p.service i2p.service
+}
+
+pkg_postinst() {
+ elog "Custom configuration belongs in /var/lib/i2p/.i2p/ to avoid being overwritten."
+ elog "I2P can be configured through the web interface at http://localhost:7657/index.jsp"
+}
diff --git a/net-p2p/i2p/metadata.xml b/net-p2p/i2p/metadata.xml
new file mode 100644
index 000000000000..316d7cc335ca
--- /dev/null
+++ b/net-p2p/i2p/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>sam@cmpct.info</email>
+ <description>Proxy-maintainer; add or CC them for bugs</description>
+</maintainer>
+<maintainer><email>zlg@gentoo.org</email></maintainer>
+<longdescription>I2P is an anonymous network, exposing a simple layer that applications can use to anonymously and securely send messages to each other.</longdescription>
+<use>
+<flag name="nls">Adds Native Language Support using GNU gettext.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-p2p/imule/Manifest b/net-p2p/imule/Manifest
new file mode 100644
index 000000000000..8b9cdfbb520c
--- /dev/null
+++ b/net-p2p/imule/Manifest
@@ -0,0 +1,2 @@
+DIST 2015-03-22_nodes.dat 57832 SHA256 0c7f7f7afe875f1a1c5dc0bfaf960a9f24e51f1eeec42b8dc8a538c62362b7cb SHA512 fd1a1cf2f9f0084bb1e0a802c994308e62a58ebe14b3455b1e86c7b419dcbc206ef982a01ea163c5810d0f79a2388b4a1b4672e73f63a9034e8967d667c3a817 WHIRLPOOL 10ed68cadc4834aa0230679013436f8c91aa5240de1972a6619e357d99d63fdb606f781db341a171b79f03a50c80ef942159a5b0f8f3f095a2a62d6886dc8a36
+DIST iMule-2.3.2.3-src.tbz 13143310 SHA256 f5d1657ce34893b305cb1e8ec163274661926dc9116dccf0d41ce31f0693be43 SHA512 5db856db83e8300faa399922f05b552670a4c9947e3e778031f8904a1a91fe6b02e067bfa2f96883d16c74899d6b713bbd58210529071c0c71202134b41276c9 WHIRLPOOL 93c73028119875b4ec00278849ff11f1cdd0af32af02cac9b98d836f79bc84bb03df18096294c0316e04b39f87e44a973d93a17ad651f9156bac8c1888b006e8
diff --git a/net-p2p/imule/imule-2.3.2.3-r1.ebuild b/net-p2p/imule/imule-2.3.2.3-r1.ebuild
new file mode 100644
index 000000000000..83f41104860e
--- /dev/null
+++ b/net-p2p/imule/imule-2.3.2.3-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WX_GTK_VER="2.8"
+inherit wxwidgets
+
+MY_PN="iMule"
+
+DESCRIPTION="P2P sharing software which connects through I2P and Kad networks"
+# New homepage has a few resources and a working nodes.dat file users need
+# in order to get iMule to work
+HOMEPAGE="http://echelon.i2p/imule"
+SRC_URI="http://dev.gentoo.org/~zlg/extra/net-p2p/imule/${MY_PN}-${PV}-src.tbz http://dev.gentoo.org/~zlg/extra/net-p2p/imule/2015-03-22_nodes.dat"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="webserver static-libs nls"
+RESTRICT="mirror"
+
+# wxGTK 2.8 is required; later versions result in failed compile
+# Other versions indicated are from the tarball's INSTALL file
+DEPEND="x11-libs/wxGTK:2.8
+ net-p2p/i2p
+ >=net-libs/libupnp-1.6.6
+ sys-devel/flex
+ sys-apps/texinfo
+ >=dev-libs/crypto++-5.1
+ !net-p2p/amule"
+RDEPEND="x11-libs/wxGTK:2.8 net-p2p/i2p"
+
+S="${WORKDIR}/${MY_PN}-${PV}-src"
+
+src_unpack() {
+ default
+ cp "${DISTDIR}"/2015-03-22_nodes.dat "${WORKDIR}"
+}
+
+src_configure() {
+ WX_GTK_VER="2.8" need-wxwidgets unicode
+ # Enabling imulecmd results in a compilation error.
+ econf --with-wx-config=${WX_CONFIG} \
+ --enable-imule-daemon \
+ --enable-alc \
+ --enable-alcc \
+ --enable-optimize \
+ --disable-debug \
+ $(use_enable nls) \
+ $(use_enable webserver) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ insinto /usr/share/${PN}
+ newins "${WORKDIR}"/2015-03-22_nodes.dat nodes.dat
+}
+
+pkg_postinst() {
+ elog "iMule will not function without a valid 'nodes.dat' file and"
+ elog "an I2P router running."
+ elog "A nodes.dat file can be found in /usr/share/imule. It can"
+ elog "be copied to ~/.iMule/nodes.dat for convenience."
+}
diff --git a/net-p2p/imule/imule-2.3.2.3.ebuild b/net-p2p/imule/imule-2.3.2.3.ebuild
new file mode 100644
index 000000000000..224a199eab57
--- /dev/null
+++ b/net-p2p/imule/imule-2.3.2.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WX_GTK_VER="2.8"
+inherit wxwidgets
+
+MY_PN="iMule"
+
+DESCRIPTION="P2P sharing software which connects through I2P and Kad network"
+# New homepage has a few resources and a working nodes.dat file users need
+# in order to get iMule to work
+HOMEPAGE="http://echelon.i2p/imule"
+SRC_URI="http://echelon.i2p/imule/${PV}/${MY_PN}-${PV}-src.tbz http://dev.gentoo.org/~zlg/extra/net-p2p/imule/2015-03-22_nodes.dat"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="webserver static-libs nls"
+
+# wxGTK 2.8 is required; later versions result in failed compile
+# Other versions indicated are from the tarball's INSTALL file
+DEPEND="x11-libs/wxGTK:2.8
+ net-p2p/i2p
+ >=net-libs/libupnp-1.6.6
+ sys-devel/flex
+ sys-apps/texinfo
+ >=dev-libs/crypto++-5.1"
+RDEPEND="x11-libs/wxGTK:2.8 net-p2p/i2p"
+
+S="${WORKDIR}/${MY_PN}-${PV}-src"
+
+src_configure() {
+ WX_GTK_VER="2.8" need-wxwidgets unicode
+ # Enabling imulecmd results in a compilation error.
+ econf --with-wx-config=${WX_CONFIG} \
+ --enable-imule-daemon \
+ --enable-alc \
+ --enable-alcc \
+ --enable-optimize \
+ --disable-debug \
+ $(use_enable nls) \
+ $(use_enable webserver) \
+ $(use_enable static-libs static)
+}
+
+pkg_postinst() {
+ elog "iMule will not function without a valid 'nodes.dat' file and"
+ elog "an I2P router running."
+ elog "The nodes.dat file can be found at http://echelon.i2p/imule."
+}
diff --git a/net-p2p/imule/metadata.xml b/net-p2p/imule/metadata.xml
new file mode 100644
index 000000000000..f48160a14d46
--- /dev/null
+++ b/net-p2p/imule/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer>
+<longdescription>A P2P file-sharing application designed to work on top of the I2P or Kad network stacks.</longdescription>
+<use>
+<flag name="nls">Adds Native Language Support using GNU gettext.</flag>
+<flag name="static-libs">Builds a statically-linked application.</flag>
+<flag name="webserver">Enables a webserver to administer remotely.</flag>
+</use>
+</pkgmetadata>
diff --git a/net-p2p/kmldonkey/Manifest b/net-p2p/kmldonkey/Manifest
new file mode 100644
index 000000000000..076ff54b700a
--- /dev/null
+++ b/net-p2p/kmldonkey/Manifest
@@ -0,0 +1 @@
+DIST kmldonkey-2.0.7.tar.bz2 204642 SHA256 49954b7bf7f883e31ea1999e0109f416c12d646d8f51f410190d2ae79cab76e1 SHA512 59435fc13739fae51eb6ee4c9cdbc1aaddc08251b29208e67671bc7dd9e92cacfefec62a8cab8d780c237eb126b529980d17d00ec80c2e954641b2f18c7b48d2 WHIRLPOOL 3fcaef4d4c8fdd250e959a76158a46554332f367f55b6d2a8e25060bfe075c277a8fd893279e0e3d936d0f48c1b828f9a09948fb4ba2464108bd3b7b37bd1638
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..de69ca071c62
--- /dev/null
+++ b/net-p2p/kmldonkey/kmldonkey-2.0.7.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="Provides integration for the MLDonkey P2P software and KDE 4"
+HOMEPAGE="http://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 plasma"
+
+DEPEND="plasma? ( $(add_kdebase_dep plasma-workspace) )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with plasma)
+ )
+
+ 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..8d36d5b01cd2
--- /dev/null
+++ b/net-p2p/kmldonkey/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/net-p2p/ktorrent/Manifest b/net-p2p/ktorrent/Manifest
new file mode 100644
index 000000000000..5d0ff1a28905
--- /dev/null
+++ b/net-p2p/ktorrent/Manifest
@@ -0,0 +1 @@
+DIST ktorrent-4.3.1.tar.bz2 2943708 SHA256 66094f6833347afb0c49e332f0ec15ec48db652cbe66476840846ffd5ca0e4a1 SHA512 bf1fa144295cb00fccce3a511afe845bc7bf42d77d70205f5893686e7b1fa78c5799c46c7e4e04435ab6fdd4bc9b3b4a25bffb2c5538a25af36302c60742900e WHIRLPOOL 61303c19f0160bba9bdd288415d86519594f26c5c062f394cee7924093506a9cc6236fd8eedec16c6f799f71a15cb4af15c4b7c079831dccb4e498b833c2234e
diff --git a/net-p2p/ktorrent/files/ktorrent-4.3.0-mountedstoragecheck.patch b/net-p2p/ktorrent/files/ktorrent-4.3.0-mountedstoragecheck.patch
new file mode 100644
index 000000000000..bdb494c4956a
--- /dev/null
+++ b/net-p2p/ktorrent/files/ktorrent-4.3.0-mountedstoragecheck.patch
@@ -0,0 +1,25 @@
+--- a/ktorrent/core.cpp
++++ b/ktorrent/core.cpp
+@@ -1206,6 +1206,10 @@
+
+ bool Core::checkMissingFiles(TorrentInterface* tc)
+ {
++ QStringList missing;
++ if(!tc->hasMissingFiles(missing))
++ return true;
++
+ QStringList not_mounted;
+ while(!tc->isStorageMounted(not_mounted))
+ {
+@@ -1226,10 +1230,6 @@
+ }
+ }
+
+- QStringList missing;
+- if(!tc->hasMissingFiles(missing))
+- return true;
+-
+ if(tc->getStats().multi_file_torrent)
+ {
+ QString msg = i18n(
+
diff --git a/net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch b/net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch
new file mode 100644
index 000000000000..4572c3d89c64
--- /dev/null
+++ b/net-p2p/ktorrent/files/ktorrent-4.3.1-ipfilter.patch
@@ -0,0 +1,72 @@
+From 3dfcbeb9765e99f9b99951134b17268eb7a617d2 Mon Sep 17 00:00:00 2001
+From: Joris Guisson <joris.guisson@gmail.com>
+Date: Thu, 1 Aug 2013 13:19:29 +0200
+Subject: [PATCH] Backport ipfilter extraction fixes from master branch to 4.3
+ branch
+
+BUG: 315239
+---
+ ChangeLog | 3 +++
+ plugins/ipfilter/downloadandconvertjob.cpp | 22 +++++-----------------
+ 2 files changed, 8 insertions(+), 17 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index c5ae9da..42c48ff 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,6 @@
++Changes in 4.3.2:
++- Backport ipfilter extraction fixes from master branch (315239)
++
+ Changes in 4.3.1:
+ - Fix new custom groups not appearing in add to group submenu (307230)
+ - Fix crash when right clicking on some locations in the GroupView due to 0 pointer (307160)
+diff --git a/plugins/ipfilter/downloadandconvertjob.cpp b/plugins/ipfilter/downloadandconvertjob.cpp
+index d3092ac..4080c2a 100644
+--- a/plugins/ipfilter/downloadandconvertjob.cpp
++++ b/plugins/ipfilter/downloadandconvertjob.cpp
+@@ -114,12 +114,13 @@ namespace kt
+
+ //now determine if it's ZIP or TXT file
+ KMimeType::Ptr ptr = KMimeType::findByPath(temp);
++ Out(SYS_IPF|LOG_NOTICE) << "Mimetype: " << ptr->name() << endl;
+ if (ptr->name() == "application/zip")
+ {
+ active_job = KIO::file_move(temp,QString(kt::DataDir() + QLatin1String("level1.zip")),-1,KIO::HideProgressInfo|KIO::Overwrite);
+ connect(active_job,SIGNAL(result(KJob*)),this,SLOT(extract(KJob*)));
+ }
+- else if (ptr->name() == "application/x-gzip" || ptr->name() == "application/x-bzip")
++ else if (ptr->name() == "application/x-gzip" || ptr->name() == "application/x-bzip" || ptr->name() == "application/gzip")
+ {
+ active_job = new bt::DecompressFileJob(temp,QString(kt::DataDir() + "level1.txt"));
+ connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+@@ -174,23 +175,10 @@ namespace kt
+ }
+
+ QString destination = kt::DataDir() + "level1.txt";
+- if (zip->directory()->entries().contains("splist.txt"))
++ QStringList entries = zip->directory()->entries();
++ if (entries.count() >= 1)
+ {
+- active_job = new bt::ExtractFileJob(zip,"splist.txt",destination);
+- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+- unzip = true;
+- active_job->start();
+- }
+- else if (zip->directory()->entries().contains("level1.txt"))
+- {
+- active_job = new bt::ExtractFileJob(zip,"level1.txt",destination);
+- connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+- unzip = true;
+- active_job->start();
+- }
+- else if (zip->directory()->entries().contains("ipfilter.dat"))
+- {
+- active_job = new bt::ExtractFileJob(zip,"ipfilter.dat",destination);
++ active_job = new bt::ExtractFileJob(zip,entries.front(),destination);
+ connect(active_job,SIGNAL(result(KJob*)),this,SLOT(convert(KJob*)));
+ unzip = true;
+ active_job->start();
+--
+1.8.3.2
+
diff --git a/net-p2p/ktorrent/files/ktorrent-4.3.1-underlinking.patch b/net-p2p/ktorrent/files/ktorrent-4.3.1-underlinking.patch
new file mode 100644
index 000000000000..84e6fa72e6b0
--- /dev/null
+++ b/net-p2p/ktorrent/files/ktorrent-4.3.1-underlinking.patch
@@ -0,0 +1,21 @@
+From 3ef62c439027acc0a166101419fff4bc0c69013d Mon Sep 17 00:00:00 2001
+From: Christoph Feck <christoph@maxiom.de>
+Date: Fri, 19 Oct 2012 10:56:22 +0200
+Subject: [PATCH] SVN_SILENT link
+
+---
+ plugins/ipfilter/tests/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/ipfilter/tests/CMakeLists.txt b/plugins/ipfilter/tests/CMakeLists.txt
+index 3b40887..90d6d42 100644
+--- a/plugins/ipfilter/tests/CMakeLists.txt
++++ b/plugins/ipfilter/tests/CMakeLists.txt
+@@ -1,3 +1,3 @@
+ set(ipblocklisttest_SRCS ipblocklisttest.cpp ../ipblocklist.cpp)
+ kde4_add_unit_test(ipblocklisttest TESTNAME ipblocklisttest ${ipblocklisttest_SRCS})
+-target_link_libraries(ipblocklisttest ${QT_QTTEST_LIBRARY} ktorrent)
++target_link_libraries(ipblocklisttest ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTTEST_LIBRARY} ${LIBKTORRENT_LIBRARIES})
+--
+1.8.1.2
+
diff --git a/net-p2p/ktorrent/ktorrent-4.3.1-r1.ebuild b/net-p2p/ktorrent/ktorrent-4.3.1-r1.ebuild
new file mode 100644
index 000000000000..5b937e10a06b
--- /dev/null
+++ b/net-p2p/ktorrent/ktorrent-4.3.1-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_SCM="git"
+LIBKT_VERSION_MIN="${PV}"
+LIBKT_VERSION_MAX="99999999"
+if [[ ${PV} != 9999* ]]; then
+ inherit versionator
+ # upstream likes to skip that _ in beta releases
+ MY_PV="${PV/_/}"
+ LIBKT_VERSION_MIN=$(($(get_major_version)-3)).$(get_version_component_range 2-3 ${PV})
+ LIBKT_VERSION_MAX=$(($(get_major_version)-3)).$(($(get_version_component_range 2)+1))
+ MY_P="${PN}-${MY_PV}"
+ KDE_HANDBOOK="optional"
+ KDE_DOC_DIRS="doc"
+
+ KDE_LINGUAS="ar ast be bg bs ca ca@valencia cs da de el en_GB eo es et eu
+ fi fr ga gl hi hne hr hu is it ja km ku lt lv mai ms nb nds nl nn oc
+ pl pt pt_BR ro ru se si sk sl sq sr sr@ijekavian sr@ijekavianlatin
+ sr@latin sv tr ug uk zh_CN zh_TW"
+ SRC_URI="http://ktorrent.org/downloads/${MY_PV}/${MY_P}.tar.bz2"
+ S="${WORKDIR}"/"${MY_P}"
+
+ KEYWORDS="amd64 ppc x86"
+else
+ LIBKT_VERSION_MIN="${PV}"
+ LIBKT_VERSION_MAX="99999999"
+ KEYWORDS=""
+fi
+
+inherit kde4-base
+
+DESCRIPTION="A BitTorrent program for KDE"
+HOMEPAGE="http://ktorrent.org/"
+
+LICENSE="GPL-2"
+SLOT="4"
+IUSE="+bwscheduler debug +downloadorder +infowidget +ipfilter +kross +logviewer
++magnetgenerator +mediaplayer plasma rss +scanfolder +search +shutdown +stats
++upnp webinterface +zeroconf"
+
+COMMONDEPEND="
+ <net-libs/libktorrent-${LIBKT_VERSION_MAX}
+ >=net-libs/libktorrent-${LIBKT_VERSION_MIN}
+ infowidget? ( dev-libs/geoip )
+ mediaplayer? ( >=media-libs/taglib-1.5 )
+ plasma? ( $(add_kdebase_dep libtaskmanager) )
+ rss? ( $(add_kdebase_dep kdepimlibs) )
+ shutdown? ( $(add_kdebase_dep libkworkspace) )
+"
+DEPEND="${COMMONDEPEND}
+ dev-libs/boost
+ sys-devel/gettext
+"
+RDEPEND="${COMMONDEPEND}
+ ipfilter? (
+ app-arch/bzip2
+ app-arch/unzip
+ $(add_kdeapps_dep kdebase-kioslaves)
+ )
+ kross? ( $(add_kdebase_dep krosspython) )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-ipfilter.patch"
+ "${FILESDIR}/${P}-underlinking.patch"
+)
+
+src_prepare() {
+ if ! use plasma; then
+ sed -i \
+ -e "s:add_subdirectory(plasma):#nada:g" \
+ CMakeLists.txt || die "Failed to make plasmoid optional"
+ fi
+
+ kde4-base_src_prepare
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_enable bwscheduler BWSCHEDULER_PLUGIN)
+ $(cmake-utils_use_enable downloadorder DOWNLOADORDER_PLUGIN)
+ $(cmake-utils_use_enable infowidget INFOWIDGET_PLUGIN)
+ $(cmake-utils_use_with infowidget SYSTEM_GEOIP)
+ $(cmake-utils_use_enable ipfilter IPFILTER_PLUGIN)
+ $(cmake-utils_use_enable kross SCRIPTING_PLUGIN)
+ $(cmake-utils_use_enable logviewer LOGVIEWER_PLUGIN)
+ $(cmake-utils_use_enable magnetgenerator MAGNETGENERATOR_PLUGIN)
+ $(cmake-utils_use_enable mediaplayer MEDIAPLAYER_PLUGIN)
+ $(cmake-utils_use_enable rss SYNDICATION_PLUGIN)
+ $(cmake-utils_use_enable scanfolder SCANFOLDER_PLUGIN)
+ $(cmake-utils_use_enable search SEARCH_PLUGIN)
+ $(cmake-utils_use_enable shutdown SHUTDOWN_PLUGIN)
+ $(cmake-utils_use_enable stats STATS_PLUGIN)
+ $(cmake-utils_use_enable upnp UPNP_PLUGIN)
+ $(cmake-utils_use_enable webinterface WEBINTERFACE_PLUGIN)
+ $(cmake-utils_use_enable zeroconf ZEROCONF_PLUGIN)
+ )
+ kde4-base_src_configure
+}
diff --git a/net-p2p/ktorrent/metadata.xml b/net-p2p/ktorrent/metadata.xml
new file mode 100644
index 000000000000..566ffb324a68
--- /dev/null
+++ b/net-p2p/ktorrent/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+ <herd>net-p2p</herd>
+ <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="kross">Enable kross scripting support</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="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="webinterface">Allows control of KTorrent via a web interface</flag>
+ <flag name="zeroconf">Discover peers on the local network using the Zeroconf protocol</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/linuxdcpp/Manifest b/net-p2p/linuxdcpp/Manifest
new file mode 100644
index 000000000000..1dec68acefd6
--- /dev/null
+++ b/net-p2p/linuxdcpp/Manifest
@@ -0,0 +1 @@
+DIST linuxdcpp-1.0.3.tar.bz2 289891 SHA256 3b4eb6cf015f0fe8283508976b24dbb1cd4fb861116d4536f1055136c2442c71 SHA512 c0eb38b89b6a47a4a29ade90b3813e302b8c4dd8bea39770fce4e232ff17035ba355b36feb6b69195ba7c8448a69943ee61722e335ad514f426238fb8a089e79 WHIRLPOOL e6feb69c38020a13b2d37cc7dd51614946e2ba2642d7173e72d9d50af37cc510b8ac0f983c1bf68feab3e2d82027471ab8fc3beacbe96b680c87c889cdd88034
diff --git a/net-p2p/linuxdcpp/linuxdcpp-1.0.3-r1.ebuild b/net-p2p/linuxdcpp/linuxdcpp-1.0.3-r1.ebuild
new file mode 100644
index 000000000000..6ff5e9064e0d
--- /dev/null
+++ b/net-p2p/linuxdcpp/linuxdcpp-1.0.3-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+# TODO: This needs to use the escons eclass.
+inherit eutils multiprocessing
+
+DESCRIPTION="Direct connect client, looks and works like famous DC++"
+HOMEPAGE="https://launchpad.net/linuxdcpp"
+SRC_URI="http://launchpad.net/linuxdcpp/1.0/${PV}/+download/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="debug"
+
+RDEPEND=">=gnome-base/libglade-2.4:2.0
+ >=x11-libs/gtk+-2.6:2
+ app-arch/bzip2
+ dev-libs/openssl"
+DEPEND="${RDEPEND}
+ media-libs/fontconfig
+ >=dev-util/scons-0.96
+ virtual/pkgconfig"
+
+src_prepare() {
+ # prevent scons installation of *txt files to wrong directory
+ sed -i 's/.*source = text_files.*//' SConstruct
+}
+
+src_compile() {
+ local myconf=""
+ use debug && myconf="${myconf} debug=1"
+
+ scons ${myconf} -j$(makeopts_jobs) CXXFLAGS="${CXXFLAGS}" PREFIX=/usr || die "scons failed"
+}
+
+src_install() {
+ # linuxdcpp does not install docs according to gentoos naming scheme, so do it by hand
+ dodoc Readme.txt Changelog.txt Credits.txt
+ rm "${S}"/*.txt
+
+ scons install PREFIX="/usr" FAKE_ROOT="${D}" || die "scons install failed"
+
+ doicon pixmaps/${PN}.png
+ make_desktop_entry ${PN} ${PN}
+}
+
+pkg_postinst() {
+ elog
+ elog "After adding first directory to shares you might need to restart linuxdcpp."
+ elog
+}
diff --git a/net-p2p/linuxdcpp/metadata.xml b/net-p2p/linuxdcpp/metadata.xml
new file mode 100644
index 000000000000..a7223bf09a4e
--- /dev/null
+++ b/net-p2p/linuxdcpp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="launchpad">linuxdcpp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/litecoin-qt/Manifest b/net-p2p/litecoin-qt/Manifest
new file mode 100644
index 000000000000..1ead5112eb41
--- /dev/null
+++ b/net-p2p/litecoin-qt/Manifest
@@ -0,0 +1,2 @@
+DIST litecoin-0.10.2.2.tar.gz 4700783 SHA256 952c84b181323db17a8fa23217f59b576ad3ebad92c158b3a7c29d458a1130dc SHA512 46e4c014ae8527dd58af073bab96ea4fd55c69fcc63eaa4fd600bf3c1fc2102500151b49431a72b55334a409d4f5226937cd0c5337feaa4ad49e6ef9e9728aba WHIRLPOOL 5c1d5605d4afb16744fcf0b09dd52eb574aea0cdd9754f94d4cfd9ac064491a0e192d8c4b1a3324e355d71758735265b272dfa41f938212e17badb9f8a70698b
+DIST litecoin-0.8.7.4.tar.gz 4808429 SHA256 032d1eb2ffb06ce467f514e08a66f42bcd507df2d8f1cf2c0541f2906288931a SHA512 14588dab6450bee439c3af16e277afc1f2ff562c93463d9767da27cf724cd6bb4a1c64100806d61dc1d062a39f440e4878e19b425f29e866562acc56c893cca5 WHIRLPOOL 1329d7c234c75b5083f58f5edf69b6ea9acc13f48a9734cd839001dcd3e52c10d3ade55ac853e196deca8b149aba00a3590e52cf766f62b941bd4e4828f10b96
diff --git a/net-p2p/litecoin-qt/files/0.9.0-sys_leveldb.patch b/net-p2p/litecoin-qt/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 000000000000..60e9f2b20941
--- /dev/null
+++ b/net-p2p/litecoin-qt/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/litecoin-qt/files/litecoin-sys_leveldb.patch b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch
new file mode 100644
index 000000000000..a4ae56aeabbb
--- /dev/null
+++ b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch
@@ -0,0 +1,193 @@
+diff -Naur litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro litecoin-0.8.5.3-rc3/bitcoin-qt.pro
+--- litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/bitcoin-qt.pro 2013-11-29 14:53:00.960537685 -0500
+@@ -5,7 +5,7 @@
+ INCLUDEPATH += src src/json src/qt
+ QT += core gui network
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+-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
+
+@@ -101,25 +101,30 @@
+ 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 litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp litecoin-0.8.5.3-rc3/src/leveldb.cpp
+--- litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/leveldb.cpp 2013-11-29 14:55:33.760543008 -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 litecoin-0.8.5.3-rc3.orig/src/makefile.unix litecoin-0.8.5.3-rc3/src/makefile.unix
+--- litecoin-0.8.5.3-rc3.orig/src/makefile.unix 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/makefile.unix 2013-11-29 15:08:58.337571033 -0500
+@@ -110,8 +110,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 \
+@@ -120,7 +119,6 @@
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -141,9 +139,17 @@
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
+
+ ifdef USE_SSE2
+ DEFS += -DUSE_SSE2
+@@ -156,15 +162,25 @@
+ test check: test_litecoin FORCE
+ ./test_litecoin
+
++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
+@@ -175,33 +191,34 @@
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%-sse2.o: %-sse2.cpp
+- $(CXX) -c $(xCXXFLAGS) -msse2 -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)
+
++obj/%-sse2.o: %-sse2.cpp
++ $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
+ obj/%.o: %.cpp
+- $(CXX) -c $(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)
+
+-litecoind: $(OBJS:obj/%=obj/%)
++litecoind: $(OBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+-
+ 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)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
++TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+
+-test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_litecoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
diff --git a/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2.ebuild b/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2.ebuild
new file mode 100644
index 000000000000..94f0d994270d
--- /dev/null
+++ b/net-p2p/litecoin-qt/litecoin-qt-0.10.2.2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="ach af_ZA ar be_BY bg bs ca_ES ca ca@valencia cmn cs cy da de el_GR en eo es_CL es_DO es_MX es es_UY et eu_ES fa_IR fa fi fr_CA fr gl gu_IN he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru sah sk sl_SI sq sr sv th_TH tr uk ur_PK uz@Cyrl vi vi_VN zh_CN zh_HK zh_TW"
+
+inherit autotools db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+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-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="dbus kde +qrcode qt5 upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ dev-libs/protobuf:=
+ qrcode? (
+ media-gfx/qrencode
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ virtual/bitcoin-leveldb
+ !qt5? (
+ dev-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+ )
+ qt5? (
+ dev-qt/qtgui:5
+ dbus? (
+ dev-qt/qtdbus:5
+ )
+ )
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+DOCS="doc/README.md doc/release-notes.md"
+
+S="${WORKDIR}/${MyP}"
+
+src_prepare() {
+ epatch "${FILESDIR}/0.9.0-sys_leveldb.patch"
+ eautoreconf
+ 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_locale.qrc'
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+}
+
+src_configure() {
+ 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 \
+ --enable-wallet \
+ --disable-ccache \
+ --disable-static \
+ --disable-tests \
+ --with-system-leveldb \
+ --with-system-libsecp256k1 \
+ --without-libs \
+ --without-utils \
+ --without-daemon \
+ --with-gui=$(usex qt5 qt5 qt4) \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ ${my_econf}
+}
+
+src_install() {
+ default
+
+ insinto /usr/share/pixmaps
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "Litecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/litecoin;\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/litecoin-qt/litecoin-qt-0.8.7.4.ebuild b/net-p2p/litecoin-qt/litecoin-qt-0.8.7.4.ebuild
new file mode 100644
index 000000000000..01d62fafd31d
--- /dev/null
+++ b/net-p2p/litecoin-qt/litecoin-qt-0.8.7.4.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="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-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
+
+ 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 litecoin codebase is mostly taken from bitcoin-qt
+ eqmake4 bitcoin-qt.pro "${OPTS[@]}"
+}
+
+#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" "Litecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/litecoin;\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/litecoin-qt/metadata.xml b/net-p2p/litecoin-qt/metadata.xml
new file mode 100644
index 000000000000..f9bb68f6e62c
--- /dev/null
+++ b/net-p2p/litecoin-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>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">litecoin-project/litecoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/litecoind/Manifest b/net-p2p/litecoind/Manifest
new file mode 100644
index 000000000000..1ead5112eb41
--- /dev/null
+++ b/net-p2p/litecoind/Manifest
@@ -0,0 +1,2 @@
+DIST litecoin-0.10.2.2.tar.gz 4700783 SHA256 952c84b181323db17a8fa23217f59b576ad3ebad92c158b3a7c29d458a1130dc SHA512 46e4c014ae8527dd58af073bab96ea4fd55c69fcc63eaa4fd600bf3c1fc2102500151b49431a72b55334a409d4f5226937cd0c5337feaa4ad49e6ef9e9728aba WHIRLPOOL 5c1d5605d4afb16744fcf0b09dd52eb574aea0cdd9754f94d4cfd9ac064491a0e192d8c4b1a3324e355d71758735265b272dfa41f938212e17badb9f8a70698b
+DIST litecoin-0.8.7.4.tar.gz 4808429 SHA256 032d1eb2ffb06ce467f514e08a66f42bcd507df2d8f1cf2c0541f2906288931a SHA512 14588dab6450bee439c3af16e277afc1f2ff562c93463d9767da27cf724cd6bb4a1c64100806d61dc1d062a39f440e4878e19b425f29e866562acc56c893cca5 WHIRLPOOL 1329d7c234c75b5083f58f5edf69b6ea9acc13f48a9734cd839001dcd3e52c10d3ade55ac853e196deca8b149aba00a3590e52cf766f62b941bd4e4828f10b96
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-sys_leveldb.patch b/net-p2p/litecoind/files/litecoin-sys_leveldb.patch
new file mode 100644
index 000000000000..a4ae56aeabbb
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin-sys_leveldb.patch
@@ -0,0 +1,193 @@
+diff -Naur litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro litecoin-0.8.5.3-rc3/bitcoin-qt.pro
+--- litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/bitcoin-qt.pro 2013-11-29 14:53:00.960537685 -0500
+@@ -5,7 +5,7 @@
+ INCLUDEPATH += src src/json src/qt
+ QT += core gui network
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+-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
+
+@@ -101,25 +101,30 @@
+ 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 litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp litecoin-0.8.5.3-rc3/src/leveldb.cpp
+--- litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/leveldb.cpp 2013-11-29 14:55:33.760543008 -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 litecoin-0.8.5.3-rc3.orig/src/makefile.unix litecoin-0.8.5.3-rc3/src/makefile.unix
+--- litecoin-0.8.5.3-rc3.orig/src/makefile.unix 2013-11-28 21:17:05.000000000 -0500
++++ litecoin-0.8.5.3-rc3/src/makefile.unix 2013-11-29 15:08:58.337571033 -0500
+@@ -110,8 +110,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 \
+@@ -120,7 +119,6 @@
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -141,9 +139,17 @@
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
+
+ ifdef USE_SSE2
+ DEFS += -DUSE_SSE2
+@@ -156,15 +162,25 @@
+ test check: test_litecoin FORCE
+ ./test_litecoin
+
++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
+@@ -175,33 +191,34 @@
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%-sse2.o: %-sse2.cpp
+- $(CXX) -c $(xCXXFLAGS) -msse2 -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)
+
++obj/%-sse2.o: %-sse2.cpp
++ $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
+ obj/%.o: %.cpp
+- $(CXX) -c $(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)
+
+-litecoind: $(OBJS:obj/%=obj/%)
++litecoind: $(OBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+-
+ 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)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
++
++TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
+
+-test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_litecoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
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 b/net-p2p/litecoind/files/litecoin.initd
new file mode 100644
index 000000000000..036ab8c577a9
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/litecoin"
+CONFFILE="${VARDIR}/.litecoin/litecoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [[ "${LITECOIN_USER}" == "" ]] ; then
+ eerror "Please edit /etc/conf.d/litecoind"
+ eerror "A user must be specified to run litecoind 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 "${LITECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/litecoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${LITECOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${LITECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/litecoind"
+ 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 Litecoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping Litecoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${LITECOIN_USER}" --name litecoind \
+ --pidfile /var/run/litecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/litecoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${LITECOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${LITECOIN_USER}" \
+ --name litecoind --pidfile /var/run/litecoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${LITECOIN_USER}" --name litecoind \
+ --pidfile /var/run/litecoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/litecoind \
+ --chuid "${LITECOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${LITECOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${LITECOIN_USER}" \
+ --name litecoind \
+ --pidfile /var/run/litecoind.pid
+ eend $?
+}
diff --git a/net-p2p/litecoind/files/litecoin.initd-r1 b/net-p2p/litecoind/files/litecoin.initd-r1
new file mode 100644
index 000000000000..c5bd2f9ceef2
--- /dev/null
+++ b/net-p2p/litecoind/files/litecoin.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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.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.2.2-r1.ebuild b/net-p2p/litecoind/litecoind-0.10.2.2-r1.ebuild
new file mode 100644
index 000000000000..0a3c95d314f5
--- /dev/null
+++ b/net-p2p/litecoind/litecoind-0.10.2.2-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit autotools db-use eutils 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]
+ virtual/bitcoin-leveldb
+"
+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"
+ eautoreconf
+ rm -r src/leveldb
+}
+
+src_configure() {
+ 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/litecoind-0.8.7.4.ebuild b/net-p2p/litecoind/litecoind-0.8.7.4.ebuild
new file mode 100644
index 000000000000..26d0a7f2dfef
--- /dev/null
+++ b/net-p2p/litecoind/litecoind-0.8.7.4.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit bash-completion-r1 db-use eutils 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="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}"
+
+pkg_setup() {
+ local UG='litecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/litecoin "${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 litecoin-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_litecoin
+# ./test_litecoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${PN}
+
+ 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
+
+ sed -i -e 's/bitcoin/litecoin/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}/litecoind.logrotate" litecoind
+ fi
+}
diff --git a/net-p2p/litecoind/metadata.xml b/net-p2p/litecoind/metadata.xml
new file mode 100644
index 000000000000..bc7a1fd1d7a9
--- /dev/null
+++ b/net-p2p/litecoind/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>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <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/microdc/Manifest b/net-p2p/microdc/Manifest
new file mode 100644
index 000000000000..baa2f04e5ce5
--- /dev/null
+++ b/net-p2p/microdc/Manifest
@@ -0,0 +1 @@
+DIST microdc-0.11.0.tar.gz 517879 SHA256 57e12a6cfdf1feb5c526f4bfc9b250bb25c652e1ed81db28c9db1ab64af67b7e
diff --git a/net-p2p/microdc/metadata.xml b/net-p2p/microdc/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/microdc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/microdc/microdc-0.11.0.ebuild b/net-p2p/microdc/microdc-0.11.0.ebuild
new file mode 100644
index 000000000000..185bb022f167
--- /dev/null
+++ b/net-p2p/microdc/microdc-0.11.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A small command-line based Direct Connect client"
+HOMEPAGE="http://www.nongnu.org/microdc/"
+SRC_URI="http://savannah.nongnu.org/download/microdc/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+DEPEND="sys-libs/ncurses
+ >=sys-libs/readline-4
+ nls? ( sys-devel/gettext )"
+
+src_compile() {
+ econf $(use_enable nls) || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog NEWS README doc/*
+}
diff --git a/net-p2p/microdc2/Manifest b/net-p2p/microdc2/Manifest
new file mode 100644
index 000000000000..91fc40373518
--- /dev/null
+++ b/net-p2p/microdc2/Manifest
@@ -0,0 +1,2 @@
+DIST microdc2-0.15.6.tar.gz 639392 SHA256 d1990eb1aa52115c649466011c8163e454272250b041e480f0a521212c04bc49
+DIST microdc2_0.15.6-1.debian.tar.gz 162790 SHA256 3761ce9f6ea8b7ad77f21c9300cee9cc9570e6ab057d6c1b21edc8bb81f75665
diff --git a/net-p2p/microdc2/metadata.xml b/net-p2p/microdc2/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/microdc2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/microdc2/microdc2-0.15.6-r2.ebuild b/net-p2p/microdc2/microdc2-0.15.6-r2.ebuild
new file mode 100644
index 000000000000..7361a4b68ff5
--- /dev/null
+++ b/net-p2p/microdc2/microdc2-0.15.6-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit autotools eutils
+
+DESCRIPTION="A small command-line based Direct Connect client"
+HOMEPAGE="http://corsair626.no-ip.org/microdc/"
+SRC_URI="http://corsair626.no-ip.org/microdc/${P}.tar.gz
+ mirror://debian/pool/main/m/${PN}/${PN}_${PV}-1.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND="app-arch/bzip2
+ >=dev-libs/libxml2-2.6.16
+ sys-libs/ncurses
+ >=sys-libs/readline-4"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ local dpatch="${WORKDIR}/debian/patches"
+
+ epatch \
+ "${dpatch}"/disable-libxml2-version-check \
+ "${dpatch}"/rename-manpage \
+ "${dpatch}"/disable-make-tthsum \
+ "${dpatch}"/debian-link-system-bz2
+
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_enable nls)
+
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README doc/*
+}
diff --git a/net-p2p/mktorrent-borg/Manifest b/net-p2p/mktorrent-borg/Manifest
new file mode 100644
index 000000000000..c62b24644df0
--- /dev/null
+++ b/net-p2p/mktorrent-borg/Manifest
@@ -0,0 +1 @@
+DIST mktorrent-0.9.9.tgz 6087 SHA256 d9dc38d13dffe817c4e20c9c489b0e46a0f2b9ae2bc0367d5e6bba8e5cdde83f
diff --git a/net-p2p/mktorrent-borg/metadata.xml b/net-p2p/mktorrent-borg/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /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>
+<herd>net-p2p</herd>
+</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..354e9dced3f8
--- /dev/null
+++ b/net-p2p/mktorrent-borg/mktorrent-borg-0.9.9.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..733adc34b81e
--- /dev/null
+++ b/net-p2p/mktorrent/Manifest
@@ -0,0 +1 @@
+DIST mktorrent-1.0.tar.gz 23089 SHA256 6f8e562af6366e0d9bde76e434f740b55722c6c3c555860dbe80083f9d1d119f SHA512 f103c8860c008796c2dc604fcabce7374264fd7814237fcad5f9dab0fe10e927b0e2d9b58e7462dd198265a7d83fe30fd68313c7dce4029d8c331a6f2d4622de WHIRLPOOL 2a907fe846ae5a35dbb38fbd6707a89121d34b9658f1afa682db14da9254cc58ed376fc23c834753409769643868294b0f1354fd7d9d567ec0cff49ee713b163
diff --git a/net-p2p/mktorrent/metadata.xml b/net-p2p/mktorrent/metadata.xml
new file mode 100644
index 000000000000..5907da4c707e
--- /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>
+ <herd>net-p2p</herd>
+ <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..22c51689aaba
--- /dev/null
+++ b/net-p2p/mktorrent/mktorrent-1.0-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..fccb17598553
--- /dev/null
+++ b/net-p2p/mldonkey/Manifest
@@ -0,0 +1,2 @@
+DIST mldonkey-3.1.3.tar.bz2 2848964 SHA256 7c259f9f41cc12899045710ddce02e6d25962b2cb5c22f9cf58af0483f06d9e2 SHA512 921e428743934cd7a94fcdb8fea43a5a57cc3232a68fff443dbeb7f724fbe6805c38f4ae8c6e58c552e7a42c49f1c233f622239d6c7ee1ccf920bc19b2aef8f9 WHIRLPOOL 3e544fa8000e27d16a34af19969a8830f6c22de9ec21e4da2310ca4674a009e64b3bb03b530a03bf2d4cd71346f6de13288bae4b1b04ec0dc9df92f79835afdc
+DIST mldonkey-3.1.5.tar.bz2 2847382 SHA256 74f9d4bcc72356aa28d0812767ef5b9daa03efc5d1ddabf56447dc04969911cb SHA512 96e75acf91d7ecc41490f898e06d284da27404c7e567f173936d8113885a3b4b6bc93341358f92a30d3f699eef681d97ce56414a37bb02a535ad2da4d4ad13a3 WHIRLPOOL b9e15809a49cc12e69a6d1188441e9d5603ec76cb7bfe2b2e0bfce3c50abb31296904c842f487076b227f577046ccbd3ceb7cd1a601d3faa6928b1bfde8c780f
diff --git a/net-p2p/mldonkey/files/2.9.5-execstacks.patch b/net-p2p/mldonkey/files/2.9.5-execstacks.patch
new file mode 100644
index 000000000000..487bfbc38100
--- /dev/null
+++ b/net-p2p/mldonkey/files/2.9.5-execstacks.patch
@@ -0,0 +1,44 @@
+diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i386.s mldonkey-2.9.5/src/utils/lib/md4_i386.s
+--- mldonkey-2.9.5.orig/src/utils/lib/md4_i386.s 2008-06-30 17:45:37.000000000 +0200
++++ mldonkey-2.9.5/src/utils/lib/md4_i386.s 2008-06-30 17:48:10.000000000 +0200
+@@ -934,3 +934,7 @@
+
+ .data
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
+diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i486.s mldonkey-2.9.5/src/utils/lib/md4_i486.s
+--- mldonkey-2.9.5.orig/src/utils/lib/md4_i486.s 2008-06-30 17:45:37.000000000 +0200
++++ mldonkey-2.9.5/src/utils/lib/md4_i486.s 2008-06-30 17:48:21.000000000 +0200
+@@ -1091,3 +1091,7 @@
+
+ .data
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
+diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i586.s mldonkey-2.9.5/src/utils/lib/md4_i586.s
+--- mldonkey-2.9.5.orig/src/utils/lib/md4_i586.s 2008-06-30 17:45:37.000000000 +0200
++++ mldonkey-2.9.5/src/utils/lib/md4_i586.s 2008-06-30 17:48:27.000000000 +0200
+@@ -1047,3 +1047,7 @@
+
+ .data
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
+diff -ur mldonkey-2.9.5.orig/src/utils/lib/md4_i686.s mldonkey-2.9.5/src/utils/lib/md4_i686.s
+--- mldonkey-2.9.5.orig/src/utils/lib/md4_i686.s 2008-06-30 17:45:37.000000000 +0200
++++ mldonkey-2.9.5/src/utils/lib/md4_i686.s 2008-06-30 17:48:34.000000000 +0200
+@@ -1009,3 +1009,7 @@
+
+ .data
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
++
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..7a007dededf0
--- /dev/null
+++ b/net-p2p/mldonkey/files/mldonkey.initd
@@ -0,0 +1,121 @@
+#!/sbin/runscript
+
+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/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..bc22bf0cb84c
--- /dev/null
+++ b/net-p2p/mldonkey/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <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>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/mldonkey/mldonkey-3.1.3.ebuild b/net-p2p/mldonkey/mldonkey-3.1.3.ebuild
new file mode 100644
index 000000000000..cbdce7b3600f
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-3.1.3.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+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
+ 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"
+}
+
+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 || die "emake failed"
+
+ if ! use guionly; then
+ emake utils || die "emake utils failed"
+ 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 || die "failed to install $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 || die "failed to install $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.5.ebuild b/net-p2p/mldonkey/mldonkey-3.1.5.ebuild
new file mode 100644
index 000000000000..fb3a0b9bb5ed
--- /dev/null
+++ b/net-p2p/mldonkey/mldonkey-3.1.5.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+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
+ 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"
+ epatch "${FILESDIR}/ocaml4.patch"
+}
+
+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..f48eb9ce5f6e
--- /dev/null
+++ b/net-p2p/multibit/Manifest
@@ -0,0 +1 @@
+DIST multibit-0.5.18-linux.jar 7993916 SHA256 a067c9638edfdf39f3e9fa154b0c6d8cfb7c58c0edd95a02c0ca903160ca3aad SHA512 788910b4a8b27f345df2cc58f8641a34d038091ffcddd69eca07c9452ed406113cf70479e6214ea52f39536d8eb21b34ecb7ab359868199223b2796b50b1b561 WHIRLPOOL d75467437d0d6eb744fce183071c1197386481ffc905d6abb02a31a6725b1e2b61c388815e0839b2120bd37029e9bf8ae76aa4ed5980ff30fb2abc041ec80549
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 100755
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..1e7587374fdf
--- /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>
+ <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..7fc08032b9c8
--- /dev/null
+++ b/net-p2p/multibit/multibit-0.5.18.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..365e98d8128c
--- /dev/null
+++ b/net-p2p/myster/Manifest
@@ -0,0 +1 @@
+DIST Myster_PR8_Generic.zip 934533 SHA256 5156ea269bbdc565567eadaef1c64efed8863f10818ae2a6fab28611b5d7ed37
diff --git a/net-p2p/myster/metadata.xml b/net-p2p/myster/metadata.xml
new file mode 100644
index 000000000000..7a9e12eb9c4b
--- /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>
+ <herd>net-p2p</herd>
+ <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..559b4550b714
--- /dev/null
+++ b/net-p2p/myster/myster-8.0-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~ppc 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/nap/Manifest b/net-p2p/nap/Manifest
new file mode 100644
index 000000000000..df6dd76d6a07
--- /dev/null
+++ b/net-p2p/nap/Manifest
@@ -0,0 +1 @@
+DIST nap-1.5.4.tar.gz 321353 SHA256 55c7527951fb9408a133b4c3302df6096de6bc4e0511b3654d820ce455694db2 SHA512 dcb0db523f7e3eeb910b6cfd9768a562b0b383ea33a236a144e0b3299c2cd9e89c15165a8e28525bc1d94d84f2b8c5d41ec54102f1f2ce3aca2cdc022c81944d WHIRLPOOL fa04300bca97d82478da861c9bc071eabbf5adffdc454ba31b915680669e477d74aec4d1ccd894dc15922f5efc268759d34ceff2177ffd7a34f8e11e70736161
diff --git a/net-p2p/nap/metadata.xml b/net-p2p/nap/metadata.xml
new file mode 100644
index 000000000000..aa0f3664825f
--- /dev/null
+++ b/net-p2p/nap/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/nap/nap-1.5.4-r1.ebuild b/net-p2p/nap/nap-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..5d4a33524d83
--- /dev/null
+++ b/net-p2p/nap/nap-1.5.4-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Console Napster/OpenNap client"
+HOMEPAGE="http://www.mathstat.dal.ca/~selinger/nap/"
+SRC_URI="http://www.mathstat.dal.ca/~selinger/nap/dist/${P}.tar.gz"
+
+LICENSE="nap GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="ppc x86"
+IUSE=""
+RESTRICT="bindist"
+
+src_unpack() {
+ unpack ${A}
+
+ # Install the docs in the right dir
+ sed -i -e "s~\$(prefix)/doc/nap~\$(prefix)/share/doc/${P}~g" \
+ "${S}"/doc/Makefile.in
+}
+
+src_compile() {
+ ./configure --prefix="${D}"/usr --mandir="${D}"/usr/share/man || die "configure problem"
+ emake CC="$(tc-getCC)" || die "compile problem"
+}
+
+src_install() {
+ emake install || die "install problem"
+
+ dodoc AUTHORS COPYRIGHT ChangeLog NEWS README
+}
diff --git a/net-p2p/ncdc/Manifest b/net-p2p/ncdc/Manifest
new file mode 100644
index 000000000000..e3909e31d03b
--- /dev/null
+++ b/net-p2p/ncdc/Manifest
@@ -0,0 +1,3 @@
+DIST ncdc-1.18.1.tar.gz 350781 SHA256 cc257731cd2ccc55831b8606694c379d0d8c441d250b8003785bec3d58fa8685 SHA512 0d52906de277215b5ed3f00cd3d502f3942a6ab5041197efc1edfd9e7a5b3ee32c2eda957a0bb1efa5e4ffb9f187c76cb324bfe2cd43ba591f9cd3301b88a70e WHIRLPOOL 21b506d41c7f546ef81f42d7d21b9d8ef4ce5bfc9a0403103559282cbf5b48d74380a8a84d4e1a41eaa48be3d9eadcc2ea41532e9399a205b51553d6f65aee9f
+DIST ncdc-1.19.1.tar.gz 354308 SHA256 a6b23381434a47f7134d9ebdf5658fd06768f9b5de498c43e0fa00d1c7229d47 SHA512 36eda8c582ddb40ef732151ecc1654eae927a6a004430d8d27528b3c57ae5e1b06c23a867d8e1624ee4365031325fd7ced2888dd64ff129431bba9ff4171f189 WHIRLPOOL eec4f206ffc15c2389855215c17dada8004200c4eaa5d54bb175296dccccd1fa9518b6a12798c72751896645ea4f77bae58708dee4743bef50c5af98e97af36e
+DIST ncdc-1.19.tar.gz 354337 SHA256 c24130b8bb735f936b1090d4e5f4413c08548a45a2640193386c26dc1dc7fbf1 SHA512 0c94a003f61258f1b1fd5bfc347ca33d1b6b48923238e0f7c26e655178ba4a231eca1e47d1c0fccca1cfe6858ad88651180f901e5bca16838e56302ce074fa69 WHIRLPOOL 55c97274a1bffa5c42f8c9acdb5bf6d8e22adeab15d9391fd6d47133cc25f9b0db11ff471242149440706125bd70205fe9ff0836007b3c9b4e7b7a49c0fc2881
diff --git a/net-p2p/ncdc/metadata.xml b/net-p2p/ncdc/metadata.xml
new file mode 100644
index 000000000000..9d60532f08b2
--- /dev/null
+++ b/net-p2p/ncdc/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+<upstream>
+ <maintainer status="active">
+ <email>projects@yorhel.nl</email>
+ </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.18.1.ebuild b/net-p2p/ncdc/ncdc-1.18.1.ebuild
new file mode 100644
index 000000000000..28ce780e762b
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-1.18.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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=""
+
+RDEPEND="app-arch/bzip2
+ dev-db/sqlite:3
+ dev-libs/glib:2
+ net-libs/gnutls
+ sys-libs/ncurses:5[unicode]
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ dev-util/makeheaders
+ virtual/pkgconfig"
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
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..01fb84379971
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-1.19.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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:5[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.19.ebuild b/net-p2p/ncdc/ncdc-1.19.ebuild
new file mode 100644
index 000000000000..b721600054a4
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-1.19.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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:5[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..3fe8ec778bd7
--- /dev/null
+++ b/net-p2p/ncdc/ncdc-9999.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils git-2 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:5[unicode]
+ sys-libs/zlib
+ geoip? ( dev-libs/geoip )"
+DEPEND="${RDEPEND}
+ dev-util/makeheaders
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch_user
+ 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..54c486ffa519
--- /dev/null
+++ b/net-p2p/nicotine+/Manifest
@@ -0,0 +1 @@
+DIST nicotine+-1.2.16.tar.bz2 3892006 SHA256 71e5b33e273daaf072dbf63839536c14d7ead9d149323d50eee09f7429e34c1d SHA512 8b5b7f99e14f28f3a1c7a77fc12662cfafa0f9ac9d3c8c2a2d1e959f96a9161005a29ad2ed07fa07ea8908b88f247f3c120b299e7183a0558994b5e96cb47f78 WHIRLPOOL 0c650df11e6f6e1c8d94f863bcb00c84f7a92a13c754977d04d1664066b64fd4b95d824001046b36299f7a53493e418562d23f6ac25c0c91ceace95a024571fb
diff --git a/net-p2p/nicotine+/metadata.xml b/net-p2p/nicotine+/metadata.xml
new file mode 100644
index 000000000000..387556b1d707
--- /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>
+ <herd>net-p2p</herd>
+ <maintainer>
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+ <upstream>
+ <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..e368c857e565
--- /dev/null
+++ b/net-p2p/nicotine+/nicotine+-1.2.16-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/nicotine+/nicotine+-1.2.16.ebuild b/net-p2p/nicotine+/nicotine+-1.2.16.ebuild
new file mode 100644
index 000000000000..3ab01e7e7159
--- /dev/null
+++ b/net-p2p/nicotine+/nicotine+-1.2.16.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+
+inherit distutils
+
+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
+ gnome-base/librsvg"
+
+DEPEND="${RDEPEND}"
+
+PYTHON_MODNAME="pynicotine"
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ sed -i -e 's:\(Icon=\).*:\1nicotine-plus-32px:' \
+ "${S}"/files/nicotine.desktop
+}
+
+src_install() {
+ distutils_src_install
+ python_convert_shebangs -r 2 "${D}"
+ dosym nicotine.py /usr/bin/nicotine
+}
+
+pkg_postinst() {
+ distutils_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..b99e607888b4
--- /dev/null
+++ b/net-p2p/opendchub/Manifest
@@ -0,0 +1 @@
+DIST opendchub-0.8.2.tar.gz 188551 SHA256 c00d5859fde939741699026da9d4d5fd0b409474608353710204c3c78a8ac5bf
diff --git a/net-p2p/opendchub/files/0.7.14-overflow.patch b/net-p2p/opendchub/files/0.7.14-overflow.patch
new file mode 100644
index 000000000000..996ff65fd0ae
--- /dev/null
+++ b/net-p2p/opendchub/files/0.7.14-overflow.patch
@@ -0,0 +1,12 @@
+diff -Naur opendchub-0.7.14.vanilla/src/commands.c opendchub-0.7.14/src/commands.c
+--- opendchub-0.7.14.vanilla/src/commands.c 2003-11-15 08:07:43.000000000 -0600
++++ opendchub-0.7.14/src/commands.c 2004-11-27 09:54:57.113410240 -0600
+@@ -2842,7 +2842,7 @@
+ {
+ char move_string[MAX_HOST_LEN+20];
+
+- sprintf(move_string, "$ForceMove %s", buf);
++ snprintf(move_string, MAX_HOST_LEN, "$ForceMove %s", buf);
+
+ send_to_humans(move_string, REGULAR | REGISTERED | OP, user);
+ remove_all(UNKEYED | NON_LOGGED | REGULAR | REGISTERED | OP, 1, 1);
diff --git a/net-p2p/opendchub/files/0.7.14-telnet.patch b/net-p2p/opendchub/files/0.7.14-telnet.patch
new file mode 100644
index 000000000000..f5254cbbbe11
--- /dev/null
+++ b/net-p2p/opendchub/files/0.7.14-telnet.patch
@@ -0,0 +1,12 @@
+diff -Naur opendchub-0.7.14.vanilla/src/main.c opendchub-0.7.14/src/main.c
+--- opendchub-0.7.14.vanilla/src/main.c 2003-11-15 08:01:16.000000000 -0600
++++ opendchub-0.7.14/src/main.c 2004-08-23 15:58:33.119710184 -0500
+@@ -1056,7 +1056,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-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-gentoo.patch b/net-p2p/opendchub/files/opendchub-gentoo.patch
new file mode 100644
index 000000000000..c6854e2178ca
--- /dev/null
+++ b/net-p2p/opendchub/files/opendchub-gentoo.patch
@@ -0,0 +1,30 @@
+--- configure~ 2004-04-11 18:31:55.000000000 +0000
++++ configure 2004-04-11 18:40:42.068793280 +0000
+@@ -4343,12 +4343,6 @@
+ fi
+ fi
+
+-if test ! -d $HOME/.opendchub; then
+- echo "creating config directory: $HOME/.opendchub"
+- mkdir $HOME/.opendchub
+- chmod 700 $HOME/.opendchub;
+-fi
+-
+ # Check whether --enable-perl or --disable-perl was given.
+ if test "${enable_perl+set}" = set; then
+ enableval="$enable_perl"
+@@ -4406,14 +4400,6 @@
+
+ perl_libs=`perl -MExtUtils::Embed -e ldopts`
+
+- if test ! -d $HOME/.opendchub/scripts; then
+- echo "creating script directory: $HOME/.opendchub/scripts"
+- mkdir $HOME/.opendchub/scripts
+- chmod 700 $HOME/.opendchub/scripts;
+- for i in Samplescripts/*; do
+- cp $i $HOME/.opendchub/scripts;
+- done
+- fi
+ fi
+ else
+ echo "Perl script support is disabled."
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..66c6da71d708
--- /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>
+ <herd>net-p2p</herd>
+ <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..ce857bc4350f
--- /dev/null
+++ b/net-p2p/opendchub/opendchub-0.8.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/phex/Manifest b/net-p2p/phex/Manifest
new file mode 100644
index 000000000000..41199c8f601e
--- /dev/null
+++ b/net-p2p/phex/Manifest
@@ -0,0 +1 @@
+DIST phex_3.2.0.102_src.zip 5416827 SHA256 e5b6316a3e60c68949ca33321804ae9473858f7d65d5fb59275a4f0e7a64eda9
diff --git a/net-p2p/phex/files/0001-Remove-MacOS-GUI-references.patch b/net-p2p/phex/files/0001-Remove-MacOS-GUI-references.patch
new file mode 100644
index 000000000000..f772157084e8
--- /dev/null
+++ b/net-p2p/phex/files/0001-Remove-MacOS-GUI-references.patch
@@ -0,0 +1,113 @@
+From 2bd7907aef02530680cfd795f3f757613777c064 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky@gmail.com>
+Date: Sat, 10 Jul 2010 15:50:13 +0200
+Subject: [PATCH] Remove MacOS GUI references
+
+---
+ src/phex/gui/common/FileDialogHandler.java | 45 +--------------------------
+ src/phex/gui/common/GUIRegistry.java | 5 ---
+ 2 files changed, 2 insertions(+), 48 deletions(-)
+
+diff --git a/src/phex/gui/common/FileDialogHandler.java b/src/phex/gui/common/FileDialogHandler.java
+index a5ee4f7..530f374 100644
+--- a/src/phex/gui/common/FileDialogHandler.java
++++ b/src/phex/gui/common/FileDialogHandler.java
+@@ -34,7 +34,6 @@ import javax.swing.filechooser.FileFilter;
+
+ import org.apache.commons.lang.SystemUtils;
+
+-import phex.gui.macosx.MacOsxGUIUtils;
+ import phex.utils.DirectoryOnlyFileFilter;
+
+ public class FileDialogHandler
+@@ -45,7 +44,7 @@ public class FileDialogHandler
+ {
+ if ( SystemUtils.IS_OS_MAC_OSX )
+ {
+- return openMacDirectoryChooser( title, null, null );
++ return null;
+ }
+ else
+ {
+@@ -71,10 +70,7 @@ public class FileDialogHandler
+ {
+ if ( SystemUtils.IS_OS_MAC_OSX )
+ {
+- return new File[]
+- {
+- openMacDirectoryChooser( title, notifyPopupTitle, notifyPopupShortMessage )
+- };
++ return null;
+ }
+ else
+ {
+@@ -85,43 +81,6 @@ public class FileDialogHandler
+ }
+ }
+
+- private static File openMacDirectoryChooser( String title,
+- String notifyPopupTitle, String notifyPopupShortMessage )
+- {
+- // create folder dialog through other class this prevents
+- // NoClassDefFoundError on Windows systems since the import of the
+- // required OS X classes is elsewhere.
+- FileDialog dia = MacOsxGUIUtils.createFolderDialog();
+- dia.setTitle(title);
+-
+- // unfortunatly its not possible to display notification popup
+- // besides heavy weight dialog.
+- //if ( notifyPopupTitle != null || notifyPopupShortMessage != null )
+- //{
+- //displayMacNotificationPopup( dia, notifyPopupTitle,
+- // notifyPopupShortMessage );
+- //}
+-
+- DirectoryOnlyFileFilter filter = new DirectoryOnlyFileFilter();
+- dia.setFilenameFilter( new FileFilterWrapper(
+- filter) );
+- dia.setVisible( true );
+- String dirStr = dia.getDirectory();
+- String fileStr = dia.getFile();
+-
+- if( dirStr == null || fileStr == null )
+- {
+- return null;
+- }
+- File file = new File(dirStr, fileStr);
+- // validate filter
+- if( !filter.accept(file) )
+- {
+- return null;
+- }
+- return file;
+- }
+-
+ private static JFileChooser initDefaultChooser( String title,
+ String approveBtnText, char approveBtnMnemonic, FileFilter filter,
+ int mode, File currentDirectory, String notifyPopupTitle,
+diff --git a/src/phex/gui/common/GUIRegistry.java b/src/phex/gui/common/GUIRegistry.java
+index 852722e..3c28f2e 100644
+--- a/src/phex/gui/common/GUIRegistry.java
++++ b/src/phex/gui/common/GUIRegistry.java
+@@ -47,7 +47,6 @@ import phex.gui.actions.FWAction;
+ import phex.gui.actions.NewDownloadAction;
+ import phex.gui.actions.SwitchNetworkAction;
+ import phex.gui.chat.ChatFrameManager;
+-import phex.gui.macosx.MacOsxGUIUtils;
+ import phex.gui.prefs.InterfacePrefs;
+ import phex.update.UpdateCheckRunner;
+ import phex.utils.Localizer;
+@@ -119,10 +118,6 @@ public final class GUIRegistry implements GUIRegistryConstants
+ }
+ }
+
+- if ( SystemUtils.IS_OS_MAC_OSX )
+- {
+- MacOsxGUIUtils.installEventHandlers();
+- }
+ initializeGlobalActions();
+ chatFrameManager = new ChatFrameManager();
+ try
+--
+1.7.1
+
diff --git a/net-p2p/phex/files/phex-3.0.0.99.sh b/net-p2p/phex/files/phex-3.0.0.99.sh
new file mode 100644
index 000000000000..9713680ef580
--- /dev/null
+++ b/net-p2p/phex/files/phex-3.0.0.99.sh
@@ -0,0 +1,7 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+#!/bin/sh
+
+java -classpath $(java-config -p commons-logging,commons-httpclient-3,phex,jgoodies-looks-2.0,jgoodies-forms) phex.Main
diff --git a/net-p2p/phex/metadata.xml b/net-p2p/phex/metadata.xml
new file mode 100644
index 000000000000..dbb3a316f9b1
--- /dev/null
+++ b/net-p2p/phex/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <herd>java</herd>
+ <upstream>
+ <remote-id type="sourceforge">phex</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/phex/phex-3.2.0.102-r1.ebuild b/net-p2p/phex/phex-3.2.0.102-r1.ebuild
new file mode 100644
index 000000000000..75b2f8c92d13
--- /dev/null
+++ b/net-p2p/phex/phex-3.2.0.102-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit java-pkg-2 java-ant-2
+
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="java gnutella file-sharing application"
+HOMEPAGE="http://phex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}_src.zip"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+COMMON_DEPEND="dev-java/commons-httpclient:3
+ dev-java/commons-logging:0
+ dev-java/jgoodies-forms:0
+ dev-java/jgoodies-looks:2.0
+ dev-java/log4j:0
+ dev-java/l2fprod-common:0
+ dev-java/commons-beanutils:1.7
+ dev-java/commons-codec:0
+ dev-java/commons-collections:0
+ dev-java/commons-lang:2.1"
+
+DEPEND="app-arch/unzip
+ >=virtual/jdk-1.5
+ ${COMMON_DEPEND}"
+RDEPEND=">=virtual/jre-1.5
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}/${MY_P}_src"
+
+JAVA_PKG_BSFIX="off"
+
+src_prepare() {
+ # remove parts related to MacOS gui classes
+ epatch "${FILESDIR}/0001-Remove-MacOS-GUI-references.patch"
+ # remove unused class (make sure it's not compiled)
+ rm -vf src/phex/gui/macosx/MacOsxGUIUtils.java
+
+ rm -vf lib/*.jar || die
+ # avoid patches like plague
+ sed -i "s/createJar, copyThirdpartyJars/createJar/" build/buildJava.xml || die
+ JAVA_ANT_REWRITE_CLASSPATH="true" java-ant_bsfix_files build/*.xml
+ # remove bundled packages that we have - bug #176739
+ rm -rf src/com/l2fprod src/org/apache || die
+}
+
+src_compile() {
+ local gcp="$(java-pkg_getjars commons-httpclient-3,commons-logging,jgoodies-forms,jgoodies-looks-2.0,log4j,l2fprod-common,commons-beanutils-1.7,commons-codec,commons-collections,commons-lang-2.1)"
+ cd build
+ eant -Dgentoo.classpath="${gcp}:MRJAdapter.jar" -Dproject.buildtarget=build buildJava
+}
+
+src_install() {
+ java-pkg_dojar build/lib/${PN}.jar
+
+ java-pkg_dolauncher ${PN} --main phex.Main
+
+ dohtml docs/readme/* || die
+}
diff --git a/net-p2p/phxd/Manifest b/net-p2p/phxd/Manifest
new file mode 100644
index 000000000000..0a35ae4c2bfa
--- /dev/null
+++ b/net-p2p/phxd/Manifest
@@ -0,0 +1 @@
+DIST phxd-0.1.0_pre23092005.tar.bz2 25224 SHA256 18f79eadb80524138a569cd6b1c3e4214bc65866a30d6ac3b5e13997c5115953
diff --git a/net-p2p/phxd/files/80phxd b/net-p2p/phxd/files/80phxd
new file mode 100644
index 000000000000..4c93ff2c5baf
--- /dev/null
+++ b/net-p2p/phxd/files/80phxd
@@ -0,0 +1 @@
+CONFIG_PROTECT="/var/phxd"
diff --git a/net-p2p/phxd/metadata.xml b/net-p2p/phxd/metadata.xml
new file mode 100644
index 000000000000..02b118029ce4
--- /dev/null
+++ b/net-p2p/phxd/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <longdescription>phxd is an Hotline server under the GPL for Linux/Unixes.
+ It supports the Hotline Protocol from 1.2.3 up to 1.5+ (and this means
+ it also includes the 1.9+ clients)
+ </longdescription>
+</pkgmetadata>
diff --git a/net-p2p/phxd/phxd-0.1.0_pre23092005.ebuild b/net-p2p/phxd/phxd-0.1.0_pre23092005.ebuild
new file mode 100644
index 000000000000..41d945af6a61
--- /dev/null
+++ b/net-p2p/phxd/phxd-0.1.0_pre23092005.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+DESCRIPTION="Next generation Hotline server in python. kang's branch"
+HOMEPAGE="http://www.avaraline.net"
+SRC_URI="mirror://gentoo/phxd-0.1.0_pre23092005.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE=""
+
+DEPEND="dev-python/twisted-core
+ dev-python/twisted-web"
+
+RDEPEND=""
+
+pkg_postinst() {
+ enewgroup phxd
+ enewuser phxd -1 /bin/bash /var/phxd phxd
+ chown phxd:phxd /var/phxd/files
+ chown phxd:phxd /var/phxd/chatlogs
+}
+
+src_install() {
+ cd "${WORKDIR}"
+ cd phxd
+
+ doenvd "${FILESDIR}"/80phxd
+
+ dodoc INSTALL README README-kang
+ dodir /var/phxd
+
+ exeinto /var/phxd; doexe phxd
+
+ cpdirs="support shared server client"
+ for i in $cpdirs; do
+ cp -R $i "${D}"/var/phxd
+ done
+ dodir /var/phxd/files
+ dodir /var/phxd/chatlogs
+
+ keepdir /var/phxd/files
+ keepdir /var/phxd/chatlogs
+ keepdir /var/phxd
+
+ insinto /var/phxd; doins config.py
+}
diff --git a/net-p2p/ppcoin-qt/Manifest b/net-p2p/ppcoin-qt/Manifest
new file mode 100644
index 000000000000..a98a901aaaf5
--- /dev/null
+++ b/net-p2p/ppcoin-qt/Manifest
@@ -0,0 +1 @@
+DIST ppcoin-0.4.0.tar.gz 12652477 SHA256 561076e8d4e82085d577eb717b9f8b52571556fea2b8181fa8eb6039218d3f06 SHA512 755890e32048f8cdfb9f93706eff952ae2876be394c0a76cf93a79562a28fe03c74c829c97b9234fbc27c03e4b706373f55723564ca7b91a4ff908ca072299c4 WHIRLPOOL eaacd820045fe2a343c45698674096a15228605418cffe61fc9e31eaf330dbb29635d6dbae534a90677fe035a598c7b061c0c3fa05c747514c24cfc24addeef4
diff --git a/net-p2p/ppcoin-qt/metadata.xml b/net-p2p/ppcoin-qt/metadata.xml
new file mode 100644
index 000000000000..5c6c87d9a059
--- /dev/null
+++ b/net-p2p/ppcoin-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>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ppcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/ppcoin-qt/ppcoin-qt-0.4.0.ebuild b/net-p2p/ppcoin-qt/ppcoin-qt-0.4.0.ebuild
new file mode 100644
index 000000000000..d61d135bea44
--- /dev/null
+++ b/net-p2p/ppcoin-qt/ppcoin-qt-0.4.0.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DB_VER="4.8"
+
+LANGS="ca_ES cs da de en es_CL es et eu_ES fa_IR fa fi fr_CA fr_FR he hr hu it lt nb nl pl pt_BR ro_RO ru sk sr sv tr uk zh_CN zh_TW"
+
+inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+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-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-qt/qtgui:4
+ dbus? (
+ dev-qt/qtdbus:4
+ )
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+"
+
+DOCS="../README README.md"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+src_prepare() {
+ 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 ppcoin 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_ppcoin
+# ./test_ppcoin || die 'Tests failed'
+#}
+
+src_install() {
+ qt4-r2_src_install
+
+ dobin ${PN}
+
+ insinto /usr/share/pixmaps
+ newins "src/qt/res/icons/ppcoin.ico" "${PN}.ico"
+
+ make_desktop_entry "${PN} %u" "PPcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/ppcoin;\nTerminal=false"
+
+ 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/ppcoind/Manifest b/net-p2p/ppcoind/Manifest
new file mode 100644
index 000000000000..a98a901aaaf5
--- /dev/null
+++ b/net-p2p/ppcoind/Manifest
@@ -0,0 +1 @@
+DIST ppcoin-0.4.0.tar.gz 12652477 SHA256 561076e8d4e82085d577eb717b9f8b52571556fea2b8181fa8eb6039218d3f06 SHA512 755890e32048f8cdfb9f93706eff952ae2876be394c0a76cf93a79562a28fe03c74c829c97b9234fbc27c03e4b706373f55723564ca7b91a4ff908ca072299c4 WHIRLPOOL eaacd820045fe2a343c45698674096a15228605418cffe61fc9e31eaf330dbb29635d6dbae534a90677fe035a598c7b061c0c3fa05c747514c24cfc24addeef4
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..1c7373104e8b
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# 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..4dabd48eff13
--- /dev/null
+++ b/net-p2p/ppcoind/files/ppcoin.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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.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..f48e467393c4
--- /dev/null
+++ b/net-p2p/ppcoind/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <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.ebuild b/net-p2p/ppcoind/ppcoind-0.4.0.ebuild
new file mode 100644
index 000000000000..b053df85f1ef
--- /dev/null
+++ b/net-p2p/ppcoind/ppcoind-0.4.0.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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() {
+ 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..51e38c8436f5
--- /dev/null
+++ b/net-p2p/primecoin-qt/Manifest
@@ -0,0 +1 @@
+DIST primecoin-0.1.2.tar.gz 16521236 SHA256 d0f3c6a91b4d505f25e9284bcca85e420cf09d0e6cf71e5a001b7e1367ef46d0 SHA512 cff71b0e6459c4e534e78acef9491090d05c0cb864a068c0a3cb289310a1ee13fd69c7b61a7d6cb9732af54fbcf1fa4e77db8c8528a09bbdafd36421fdf7aff1 WHIRLPOOL 5031efa135dcf08975a06a037179863ad180920e0c55e0ec5d1863b4b24d005ce829fa0e0f081120d3610bc0abd1d3919db477a33e32ec6d0d353b7177480eb1
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..b57a9d926e71
--- /dev/null
+++ b/net-p2p/primecoin-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>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <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..768aba01d6f4
--- /dev/null
+++ b/net-p2p/primecoin-qt/primecoin-qt-0.1.2-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..51e38c8436f5
--- /dev/null
+++ b/net-p2p/primecoind/Manifest
@@ -0,0 +1 @@
+DIST primecoin-0.1.2.tar.gz 16521236 SHA256 d0f3c6a91b4d505f25e9284bcca85e420cf09d0e6cf71e5a001b7e1367ef46d0 SHA512 cff71b0e6459c4e534e78acef9491090d05c0cb864a068c0a3cb289310a1ee13fd69c7b61a7d6cb9732af54fbcf1fa4e77db8c8528a09bbdafd36421fdf7aff1 WHIRLPOOL 5031efa135dcf08975a06a037179863ad180920e0c55e0ec5d1863b4b24d005ce829fa0e0f081120d3610bc0abd1d3919db477a33e32ec6d0d353b7177480eb1
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..a821c3771fdd
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.initd
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# 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..de80df26c379
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..40b750ea5f5c
--- /dev/null
+++ b/net-p2p/primecoind/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <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..219d8ca2e2b8
--- /dev/null
+++ b/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..0d802d1d946a
--- /dev/null
+++ b/net-p2p/pybitmessage/Manifest
@@ -0,0 +1,2 @@
+DIST pybitmessage-0.4.2.tar.gz 547565 SHA256 c69cef72adbdfa2a0ff8c5c7e5d15e640bf3283b9089c388ea48e893d564a573 SHA512 5e783243db4f507ec221092f6da18d25bb15a8c83f28aab7c1796a063d2608c0115c9d636cc73b66a09264a4ff69dda9ba373eff81640b1dd9595100dcdc4917 WHIRLPOOL 22c1ca5e5132248dc8492bd1ea327e81b8567b0ec271c774a07141579a63365dd4cc7fbd066dbba6153ce471057cead1f0763b4ae209789991b7c3b2cb5ebaa4
+DIST pybitmessage-0.4.3.tar.gz 605581 SHA256 0a0825b554aef4e6eba3e4c4eb89e03ee86bda6f3068a69f4314f26ad24a6e5d SHA512 d7d5db360e3fef88f9d9168464f6256fb44e207afabd2f9c31d85c264eab0b8a9d89f7e52aca1190f854beaf7b5ee48bd05c079cd31b775fa84b6e10612e8cee WHIRLPOOL cbe800ca83ffc213f8335a97aa6d534b41a968c76fcdff59a245694a84312e27f926b2e143bfb904036917c91bce7a27a5cfbbc83aa19005f3a41109c3efd53a
diff --git a/net-p2p/pybitmessage/metadata.xml b/net-p2p/pybitmessage/metadata.xml
new file mode 100644
index 000000000000..ada6833f13e3
--- /dev/null
+++ b/net-p2p/pybitmessage/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>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <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>
+</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..294d83eb0e4b
--- /dev/null
+++ b/net-p2p/pybitmessage/pybitmessage-0.4.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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() {
+ local python_moduleroot=${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.4.3.ebuild b/net-p2p/pybitmessage/pybitmessage-0.4.3.ebuild
new file mode 100644
index 000000000000..245d6fce20df
--- /dev/null
+++ b/net-p2p/pybitmessage/pybitmessage-0.4.3.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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() {
+ local python_moduleroot=${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-9999.ebuild b/net-p2p/pybitmessage/pybitmessage-9999.ebuild
new file mode 100644
index 000000000000..38f15d839de4
--- /dev/null
+++ b/net-p2p/pybitmessage/pybitmessage-9999.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit eutils python-r1 gnome2-utils git-2
+
+DESCRIPTION="P2P communications protocol"
+HOMEPAGE="https://bitmessage.org"
+EGIT_REPO_URI="https://github.com/Bitmessage/PyBitmessage.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}
+ dev-libs/openssl[-bindist]
+ dev-python/PyQt4[${PYTHON_USEDEP}]"
+
+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() {
+ local python_moduleroot=${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
+
+ nonfatal dodoc README.md debian/changelog
+ nonfatal doman man/*
+
+ nonfatal newicon -s 24 desktop/icon24.png ${PN}.png
+ nonfatal newicon -s scalable desktop/can-icon.svg ${PN}.svg
+ nonfatal 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/qbittorrent/Manifest b/net-p2p/qbittorrent/Manifest
new file mode 100644
index 000000000000..eb7cb672aaac
--- /dev/null
+++ b/net-p2p/qbittorrent/Manifest
@@ -0,0 +1,3 @@
+DIST qbittorrent-3.1.12.tar.xz 2465744 SHA256 d5d5b27958297f0b14cf03af8dd24a0d2a990e108c9a7a6159e4a2fbb1111c83 SHA512 af7cbb1a3158cd1fd6c28f17f1dbb62d94c9d192068b5a683b6b0e19e43664f3d312da055c5c19de75b5849c812b7aa9a0c966a7e464c120e0006bb1ea5a6e5a WHIRLPOOL 632fabec4c33104e55c73433028923033e65f37624aba37649e4f6f5593038fa9868e48787db7b1659690456835fc55dc542510d2f60732c66452d3c748508bf
+DIST qbittorrent-3.1.9.2.tar.xz 2231708 SHA256 b07ccdbe1ae079f781c62aff21d47183ae35a8d4e96f43f90503978d1830a361 SHA512 8437fb695fb720132d131e44727c28af46c651576d5321423142c190120c59cc6439f5df2e90486274956d253db657fcbd217a834e3ca53d7681919fee7a2504 WHIRLPOOL e4b00027a57fbce49a9ddcaf6e60fccfabb65393531620afa0416249148e9e17d43398a1016fcf04695d0fa7d0a7b970e5beee0a4ab4e6ff06e6f8c23c90154f
+DIST qbittorrent-3.2.0.tar.xz 2595372 SHA256 51781cb121ebeda041fb348e649c4bd97888ee8c1d18328bc547d447b960d1b3 SHA512 0e652a4045d2e034611484009c1ce60c0b365fb6030356ac740555bca3e77f901228a24f21fddc87501f39b737ac15cfff4d3d9a18c913ab03df4d90ceb48634 WHIRLPOOL 5c3d215735a70fcbe01773d3a6676209719d91b25ee5ac68f12767fdfd1108626556802cb58f5e698a80607ad3550b5dea0c97670fdc3d6a4975546da3436b1b
diff --git a/net-p2p/qbittorrent/metadata.xml b/net-p2p/qbittorrent/metadata.xml
new file mode 100644
index 000000000000..c8a92f8ac1cc
--- /dev/null
+++ b/net-p2p/qbittorrent/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <herd>qt</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <use>
+ <flag name="webui">Enable the Web UI</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">qbittorrent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/qbittorrent/qbittorrent-3.1.12.ebuild b/net-p2p/qbittorrent/qbittorrent-3.1.12.ebuild
new file mode 100644
index 000000000000..5ce4e4820eae
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-3.1.12.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 qt4-r2
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="http://www.qbittorrent.org/"
+MY_P=${P/_}
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc64 ~x86"
+
+IUSE="dbus debug geoip +X"
+
+# geoip and python are runtime deps only (see INSTALL file)
+CDEPEND="
+ dev-libs/boost:=
+ dev-qt/qtcore:4
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4(+),X?]
+ >=net-libs/rb_libtorrent-0.16.17
+ <net-libs/rb_libtorrent-1.0.0
+ dbus? ( dev-qt/qtdbus:4 )
+ X? ( dev-qt/qtgui:4 )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ geoip? ( dev-libs/geoip )
+"
+
+S=${WORKDIR}/${MY_P}
+DOCS=(AUTHORS Changelog README.md TODO)
+
+src_prepare() {
+ epatch_user
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ # Custom configure script, econf fails
+ local myconf=(
+ ./configure
+ --prefix="${EPREFIX}/usr"
+ --with-libboost-inc="${EPREFIX}/usr/include/boost"
+ --with-qtsingleapplication=system
+ $(use dbus || echo --disable-qt-dbus)
+ $(use debug && echo --enable-debug)
+ $(use geoip || echo --disable-geoip-database)
+ $(use X || echo --disable-gui)
+ )
+
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die "configure failed"
+ eqmake4
+}
diff --git a/net-p2p/qbittorrent/qbittorrent-3.1.9.2-r1.ebuild b/net-p2p/qbittorrent/qbittorrent-3.1.9.2-r1.ebuild
new file mode 100644
index 000000000000..ac731cf31d54
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-3.1.9.2-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 qt4-r2
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="http://www.qbittorrent.org/"
+MY_P=${P/_}
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~ppc64 x86"
+
+IUSE="dbus debug geoip +X"
+
+# geoip and python are runtime deps only (see INSTALL file)
+CDEPEND="
+ dev-libs/boost:=
+ dev-qt/qtcore:4
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4(+),X?]
+ >=net-libs/rb_libtorrent-0.16.17
+ <net-libs/rb_libtorrent-1.0.0
+ dbus? ( dev-qt/qtdbus:4 )
+ X? ( dev-qt/qtgui:4 )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}
+ geoip? ( dev-libs/geoip )
+"
+
+S=${WORKDIR}/${MY_P}
+DOCS=(AUTHORS Changelog README TODO)
+
+src_configure() {
+ # Custom configure script, econf fails
+ local myconf=(
+ ./configure
+ --prefix="${EPREFIX}/usr"
+ --with-libboost-inc="${EPREFIX}/usr/include/boost"
+ --with-qtsingleapplication=system
+ $(use dbus || echo --disable-qt-dbus)
+ $(use debug && echo --enable-debug)
+ $(use geoip || echo --disable-geoip-database)
+ $(use X || echo --disable-gui)
+ )
+
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die "configure failed"
+ eqmake4
+}
diff --git a/net-p2p/qbittorrent/qbittorrent-3.2.0.ebuild b/net-p2p/qbittorrent/qbittorrent-3.2.0.ebuild
new file mode 100644
index 000000000000..5ae750bcc86b
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-3.2.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 qt4-r2
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="http://www.qbittorrent.org/"
+
+MY_P=${P/_}
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
+else
+ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+dbus debug +qt4 qt5 webui +X"
+REQUIRED_USE="
+ ^^ ( qt4 qt5 )
+ dbus? ( X )
+"
+
+CDEPEND="
+ dev-libs/boost:=
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4?,qt5?,X?]
+ >=net-libs/rb_libtorrent-1.0.0
+ sys-libs/zlib
+ qt4? (
+ dev-qt/qtcore:4
+ dbus? ( dev-qt/qtdbus:4 )
+ X? ( dev-qt/qtgui:4 )
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtxml:5
+ dbus? ( dev-qt/qtdbus:5 )
+ X? ( dev-qt/qtgui:5
+ dev-qt/qtwidgets:5 )
+ )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${MY_P}
+DOCS=(AUTHORS Changelog README.md TODO)
+
+src_prepare() {
+ epatch_user
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ # Custom configure script, econf fails
+ local myconf=(
+ ./configure
+ --prefix="${EPREFIX}/usr"
+ --with-qtsingleapplication=system
+ $(use dbus || echo --disable-qt-dbus)
+ $(use debug && echo --enable-debug)
+ $(use qt5 && echo --with-qt5)
+ $(use webui || echo --disable-webui)
+ $(use X || echo --disable-gui)
+ )
+
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die "configure failed"
+ use qt4 && eqmake4
+ use qt5 && eqmake5
+}
diff --git a/net-p2p/qbittorrent/qbittorrent-9999.ebuild b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
new file mode 100644
index 000000000000..5ae750bcc86b
--- /dev/null
+++ b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-r1 qt4-r2
+
+DESCRIPTION="BitTorrent client in C++ and Qt"
+HOMEPAGE="http://www.qbittorrent.org/"
+
+MY_P=${P/_}
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
+else
+ SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="+dbus debug +qt4 qt5 webui +X"
+REQUIRED_USE="
+ ^^ ( qt4 qt5 )
+ dbus? ( X )
+"
+
+CDEPEND="
+ dev-libs/boost:=
+ >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4?,qt5?,X?]
+ >=net-libs/rb_libtorrent-1.0.0
+ sys-libs/zlib
+ qt4? (
+ dev-qt/qtcore:4
+ dbus? ( dev-qt/qtdbus:4 )
+ X? ( dev-qt/qtgui:4 )
+ )
+ qt5? (
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtxml:5
+ dbus? ( dev-qt/qtdbus:5 )
+ X? ( dev-qt/qtgui:5
+ dev-qt/qtwidgets:5 )
+ )
+"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+"
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${MY_P}
+DOCS=(AUTHORS Changelog README.md TODO)
+
+src_prepare() {
+ epatch_user
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ # Custom configure script, econf fails
+ local myconf=(
+ ./configure
+ --prefix="${EPREFIX}/usr"
+ --with-qtsingleapplication=system
+ $(use dbus || echo --disable-qt-dbus)
+ $(use debug && echo --enable-debug)
+ $(use qt5 && echo --with-qt5)
+ $(use webui || echo --disable-webui)
+ $(use X || echo --disable-gui)
+ )
+
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die "configure failed"
+ use qt4 && eqmake4
+ use qt5 && eqmake5
+}
diff --git a/net-p2p/retroshare/Manifest b/net-p2p/retroshare/Manifest
new file mode 100644
index 000000000000..aaf5f42de8c6
--- /dev/null
+++ b/net-p2p/retroshare/Manifest
@@ -0,0 +1,3 @@
+DIST RetroShare-0.6.0-rc1.tar.gz 14023555 SHA256 987d74877b654eec945e0f8d400c49dd62279ed25f9eb6e7fd8c123f2289d0cf SHA512 79046349b9bf58b77e4ce42069a7ec201f3e5eab862ea2b56291318da887297ff960b1153f6ed87d3416052d9ce58e432ada11f91c0648066c300847a5b85aea WHIRLPOOL 9d73cced5530f0d4c7ae051f829b0d5954f8132ad15dc8545685cde5a4ece34c9b24b29fcd99056b92ba2e5299e08b6d765116b08e8473707881c3a7dba3065e
+DIST retroshare_0.5.5-0.7068.tar.gz 11899395 SHA256 772b0d7916137e81fc0f5ea14f0a8fa70d3d7acb701ca0b0c1c66018f2255650 SHA512 51caeca54c6b6ce6ec049d3004301a74db5bb5dc2390c769486429ca0db4e45e2d8eba98c3f9ea99628c1a2452d71c8460ea4d3b3c103e321d3459211767bc1d WHIRLPOOL f6c8a7323be84d79975e970629f5bd457487cac6a061bc6817da328ff1de03a8d3fab98ab3cf4fba0628f239e09d8f8da4c14587764689a23193bbda22419e88
+DIST retroshare_0.6.0.RC2~8551_src.tgz 14773671 SHA256 2320676da905de6c48b01eda611811965277ffa1d5ddbb387aa8f0414c2de050 SHA512 6cfd714f6e72d43559909a72d448b90068414be26da73928ff7bfaaf5be5f7c47f5e7932f1ff2ab4d8a7c277ea4407ab3bd539a1ad4a2a7810dc79b32b1348b1 WHIRLPOOL b1a030d9fc797fa6a13c2166323cc7bcbb79c70e46ead2e06414650ab763aaacf61fbe24fc634707be42c9b6611a265ac7d675e02b950fe1d8d42364bf0dc089
diff --git a/net-p2p/retroshare/metadata.xml b/net-p2p/retroshare/metadata.xml
new file mode 100644
index 000000000000..c89173f98cc1
--- /dev/null
+++ b/net-p2p/retroshare/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>
+ <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="qt4">Enables the GUI using qt4</flag>
+ <flag name="links-cloud">Enables LinkClouds plugin</flag>
+ <flag name="voip">Enables VOIP plugin</flag>
+ </use>
+ <upstream>
+ <bugs-to>http://sourceforge.net/p/retroshare/bugs</bugs-to>
+ <remote-id type="sourceforge">retroshare</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/retroshare/retroshare-0.5.5c.ebuild b/net-p2p/retroshare/retroshare-0.5.5c.ebuild
new file mode 100644
index 000000000000..2e802052f8c2
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.5.5c.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib gnome2-utils qmake-utils
+
+MY_PN="RetroShare"
+MY_P="${MY_PN}-v${PV}"
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.sourceforge.net"
+SRC_URI="mirror://sourceforge/retroshare/retroshare_0.5.5-0.7068.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 links-cloud qt4 voip"
+REQUIRED_USE="|| ( cli qt4 )
+ feedreader? ( qt4 )
+ links-cloud? ( qt4 )
+ voip? ( qt4 )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-libs/openssl:0
+ gnome-base/libgnome-keyring
+ net-libs/libupnp
+ sys-libs/zlib
+ cli? (
+ dev-libs/protobuf
+ net-libs/libssh[server]
+ )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ qt4? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ dev-qt/qtcore:4
+ || ( ( >=dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 ) <dev-qt/qtgui-4.8.5:4 )
+ )
+ voip? (
+ media-libs/speex
+ dev-qt/qt-mobility[multimedia]
+ dev-qt/qtmultimedia:4
+ )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-qt/qtcore:4
+ virtual/pkgconfig"
+
+S=${WORKDIR}/retroshare-0.5.5/src
+
+src_prepare() {
+ local dir
+
+ sed -i \
+ -e "s|/usr/lib/retroshare/extensions/|/usr/$(get_libdir)/${PN}/extensions/|" \
+ libretroshare/src/rsserver/rsinit.cc \
+ || die "sed failed"
+
+ rs_src_dirs="libbitdht/src openpgpsdk/src libretroshare/src supportlibs/pegmarkdown"
+ use cli && rs_src_dirs="${rs_src_dirs} retroshare-nogui/src"
+ use qt4 && rs_src_dirs="${rs_src_dirs} retroshare-gui/src"
+ use links-cloud && rs_src_dirs="${rs_src_dirs} plugins/LinksCloud"
+ use feedreader && rs_src_dirs="${rs_src_dirs} plugins/FeedReader"
+
+ if use voip ; then
+ rs_src_dirs="${rs_src_dirs} plugins/VOIP"
+ echo "QT += multimedia" >> "plugins/VOIP/VOIP.pro" || die
+ echo "CONFIG += mobility" >> "plugins/VOIP/VOIP.pro" || die
+ fi
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ cd "${S}"/${dir} || die
+ eqmake4
+ 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}/extensions/"
+
+ use cli && dobin retroshare-nogui/src/retroshare-nogui
+ use qt4 && dobin retroshare-gui/src/RetroShare
+
+ exeinto "${extension_dir}"
+ use feedreader && doexe plugins/FeedReader/*.so*
+ use links-cloud && doexe plugins/LinksCloud/*.so*
+ use voip && doexe plugins/VOIP/*.so*
+
+ insinto /usr/share/RetroShare
+ doins libbitdht/src/bitdht/bdboot.txt
+
+ dodoc README.txt
+ make_desktop_entry RetroShare
+ for i in 24 48 64 ; do
+ doicon -s ${i} build_scripts/Ubuntu_src/data/${i}x${i}/${PN}.png
+ done
+ doicon -s 128 build_scripts/Ubuntu_src/data/${PN}.png
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/retroshare/retroshare-0.6.0_rc1.ebuild b/net-p2p/retroshare/retroshare-0.6.0_rc1.ebuild
new file mode 100644
index 000000000000..381d5e0b3d03
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.6.0_rc1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PN="RetroShare"
+MY_PV="${PV/_/-}"
+MY_P="${MY_PN}-${MY_PV}"
+inherit eutils gnome2-utils multilib qmake-utils
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.sourceforge.net"
+SRC_URI="mirror://sourceforge/retroshare/${MY_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 +qt5 voip"
+REQUIRED_USE="|| ( cli qt5 )
+ feedreader? ( qt5 )
+ voip? ( qt5 )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlcipher
+ dev-libs/openssl:0
+ gnome-base/libgnome-keyring
+ net-libs/libmicrohttpd
+ net-libs/libupnp
+ sys-libs/zlib
+ cli? (
+ dev-libs/protobuf
+ net-libs/libssh[server]
+ )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ )
+ qt5? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ dev-qt/designer:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtscript:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ dev-qt/qtxml:5
+ )
+ voip? (
+ media-libs/opencv
+ media-libs/speex
+ )"
+DEPEND="${RDEPEND}
+ dev-qt/qtcore:5
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+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 qt5 && 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'
+
+ epatch_user
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ pushd "${S}/${dir}" 2>/dev/null || die
+ eqmake5
+ popd 2>/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 qt5 && dobin retroshare-gui/src/RetroShare
+
+ 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
+
+ insinto /usr/share/RetroShare06/webui
+ doins libresapi/src/webfiles/*
+
+ dodoc README.txt
+ make_desktop_entry RetroShare
+ for i in 24 48 64 ; do
+ doicon -s ${i} "build_scripts/Debian+Ubuntu/data/${i}x${i}/${PN}.png"
+ done
+ doicon -s 128 "build_scripts/Debian+Ubuntu/data/${PN}.png"
+}
+
+pkg_preinst() {
+ if [[ "${REPLACING_VERSIONS}" = "0.5*" ]]; 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"
+ fi
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/net-p2p/retroshare/retroshare-0.6.0_rc2_pre8551.ebuild b/net-p2p/retroshare/retroshare-0.6.0_rc2_pre8551.ebuild
new file mode 100644
index 000000000000..a98daf96b6b8
--- /dev/null
+++ b/net-p2p/retroshare/retroshare-0.6.0_rc2_pre8551.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils gnome2-utils multilib qmake-utils
+
+MY_PV="${PV/_rc/.RC}"
+MY_PV="${MY_PV/_pre/~}"
+
+DESCRIPTION="P2P private sharing application"
+HOMEPAGE="http://retroshare.sourceforge.net"
+SRC_URI="mirror://sourceforge/retroshare/${PN}_${MY_PV}_src.tgz"
+
+# 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 +qt5 voip"
+REQUIRED_USE="|| ( cli qt5 )
+ feedreader? ( qt5 )
+ voip? ( qt5 )"
+
+RDEPEND="
+ app-arch/bzip2
+ dev-db/sqlcipher
+ dev-libs/openssl:0
+ gnome-base/libgnome-keyring
+ net-libs/libmicrohttpd
+ net-libs/libupnp
+ sys-libs/zlib
+ cli? (
+ dev-libs/protobuf
+ net-libs/libssh[server]
+ )
+ feedreader? (
+ dev-libs/libxml2
+ dev-libs/libxslt
+ net-misc/curl
+ )
+ qt5? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ dev-qt/designer:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtscript:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ dev-qt/qtxml:5
+ )
+ voip? (
+ media-libs/opencv
+ media-libs/speex
+ )"
+DEPEND="${RDEPEND}
+ dev-qt/qtcore:5
+ virtual/pkgconfig"
+
+S="${WORKDIR}/retroshare06-0.6.0/src"
+
+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 qt5 && 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'
+
+ epatch_user
+}
+
+src_configure() {
+ for dir in ${rs_src_dirs} ; do
+ pushd "${S}/${dir}" 2>/dev/null || die
+ eqmake5
+ popd 2>/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 qt5 && dobin retroshare-gui/src/RetroShare
+
+ 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
+
+ insinto /usr/share/RetroShare06/webui
+ doins libresapi/src/webfiles/*
+
+ dodoc README.txt
+ make_desktop_entry RetroShare
+ for i in 24 48 64 ; do
+ doicon -s ${i} "build_scripts/Debian+Ubuntu/data/${i}x${i}/${PN}.png"
+ done
+ doicon -s 128 "build_scripts/Debian+Ubuntu/data/${PN}.png"
+}
+
+pkg_preinst() {
+ if [[ "${REPLACING_VERSIONS}" = "0.5*" ]]; 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"
+ fi
+ 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..eb354f0c1a72
--- /dev/null
+++ b/net-p2p/rtorrent/Manifest
@@ -0,0 +1,2 @@
+DIST rtorrent-0.9.3.tar.gz 583311 SHA256 9e93ca41beb1afe74ad7ad8013e0d53ae3586c9b0e97263d722f721535cc7310 SHA512 a6cc390795c0cf36bf70f4f141db3e176c81df0d6754fe2e6a95ef59385a70e7ce006fe81b83deff5b32e06cc771d03c5c7ba1140be64b2d252719e8aa2058f3 WHIRLPOOL 7cb2e51718596145ef8a07b1de0bb9ccd4dc923a4ec8091a3f775dffaafe5111873d43047e6e32720a202774454e53443e402010d956954f19cdfdb08983ec52
+DIST rtorrent-0.9.4.tar.gz 601913 SHA256 bc0a2c1ee613b68f37021beaf4e64a9252f91ed06f998c1e897897c354ce7e84 SHA512 ae243d0336acff50e91e4ed9d306beb4705559775518e6dc122ec18a1530e59e2c531cf54f4b79899a1569ca18d343fce255071b45c41df1357bddfe926692aa WHIRLPOOL 03eb3cff0f7d490ada2199310fd2ba7576de8e20557e532df49be17f84aa2afb9cb8137b2eb317bc0fb4ce8ce035e900c65c32e81dc5d5d215923d91e8c0612a
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.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..8f4db9632937
--- /dev/null
+++ b/net-p2p/rtorrent/files/rtorrentd.init
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..0547227d9821
--- /dev/null
+++ b/net-p2p/rtorrent/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <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>
+</pkgmetadata>
diff --git a/net-p2p/rtorrent/rtorrent-0.9.3.ebuild b/net-p2p/rtorrent/rtorrent-0.9.3.ebuild
new file mode 100644
index 000000000000..e397be46cbca
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.3.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="http://libtorrent.rakshasa.no/"
+SRC_URI="http://libtorrent.rakshasa.no/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
+ xmlrpc? ( dev-libs/xmlrpc-c )"
+RDEPEND="${COMMON_DEPEND}
+ daemon? ( app-misc/screen )
+ selinux? ( sec-policy/selinux-rtorrent )
+"
+DEPEND="${COMMON_DEPEND}
+ test? ( dev-util/cppunit )
+ virtual/pkgconfig"
+
+DOCS=( doc/rtorrent.rc )
+
+src_prepare() {
+ # bug #358271
+ epatch "${FILESDIR}"/${PN}-0.9.1-ncurses.patch
+
+ # upstream forgot to include
+ cp "${FILESDIR}"/rtorrent.1 "${S}"/doc/ || die
+}
+
+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
+ fi
+}
diff --git a/net-p2p/rtorrent/rtorrent-0.9.4-r1.ebuild b/net-p2p/rtorrent/rtorrent-0.9.4-r1.ebuild
new file mode 100644
index 000000000000..c47b58d297ea
--- /dev/null
+++ b/net-p2p/rtorrent/rtorrent-0.9.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils systemd
+
+DESCRIPTION="BitTorrent Client using libtorrent"
+HOMEPAGE="http://libtorrent.rakshasa.no/"
+SRC_URI="http://libtorrent.rakshasa.no/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
+ 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}"/${P}-tinfo.patch
+
+ # upstream forgot to include
+ 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..cc98bce0d9b4
--- /dev/null
+++ b/net-p2p/saku/Manifest
@@ -0,0 +1 @@
+DIST saku-3.11.0.tar.gz 239772 SHA256 295fbd77aff51cb8967172f71000f26c37cbe133649b7ad2c050e161a8e61c39 SHA512 e6cb37fa555a43d69523a90d1039dcd9bdbc4e4d14e7a4063849cfcaf3a67f1947bd7e5341f97726030eddf53915304ad948f67ce7fb1cb2b6344e1556cc8467 WHIRLPOOL 9865ac033aa779ac772e63ea32fb629d5850958907a91b0c7a4fcfb6dac3a92fa8ede0084c878d806d9e08c1cdc7f4446de5b1afa7f6ff9750ac9395dbad530f
diff --git a/net-p2p/saku/files/saku b/net-p2p/saku/files/saku
new file mode 100644
index 000000000000..898c885985f4
--- /dev/null
+++ b/net-p2p/saku/files/saku
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..f6c45aa87ba9
--- /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$
+#
+
+[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..d609455f03fc
--- /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>
+ <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-r1.ebuild b/net-p2p/saku/saku-3.11.0-r1.ebuild
new file mode 100644
index 000000000000..f04cbd8797d0
--- /dev/null
+++ b/net-p2p/saku/saku-3.11.0-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.5"
+
+inherit distutils eutils 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"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup saku
+ enewuser saku -1 -1 /var/run/saku saku
+}
+
+src_prepare() {
+ 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
+}
+
+src_install() {
+ distutils_src_install
+
+ dodir /etc/saku
+ insinto /etc/saku
+ doins "${FILESDIR}"/saku.ini
+
+ doinitd "${FILESDIR}"/saku
+
+ diropts -o saku -g saku
+ dodir /var/log/saku
+ dodir /var/spool/saku
+}
diff --git a/net-p2p/smet2html/Manifest b/net-p2p/smet2html/Manifest
new file mode 100644
index 000000000000..ab9da8ef36e6
--- /dev/null
+++ b/net-p2p/smet2html/Manifest
@@ -0,0 +1 @@
+DIST smet2html-0.1.tar.gz 4669 SHA256 2fee7e1e0f43f25ac114a7bf29631d66450752000321e0387c8c288367c83721
diff --git a/net-p2p/smet2html/metadata.xml b/net-p2p/smet2html/metadata.xml
new file mode 100644
index 000000000000..d3e5908971f1
--- /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>
+ <herd>net-p2p</herd>
+ <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..ba8a2c221a52
--- /dev/null
+++ b/net-p2p/smet2html/smet2html-0.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..aefc63c22574
--- /dev/null
+++ b/net-p2p/soulseek-qt/Manifest
@@ -0,0 +1,2 @@
+DIST SoulseekQt-2013-11-6-64bit.tgz 8099593 SHA256 fd5fcf8b78e5598849b63d8993bf2607d88d7e0f50d301fbb5dc2d8d7f14c33d SHA512 781c16f559021dc3784c73b9ed7caf556d9ec6befb3b66f0b8c7c012c03d3260b4c38d087cba9dfcdd2a4a77ce5a72005dc7413066eb374496f2256df4609a0b WHIRLPOOL c1eb41c7677b3dddb5ca0aefa7e556d9a888871a4007e1d6e9bcb1e52daab0dc453d22b92c8c15ca1bc1f98897e5009ecbd14cee06bc523cce36587ba558c61f
+DIST SoulseekQt-2013-11-6.tgz 7957760 SHA256 ef7d9bfb4132bb22fae909c5e0182b041e9871bce01db657cd9c85289eae2fa3 SHA512 df6025ca1aa92677a1eacc866820eb98ad71721dbd8fc20257b9035598ed51fcfd1b5b680ac8aa5061bbb2f29208e17acb8b6027202a1774a9e00b2b8e5e1fbb WHIRLPOOL 96dfe0c916bc37c7c6b22afd9a701ee98a22dd9c4b230bea534a71e0c87d88a5be6a6be672481d037306e5c0db9d997e2e272ec1075d03ff7d7d6774af3dc40e
diff --git a/net-p2p/soulseek-qt/metadata.xml b/net-p2p/soulseek-qt/metadata.xml
new file mode 100644
index 000000000000..2392669de144
--- /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>
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/soulseek-qt/soulseek-qt-20131106-r1.ebuild b/net-p2p/soulseek-qt/soulseek-qt-20131106-r1.ebuild
new file mode 100644
index 000000000000..f87220781e1a
--- /dev/null
+++ b/net-p2p/soulseek-qt/soulseek-qt-20131106-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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}))"
+BASE_URI="http://www.soulseekqt.net/SoulseekQT/Linux/${BINARY_NAME}"
+SRC_URI="
+ x86? ( ${BASE_URI}.tgz )
+ amd64? ( ${BASE_URI}-64bit.tgz )
+ "
+
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ dev-qt/qtgui:4
+ dev-qt/qtcore:4"
+
+S="${WORKDIR}"
+
+RESTRICT="mirror"
+
+QA_PREBUILT="opt/bin/.*"
+
+src_install() {
+ use amd64 && BINARY_NAME="${BINARY_NAME}-64bit"
+ into /opt
+ newbin "${BINARY_NAME}" "${PN}"
+}
diff --git a/net-p2p/syrep/Manifest b/net-p2p/syrep/Manifest
new file mode 100644
index 000000000000..a850a0227094
--- /dev/null
+++ b/net-p2p/syrep/Manifest
@@ -0,0 +1 @@
+DIST syrep-0.9.tar.gz 192317 SHA256 b4072bdd0eef99fdd57a0758e99be8d15917d0ba90cd67e1ffa0832de2568ed2
diff --git a/net-p2p/syrep/metadata.xml b/net-p2p/syrep/metadata.xml
new file mode 100644
index 000000000000..7289824cb876
--- /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>
+ <herd>net-p2p</herd>
+</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..2e31ed0e6697
--- /dev/null
+++ b/net-p2p/syrep/syrep-0.9.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..e9683c5a8ff2
--- /dev/null
+++ b/net-p2p/torrentinfo/Manifest
@@ -0,0 +1 @@
+DIST torrentinfo-1.8.6.tar.gz 22232 SHA256 8008d4933ba7e9f75a34318caeaceb58b56d7fd6c7d75fff70acea2716447582 SHA512 7f36f6c80876cbd70ea9e1331195c8a30a6546406f345402d4bec5c58afb9b03a3b60189b8d177a63a7047c3ede7fc18d8fc47ecb1bcbb726dd01b7cb2a6efb2 WHIRLPOOL 9a2acb0a979f518a94e6210cdcf9694b3b9e314d1b3dae0faeabb43fa604b1bfcd3fcc14719342b4e1e2b07f5f66cadfec603f52cf43c88fd8bcd11cee84350d
diff --git a/net-p2p/torrentinfo/metadata.xml b/net-p2p/torrentinfo/metadata.xml
new file mode 100644
index 000000000000..ed25b369cd98
--- /dev/null
+++ b/net-p2p/torrentinfo/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</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.ebuild b/net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild
new file mode 100644
index 000000000000..6329cf3b8ed2
--- /dev/null
+++ b/net-p2p/torrentinfo/torrentinfo-1.8.6.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+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"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+python_test() {
+ nosetests -v test/tests.py || die "Tests fail with ${EPYTHON}"
+}
diff --git a/net-p2p/transmission-remote-cli/Manifest b/net-p2p/transmission-remote-cli/Manifest
new file mode 100644
index 000000000000..5319830405f7
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/Manifest
@@ -0,0 +1,2 @@
+DIST transmission-remote-cli-1.6.3.tar.gz 255899 SHA256 d24dbba397ffdfb3d2d1469644dc0cb2a5324f0bbfca8de577f76445ace9a283 SHA512 8d0b9ba7321dbcfdae358495ab819fd499845949e1ad1c03e2b3a5468d3c4b0a344a4c57de37b28b10bbf5750846c2729cbf27e9184b644139fa907d4fc4ac78 WHIRLPOOL e878cc61891fd240d84f513f9ce3d2147352a70e1e8fb3d0788f8efb4e4db268679e7329bf896c841e4b49b8c5e045346538a60ac3c5b045a62836a7d05abe23
+DIST transmission-remote-cli-1.7.0.tar.gz 256311 SHA256 d20ba26cd05bd5a5d55a5990b861bf9cd4286a54f720d22041838a51cf60db62 SHA512 86776384ac8618ccd58d3345b1a98e55ef5f0c6911fde61f6f54d9da15b1d8a244391bda4c7713e9b312132db30d732b444bebe9a753d0298e8838f779f149be WHIRLPOOL abc5daffe784df1b68d423400c2d0e94efa3e995fb1f8f53e8c571aea794d37cf714487b5b63a7a77e767b0d4668d376f675d9bbb0009b7b317b5ab058efb0a4
diff --git a/net-p2p/transmission-remote-cli/metadata.xml b/net-p2p/transmission-remote-cli/metadata.xml
new file mode 100644
index 000000000000..20f879319233
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>hendrik@consetetur.de</email>
+ <name>Hendrik v. Raven (lorem_ipsum)</name>
+ </maintainer>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</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.6.3.ebuild b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.6.3.ebuild
new file mode 100644
index 000000000000..a42b4be061f7
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.6.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ doman transmission-remote-cli.1
+ dodoc NEWS README.md
+}
diff --git a/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.0.ebuild b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.0.ebuild
new file mode 100644
index 000000000000..a42b4be061f7
--- /dev/null
+++ b/net-p2p/transmission-remote-cli/transmission-remote-cli-1.7.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ 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..a0f798311876
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/Manifest
@@ -0,0 +1,2 @@
+DIST transmission-remote-gtk-1.0.tar.gz 570279 SHA256 dc171ed67bd7bc2d98b42d04851cefb4174181f779433049a14b107c9a4906ce
+DIST transmission-remote-gtk-1.1.1.tar.gz 684718 SHA256 9f5ac2de623d633bcaacb6362bb6d8fb468c6dff278b867f65809c48ea1570c9 SHA512 184601a51d71d7b967d516cee87bea47f190ad080d110b2a73c82adac03cff49169dd2682b82e0f5c017c050bd9fd54fdfba9cd0de7ca7d9fcd2e8f9abfc0c12 WHIRLPOOL f245e497471b7c39eabae73deea10ccf30470938a52523fad05b1c744eab84a2d4c3e91e72d0c481789262ca38279cfca8f15fff1c7080f25107ee4038dd4a7a
diff --git a/net-p2p/transmission-remote-gtk/files/transmission-remote-gtk-1.1-PKG_PROG_PKG_CONFIG.patch b/net-p2p/transmission-remote-gtk/files/transmission-remote-gtk-1.1-PKG_PROG_PKG_CONFIG.patch
new file mode 100644
index 000000000000..5f78c52a846e
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/files/transmission-remote-gtk-1.1-PKG_PROG_PKG_CONFIG.patch
@@ -0,0 +1,16 @@
+This is required when passing --without-libnotify because otherwise the first call to
+PKG_CHECK_MODULES is not called and the ./configure will bail out.
+
+http://bugs.gentoo.org/435586
+http://code.google.com/p/transmission-remote-gtk/issues/detail?id=216
+
+--- configure.ac
++++ configure.ac
+@@ -34,6 +34,7 @@
+ AC_PROG_INSTALL
+ LT_INIT
+ IT_PROG_INTLTOOL([0.35.0])
++PKG_PROG_PKG_CONFIG
+
+ AC_CHECK_HEADERS([stdlib.h string.h])
+ AC_TYPE_SIZE_T
diff --git a/net-p2p/transmission-remote-gtk/metadata.xml b/net-p2p/transmission-remote-gtk/metadata.xml
new file mode 100644
index 000000000000..009244766029
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jdhore@gentoo.org</email>
+ <name>Jeff Horelick</name>
+ </maintainer>
+ <use>
+ <flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for
+ getting the HTTP/HTTPS/SOCKS proxy configuration.</flag>
+ <flag name="unique">Enable single instance support using
+ <pkg>dev-libs/libunique</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.0.ebuild b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.0.ebuild
new file mode 100644
index 000000000000..e251c4e07565
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit gnome2-utils
+
+DESCRIPTION="GTK client for management of the Transmission BitTorrent client, over HTTP RPC"
+HOMEPAGE="http://code.google.com/p/transmission-remote-gtk"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug geoip libproxy unique"
+RESTRICT="test"
+
+RDEPEND=">=dev-libs/glib-2.22:2
+ >=dev-libs/json-glib-0.12.2
+ unique? ( dev-libs/libunique:1 )
+ libproxy? ( net-libs/libproxy )
+ net-misc/curl
+ >=x11-libs/gtk+-2.16:2
+ x11-libs/libnotify
+ geoip? ( dev-libs/geoip )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS README )
+
+src_configure() {
+ # disable gtk3 for now because upstream doesn't consider it "ready".
+ # Also disable libappindicator till gtk3 is ready since ayatana on
+ # gtk2 is deprecated in Gentoo.
+ econf \
+ $(use_enable debug) \
+ $(use_with geoip libgeoip) \
+ $(use_with libproxy) \
+ $(use_with unique libunique) \
+ --without-libappindicator \
+ --disable-gtk3
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.1.1.ebuild b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.1.1.ebuild
new file mode 100644
index 000000000000..4d638e70c4d5
--- /dev/null
+++ b/net-p2p/transmission-remote-gtk/transmission-remote-gtk-1.1.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils fdo-mime gnome2-utils
+
+DESCRIPTION="GTK+ client for management of the Transmission BitTorrent client, over HTTP RPC"
+HOMEPAGE="http://code.google.com/p/transmission-remote-gtk"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ayatana debug geoip libnotify libproxy"
+
+RESTRICT="test"
+
+RDEPEND=">=dev-libs/glib-2.32
+ >=dev-libs/json-glib-0.12.6
+ net-misc/curl
+ >=x11-libs/gtk+-3.4:3
+ ayatana? ( dev-libs/libappindicator:3 )
+ geoip? ( dev-libs/geoip )
+ libnotify? ( >=x11-libs/libnotify-0.7 )
+ libproxy? ( net-libs/libproxy )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+DOCS="AUTHORS ChangeLog README"
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ --enable-gtk3 \
+ $(use_with geoip libgeoip) \
+ $(use_with libnotify) \
+ $(use_with libproxy) \
+ $(use_with ayatana libappindicator)
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { fdo-mime_desktop_database_update; gnome2_icon_cache_update; }
+pkg_postrm() { fdo-mime_desktop_database_update; gnome2_icon_cache_update; }
diff --git a/net-p2p/transmission/Manifest b/net-p2p/transmission/Manifest
new file mode 100644
index 000000000000..7de950de60ce
--- /dev/null
+++ b/net-p2p/transmission/Manifest
@@ -0,0 +1 @@
+DIST transmission-2.84.tar.xz 3077836 SHA256 a9fc1936b4ee414acc732ada04e84339d6755cd0d097bcbd11ba2cfc540db9eb SHA512 d6c2b17e7f8180a41ac70f5b503dfdb0353c6419db25df1b393b18c987c56fda9e2fd4c3f4cda7f08c301877bd0b4711842c28121ceaaaae87f5792cc6c29a3d WHIRLPOOL 375f9c981d9d2ac308896e8b7d66d3643796c8e97d64a1e0d6fd2bffaafa55988b90ddb4eb98330edf062e835c0c5ce76749e7e66bf6806333673beb7569f342
diff --git a/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch b/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch
new file mode 100644
index 000000000000..48638010f96f
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-2.80-translations-path-fix.patch
@@ -0,0 +1,17 @@
+This patch was adapted from -2.77-transmations-path-fix.patch for 2.80
+
+Fix path for finding locale-specific files:
+QCoreApplication::applicationDirPath() transforms to '/usr/bin'
+and locale files are in '/usr/share/qt4/translations'
+
+--- qt/app.cc
++++ qt/app.cc
+@@ -98,7 +98,7 @@
+ installTranslator (&qtTranslator);
+
+ // install the transmission translator
+- appTranslator.load (QString (MY_CONFIG_NAME) + "_" + QLocale::system ().name (), QCoreApplication::applicationDirPath () + "/translations");
++ appTranslator.load (QString (MY_CONFIG_NAME) + "_" + QLocale::system ().name (), QLibraryInfo::location(QLibraryInfo::TranslationsPath) );
+ installTranslator (&appTranslator);
+
+ Formatter::initUnits ();
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..8f3b1317a74b
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.confd.4
@@ -0,0 +1,14 @@
+# 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`
+
+TRANSMISSION_OPTIONS="--encryption-preferred"
+
+# 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.9 b/net-p2p/transmission/files/transmission-daemon.initd.9
new file mode 100644
index 000000000000..a1d17d6053b3
--- /dev/null
+++ b/net-p2p/transmission/files/transmission-daemon.initd.9
@@ -0,0 +1,73 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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}
+
+SSD_OPTIONS=""
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [ ! -d "${rundir}" ]; then
+ mkdir "${rundir}"
+ if [ -n "${runas_user}" ]; then
+ chown -R ${runas_user} "${rundir}"
+ fi
+ fi
+
+ # In case no config directory option passed use default
+ if ! $(echo ${TRANSMISSION_OPTIONS} | grep -q -e '\B-g' -e '\B--config-dir'); then
+ TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --config-dir ${config_dir}"
+ # put download dir location on first run (and take it from config later)
+ if [ ! -f ${config_dir}/settings.json ]; then
+ TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --download-dir ${download_dir}"
+ fi
+ fi
+
+ if [ -n "${runas_user}" ]; then
+ if [ -f /etc/init.d/sysfs ]; then
+ SSD_OPTIONS="${SSD_OPTIONS} --user ${runas_user}"
+ else
+ SSD_OPTIONS="${SSD_OPTIONS} --chuid ${runas_user}"
+ fi
+ fi
+}
+
+start() {
+ check_config
+
+ ebegin "Starting transmission daemon"
+ start-stop-daemon --start --quiet --pidfile ${pidfile} ${SSD_OPTIONS} \
+ --exec /usr/bin/transmission-daemon -- --pid-file ${pidfile} \
+ $(test ${logfile} != "syslog" && echo --logfile ${logfile}) \
+ ${TRANSMISSION_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping transmission daemon"
+ start-stop-daemon --stop --quiet --retry TERM/45/QUIT/15 --pidfile ${pidfile}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading transmission configuration"
+ start-stop-daemon --signal HUP --pidfile ${pidfile}
+ eend $?
+}
+
diff --git a/net-p2p/transmission/metadata.xml b/net-p2p/transmission/metadata.xml
new file mode 100644
index 000000000000..6bccb486e525
--- /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>
+ <herd>net-p2p</herd>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <use>
+ <flag name='lightweight'>Optimize transmission for low-resource systems (smaller cache size, prefer unencrypted peer connections, etc.)</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.84-r1.ebuild b/net-p2p/transmission/transmission-2.84-r1.ebuild
new file mode 100644
index 000000000000..9cbecb41267b
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.84-r1.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime 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 lightweight systemd qt4 qt5 xfs"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ dev-libs/openssl: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= )
+ )
+ systemd? ( sys-apps/systemd:= )
+ qt4? (
+ dev-qt/qtcore:4=
+ dev-qt/qtgui:4=
+ dev-qt/qtdbus:4=
+ )
+ qt5? (
+ dev-qt/qtcore:5=
+ dev-qt/qtdbus:5=
+ dev-qt/qtgui:5=
+ dev-qt/qtnetwork:5=
+ dev-qt/qtwidgets:5=
+ )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk ) ?? ( qt4 qt5 )"
+
+DOCS="AUTHORS NEWS qt/README.txt"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+ # Trick to avoid automagic dependency
+ use ayatana || { sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die; }
+ # Pass our configuration dir to systemd unit file
+ sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/${PN}-daemon.service || die
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${PN}/Makefile.am || die
+ # Fix for broken translations path
+ epatch "${FILESDIR}"/${PN}-2.80-translations-path-fix.patch
+ # http://trac.transmissionbt.com/ticket/5700
+ sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt4 || use qt5; then
+ pushd qt >/dev/null || die
+ use qt4 && eqmake4 qtr.pro
+ use qt5 && eqmake5 qtr.pro
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4 || use qt5; then
+ use qt4 && local -x QT_SELECT=4
+ use qt5 && local -x QT_SELECT=5
+ emake -C qt
+ lrelease qt/translations/*.ts || die
+ fi
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"/usr/share/${PN}/web/LICENSE
+
+ newinitd "${FILESDIR}"/${PN}-daemon.initd.9 ${PN}-daemon
+ newconfd "${FILESDIR}"/${PN}-daemon.confd.4 ${PN}-daemon
+ systemd_dounit daemon/${PN}-daemon.service
+
+ keepdir /var/{lib/${PN}/{config,downloads},log/${PN}}
+ fowners -R ${PN}:${PN} /var/{lib/${PN}/{,config,downloads},log/${PN}}
+
+ if use qt4 || use qt5; then
+ pushd qt >/dev/null || die
+ emake INSTALL_ROOT="${ED}"/usr install
+
+ domenu ${PN}-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}/${PN}-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/${PN}-qt.svg
+
+ use qt4 && insinto /usr/share/qt4/translations
+ use qt5 && 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
+
+ elog "If you use ${PN}-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, ${PN}-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/${PN}/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, ${PN} 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-2.84.ebuild b/net-p2p/transmission/transmission-2.84.ebuild
new file mode 100644
index 000000000000..8af517cf0491
--- /dev/null
+++ b/net-p2p/transmission/transmission-2.84.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils qt4-r2 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 lightweight systemd qt4 xfs"
+KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86 ~x86-fbsd ~amd64-linux"
+
+RDEPEND=">=dev-libs/libevent-2.0.10:=
+ dev-libs/openssl: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= )
+ )
+ systemd? ( sys-apps/systemd:= )
+ qt4? (
+ dev-qt/qtcore:4=
+ dev-qt/qtgui:4=
+ dev-qt/qtdbus:4=
+ )"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2.32
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/os-headers
+ virtual/pkgconfig
+ xfs? ( sys-fs/xfsprogs )"
+
+REQUIRED_USE="ayatana? ( gtk )"
+
+DOCS="AUTHORS NEWS qt/README.txt"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ sed -i -e '/CFLAGS/s:-ggdb3::' configure.ac || die
+ # Trick to avoid automagic dependency
+ use ayatana || { sed -i -e '/^LIBAPPINDICATOR_MINIMUM/s:=.*:=9999:' configure.ac || die; }
+ # Pass our configuration dir to systemd unit file
+ sed -i '/ExecStart/ s|$| -g /var/lib/transmission/config|' daemon/${PN}-daemon.service || die
+ # http://trac.transmissionbt.com/ticket/4324
+ sed -i -e 's|noinst\(_PROGRAMS = $(TESTS)\)|check\1|' lib${PN}/Makefile.am || die
+ # Fix for broken translations path
+ epatch "${FILESDIR}"/${PN}-2.80-translations-path-fix.patch
+ # http://trac.transmissionbt.com/ticket/5700
+ sed -i -e '1iQMAKE_CXXFLAGS += -std=c++11' qt/qtr.pro || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ export ac_cv_header_xfs_xfs_h=$(usex xfs)
+
+ econf \
+ --enable-external-natpmp \
+ $(use_enable lightweight) \
+ $(use_with systemd systemd-daemon) \
+ $(use_with gtk)
+
+ if use qt4; then
+ pushd qt >/dev/null
+ eqmake4 qtr.pro
+ popd >/dev/null
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ pushd qt >/dev/null
+ emake
+ lrelease translations/*.ts
+ popd >/dev/null
+ fi
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"/usr/share/${PN}/web/LICENSE
+
+ newinitd "${FILESDIR}"/${PN}-daemon.initd.9 ${PN}-daemon
+ newconfd "${FILESDIR}"/${PN}-daemon.confd.4 ${PN}-daemon
+ systemd_dounit daemon/${PN}-daemon.service
+
+ keepdir /var/{lib/${PN}/{config,downloads},log/${PN}}
+ fowners -R ${PN}:${PN} /var/{lib/${PN}/{,config,downloads},log/${PN}}
+
+ if use qt4; then
+ pushd qt >/dev/null
+ emake INSTALL_ROOT="${ED}"/usr install
+
+ domenu ${PN}-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}/${PN}-qt.png
+ done
+ doicon -s scalable icons/hicolor/scalable/${PN}-qt.svg
+
+ insinto /usr/share/qt4/translations
+ doins translations/*.qm
+ popd >/dev/null
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ elog "If you use ${PN}-daemon, please, set 'rpc-username' and"
+ elog "'rpc-password' (in plain text, ${PN}-daemon will hash it on"
+ elog "start) in settings.json file located at /var/lib/${PN}/config or"
+ elog "any other appropriate config directory."
+ elog
+ elog "Since µTP is enabled by default, ${PN} 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/tribler/Manifest b/net-p2p/tribler/Manifest
new file mode 100644
index 000000000000..3fe2e1315317
--- /dev/null
+++ b/net-p2p/tribler/Manifest
@@ -0,0 +1,6 @@
+DIST tribler-swift_6.0.0-28795_amd64.deb 718596 SHA256 b3bfe52eebc37539d6adb62f49a439d8794635c10e4d52d66bec663b6abc2467 SHA512 9f9734c2574b6d205e885c0621dcac5f5f3dcd45e1b6764017d6b6aaba5a346c242e44b1d69ea8dc47611cf6993c44e5e0e57bca150c81f5ca5b7635464d7c50 WHIRLPOOL 65933467ab002f91d1b4f81353170b5c05cec731a91bb89f28dc82fec2edee5f351b16e704a0eab5784111cab8d95670c6dc6d65747da59fbdafdaa20db46abc
+DIST tribler-swift_6.0.0-28795_i386.deb 736976 SHA256 1cd339fbb0b5e1f26c6ee75e2300c423ffe21ef8729e0f2a112a394ebf8469ac SHA512 a6458d49d1fb5c7b5d3db844cc614eaf77f72dca53809529c431e97b8fb5b4dcadce5d45a32a38853dbb4a29a9190a8486ce8ea1d1613637236d8244a312573e WHIRLPOOL fafce3fce9c0e6fcc322973bfb3701aba693a53cb301a236cbde1f5c6a8a0c22e5244f47b3be048803b1f264362a1bd5ac01ca27c1f54f706584cfadf986b040
+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.0.3_all.deb 5848674 SHA256 bf6173e2162602133e93a0ca06026f33d5a95edcefc57ff41c3a59f14a19e835 SHA512 fc4a165d0ae7460a3805fe4fde86150a21152a7cff92c226186f475d690cf4a7a3366767b1da4119b2222b3b83e8c07c9a1c23300abd0b7e01ea642d0e413551 WHIRLPOOL b13f5dbc2bdf9b980dc1195b77a19aff66f26a9d2d27adfbfa0ccb0373d62fd3c8769d7e64aeb842a7fd5eddb33774129732463f6ad88ec36e520d895465f21f
+DIST tribler_6.3.3_all.deb 1997346 SHA256 95f6cac8f5760229896bb66ee8e4d6b50939b7da4f1fb0c9a589a7617c456010 SHA512 afea5ef80c8dbc8da003997c8070116adf34334aceab91e258dfdddcfd7375238fc933866c655475ebdf347ac8ef4635716ec4ba1ad6bff6f638e804a4bbbf12 WHIRLPOOL 2b11404be050f81f6a8205edaa3c0c402a14148e5bf4e013ab7a95937f389a1a59b3ad44c1d237b1f431f5ceda5a26c48366bb4b78763ff52165ccf2de11d9d3
diff --git a/net-p2p/tribler/files/tribler-5.9.12-fix-global-declarations.patch b/net-p2p/tribler/files/tribler-5.9.12-fix-global-declarations.patch
new file mode 100644
index 000000000000..9e0887a1a2f1
--- /dev/null
+++ b/net-p2p/tribler/files/tribler-5.9.12-fix-global-declarations.patch
@@ -0,0 +1,22 @@
+diff -Naur usr.orig/share/tribler/Tribler/Player/swarmplayer.py usr/share/tribler/Tribler/Player/swarmplayer.py
+--- usr.orig/share/tribler/Tribler/Player/swarmplayer.py 2012-02-11 11:54:10.000000000 -0500
++++ usr/share/tribler/Tribler/Player/swarmplayer.py 2012-02-11 11:53:15.000000000 -0500
+@@ -438,9 +438,9 @@
+
+ s_play = status.get_or_create_status_element("playable", False)
+ if playable:
++ global START_TIME
+ if preprogress < 1.0:
+ if s_play.get_value() == True:
+- global START_TIME
+ status.create_and_add_event("failed_after", [time.time() - START_TIME])
+ START_TIME = time.time()
+
+@@ -448,7 +448,6 @@
+
+ elif s_play.get_value() == False:
+ s_play.set_value(True)
+- global START_TIME
+ status.create_and_add_event("playable_in", [time.time() - START_TIME])
+ START_TIME = time.time()
+
diff --git a/net-p2p/tribler/files/tribler-6.1.0-fix-desktop.patch b/net-p2p/tribler/files/tribler-6.1.0-fix-desktop.patch
new file mode 100644
index 000000000000..250deda21616
--- /dev/null
+++ b/net-p2p/tribler/files/tribler-6.1.0-fix-desktop.patch
@@ -0,0 +1,21 @@
+diff -Naur usr.orig/share/applications/swarmplayer.desktop usr/share/applications/swarmplayer.desktop
+--- usr.orig/share/applications/swarmplayer.desktop 2013-05-09 20:47:46.000000000 -0400
++++ usr/share/applications/swarmplayer.desktop 2013-05-09 20:48:34.000000000 -0400
+@@ -5,4 +5,4 @@
+ Icon=swarmplayer
+ Terminal=false
+ Type=Application
+-Categories=Application;Network;P2P
++Categories=Network;P2P;
+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-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-fix-desktop.patch b/net-p2p/tribler/files/tribler-fix-desktop.patch
new file mode 100644
index 000000000000..469ed7ee7e03
--- /dev/null
+++ b/net-p2p/tribler/files/tribler-fix-desktop.patch
@@ -0,0 +1,18 @@
+diff -Naur usr.orig/share/applications/tribler.desktop usr/share/applications/tribler.desktop
+--- usr.orig/share/applications/tribler.desktop 2012-09-24 20:50:23.000000000 -0400
++++ usr/share/applications/tribler.desktop 2013-02-18 13:58:57.000000000 -0500
+@@ -5,4 +5,4 @@
+ Icon=tribler
+ Terminal=false
+ Type=Application
+-Categories=Application;Network;P2P
++Categories=Network;P2P;
+diff -Naur usr.orig/share/tribler/Tribler/Main/Build/Ubuntu/tribler.desktop usr/share/tribler/Tribler/Main/Build/Ubuntu/tribler.desktop
+--- usr.orig/share/tribler/Tribler/Main/Build/Ubuntu/tribler.desktop 2012-11-19 23:26:42.000000000 -0500
++++ usr/share/tribler/Tribler/Main/Build/Ubuntu/tribler.desktop 2013-02-18 13:59:08.000000000 -0500
+@@ -5,4 +5,4 @@
+ Icon=tribler
+ Terminal=false
+ Type=Application
+-Categories=Application;Network;P2P
++Categories=Network;P2P;
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..091789da9c72
--- /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>
+ <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.0.3.ebuild b/net-p2p/tribler/tribler-6.0.3.ebuild
new file mode 100644
index 000000000000..a679195dfa7b
--- /dev/null
+++ b/net-p2p/tribler/tribler-6.0.3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python unpacker
+
+MY_PV="${PN}_${PV}_all"
+
+DESCRIPTION="Bittorrent client that does not require a website to discover content"
+HOMEPAGE="http://www.tribler.org/"
+SRC_URI="
+ http://dl.tribler.org/${MY_PV}.deb
+ x86? ( http://dl.tribler.org/tribler-swift_6.0.0-28795_i386.deb )
+ amd64? ( http://dl.tribler.org/tribler-swift_6.0.0-28795_amd64.deb )"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="vlc"
+
+RDEPEND="
+ dev-python/apsw
+ dev-python/m2crypto
+ dev-python/netifaces
+ dev-libs/openssl
+ dev-python/wxpython
+ vlc? (
+ media-video/vlc
+ media-video/ffmpeg:0
+ )"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/share/tribler/swift"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-5.9.12-fix-global-declarations.patch"
+ epatch "${FILESDIR}/${PN}-log2homedir.patch"
+ epatch "${FILESDIR}/${PN}-fix-desktop.patch"
+
+ python_convert_shebangs -r 2 .
+}
+
+src_compile() { :; }
+
+src_install() {
+ #Rename the doc dir properly
+ 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}
+
+ #Remove the licenses scattered throughout
+ rm usr/share/doc/${P}/copyright
+ rm usr/share/${PN}/Tribler/*.txt
+ rm usr/share/${PN}/Tribler/Core/DecentralizedTracking/pymdht/{LGPL-2.1.txt,LICENSE.txt}
+
+ #Copy the rest over
+ cp -pPR usr/ "${ED}"/
+}
+
+pkg_postinst() {
+ python_mod_optimize "${ROOT}"usr/share/${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup "${ROOT}"usr/share/${PN}
+}
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..cf59f787debe
--- /dev/null
+++ b/net-p2p/tribler/tribler-6.3.3-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/rb_libtorrent[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..153122187f69
--- /dev/null
+++ b/net-p2p/tvrss/Manifest
@@ -0,0 +1 @@
+DIST tvrss-1.8beta.tar.gz 19753 SHA256 aa2127f2ece5d22a96fb4806f6fa2b5f4a6454d9a95ecf099eb18c9d8706bf41
diff --git a/net-p2p/tvrss/metadata.xml b/net-p2p/tvrss/metadata.xml
new file mode 100644
index 000000000000..5c4f222bb239
--- /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>
+ <herd>net-p2p</herd>
+ <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..377f2852796f
--- /dev/null
+++ b/net-p2p/tvrss/tvrss-1.8_beta.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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-perl"
+
+src_install() {
+ dobin ${S}/tvrss
+}
diff --git a/net-p2p/valknut/Manifest b/net-p2p/valknut/Manifest
new file mode 100644
index 000000000000..fb31219c85d5
--- /dev/null
+++ b/net-p2p/valknut/Manifest
@@ -0,0 +1,3 @@
+DIST valknut-0.4.9-gnome-icons.tar.gz 59246 SHA256 074c33eb8fa8e7280a6b8bcf43a4c2f42ca28175e5d1be63723ba907b861fb58 SHA512 aaf7023d2c307d4a0eebf7548a0f2ca68e235f9b3f211b306798044c5ba3f48d037908ac3b4b782b671eafbf77cd590c1e13d245dd1375416d47680bdd51444f WHIRLPOOL 946541dda9d7cfbb983dee8b8144ec84410b3eb4b01d7d2dff4da49fa6e6ff28073cbea0d2b198335ce9a5399ad5c08ba73148c3a12dca2e3cb535b46ad203ba
+DIST valknut-0.4.9-oxygen-icons.tar.gz 71933 SHA256 29df2de7b6b20dce30934ef0abe1c1c005a2cf27253e2745e9a5b728499577ea
+DIST valknut-0.4.9.tar.bz2 1215939 SHA256 06972248906145cfa6b155fec66ef5f2ebdf44f50fb68135a1624bb39d90cf32 SHA512 f3e1f3da45b6f6e2bd2bd2f822ca95eaea0c235e18abbf42da54524b73c20072d64341169ad58c34f070e1038afb28d650485d3c1e2625efb05bd2aa370c1bb9 WHIRLPOOL 5659e0a7658a408e3da3356a5800463580512786bc17dc6c3a0d21c9a225d312deee8b8b5a2e351182a05d79ec3f5383efe783613d4c1794138650c3dc17d8f3
diff --git a/net-p2p/valknut/files/valknut-0.4.9-gcc47.patch b/net-p2p/valknut/files/valknut-0.4.9-gcc47.patch
new file mode 100644
index 000000000000..29ecfe63fb79
--- /dev/null
+++ b/net-p2p/valknut/files/valknut-0.4.9-gcc47.patch
@@ -0,0 +1,15 @@
+Fix building with gcc-47
+
+https://bugs.gentoo.org/show_bug.cgi?id=423045
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/valknut/main.cpp
++++ b/valknut/main.cpp
+@@ -22,6 +22,7 @@
+ #endif
+
+ #include <stdlib.h>
++#include <unistd.h> /* _exit */
+ #ifndef WIN32
+ #include <signal.h>
+ #endif
diff --git a/net-p2p/valknut/metadata.xml b/net-p2p/valknut/metadata.xml
new file mode 100644
index 000000000000..b6e0d287755a
--- /dev/null
+++ b/net-p2p/valknut/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <upstream>
+ <remote-id type="sourceforge">wxdcgui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/valknut/valknut-0.4.9.ebuild b/net-p2p/valknut/valknut-0.4.9.ebuild
new file mode 100644
index 000000000000..f81354bd8321
--- /dev/null
+++ b/net-p2p/valknut/valknut-0.4.9.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="A open source cross platform client for the Direct Connect network"
+HOMEPAGE="http://sourceforge.net/projects/wxdcgui/"
+SRC_URI="mirror://sourceforge/wxdcgui/${P}.tar.bz2
+ gnome? ( mirror://sourceforge/wxdcgui/${P}-gnome-icons.tar.gz )
+ kde? ( mirror://sourceforge/wxdcgui/${P}-oxygen-icons.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 x86"
+IUSE="gnome kde"
+
+RDEPEND="dev-qt/qtgui:4[qt3support]
+ >=net-p2p/dclib-0.3.23"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ insinto /usr/share/${PN}/icons/appl
+
+ if use gnome; then
+ doins -r "${WORKDIR}"/${P}-gnome-icons/gnome
+ fi
+
+ if use kde; then
+ doins -r "${WORKDIR}"/${P}-oxygen-icons/oxygen
+ fi
+}
diff --git a/net-p2p/vuze-coreplugins/Manifest b/net-p2p/vuze-coreplugins/Manifest
new file mode 100644
index 000000000000..85135aeecd53
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/Manifest
@@ -0,0 +1,10 @@
+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.4.3.jar 75988 SHA256 d58db1b4da7ca4798e3da6acb4593c1e682fe6b5559acf6c3339603f20931774 SHA512 0a20a732c88c20a8e76fef3ce5c96ea16d74f3092196d1849b20b66e4286b02b8facb95d4ac90f5c253b7a474345e488a4ba9ff9e95dbbd12416e4f9b1db48e9 WHIRLPOOL 7df611feed6e71fa34a062371a7eb33ebaced20906e3ca4b27e9bdfc92029820526844bf199fdb4c1223daa185e7f5d036966c1aad4db653b48907cec8c4f135
+DIST azrating_1.5.13.1.jar 111111 SHA256 ab6eb51d028c4e32292871c874e8e26e675e2c518274e94287a26756da6182fb SHA512 a990e41b4b4457f9cd221be7ce1fd0eb740e63135a827e9fe436da72b74cdb4963a360cbdb27b62a30e92d289ef974e97ff18be992e8e11e4a2fa8fb55cbe080 WHIRLPOOL e9c68e88fc0bb91839aa006fb94342f8066c003110d4ed54cfdea8aa5edde7c2cc1279841d6e8924f78545b493405fd7d2ba10c209a5e0ac247e9488912e418a
+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 azupnpav_0.4.6.zip 247837 SHA256 93775a9ed591c92f1c2b3bbfff10f97d5feda8ec06d0615515562b279b04a091 SHA512 eee392cf82aae37b2689ce086fb00727728064552ca31bbf228d3d76407c15f92d30527b979dfc555dbf3a1ead65d991c55d8c517c0f5c93d5a3890b88bfa6b1 WHIRLPOOL ce2af6831e2dfebe30b60faa112208647dfa638fcf06b2035ba27ca8e40da66163ae4ac36e2a7f379aa3e31e1c0a5814b1ae5038f65fdf07ed15013502a51ecf
+DIST azupnpav_0.4.9.zip 249692 SHA256 faebf318b4922574bf66f2508b54aa8484f75629c66ce1c622206c559242a19e SHA512 49967ca1ea4a6db0ac3192a06174967558df88deeff799aa639c8aa91a39e880df48d81bf0abf96ab8ee41feeb29e8bdf5ceddde238849aeae15c92898eb4a0f WHIRLPOOL 67920f0f2ec297e1516efd21a44d0b3049c8616eedb47a4955d26c0ca4d8e3ca438b404ad07734dee62141fe6afaa79fba0948584ef775ec30e1acfd59edacc7
+DIST azupnpav_0.5.2.zip 263594 SHA256 4eca6ccf23792ff463d2e2a027beebb7de89d4986d6d614051fb9861d7ce082d SHA512 a40dc61e9f8c5f564672ed04acdad852fc3866eb19ae8b09b8f2bc8aef71141352f2476a0cbe39fa6e021d33ddd48feec27f50c5e9762c5ada98522aa3204e7b WHIRLPOOL 5e5d674bb43ba42417447e96cbbd33144e1b3205cd160db6340cf376172a62a2cbbf3861f637da63b940ccd5d58855c185cba922b8dceb930d9ca319f4f7573f
diff --git a/net-p2p/vuze-coreplugins/metadata.xml b/net-p2p/vuze-coreplugins/metadata.xml
new file mode 100644
index 000000000000..e82f7ae90c3d
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <maintainer>
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+</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..c43fbf97709a
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-4.8.1.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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 ppc 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.3.0.0.ebuild b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.3.0.0.ebuild
new file mode 100644
index 000000000000..ab73c7a2f268
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.3.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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.4.3 # http://www.vuze.com/plugins/details/azrating
+UPDATER_V=1.9.1 # http://www.vuze.com/plugins/details/azupdater
+UPNPAV_V=0.4.9 # 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 ~ppc ~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.6.0.0.ebuild b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild
new file mode 100644
index 000000000000..c17a7de35508
--- /dev/null
+++ b/net-p2p/vuze-coreplugins/vuze-coreplugins-5.6.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ppc ~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..09f88fb4c27d
--- /dev/null
+++ b/net-p2p/vuze/Manifest
@@ -0,0 +1,4 @@
+DIST Vuze_4812_source.zip 9530217 SHA256 8ad02ae61ac1c515cb3226b95b34d4fe036faa64e725b64fdcb5ef7d1cb9633d SHA512 7007c91f829c57d0f08b9da4ea3fcc8820efe14aeec7286cf764e5ac2d7d165f3a14abc6b0e92a617e21b45803f7c121fb00ddd8c5e8d9664509eb3337fc65bf WHIRLPOOL bc8823e053fa2f86161234c77f4873f2035a111361d60ee8c75937710774defec577651a10acf909bb170e600dc2775a5dbe2cf626649729e86f4a04e02a46d9
+DIST Vuze_5300_source.zip 10015198 SHA256 556149f09f48c533a37d80526ac655f0bc067f3a6bf3f3c4483f5273ac74ebc7 SHA512 44bad9f04707ae37acb66f16ae94afd7ad24d245f0371f60241442f460277c5b8dd29476640eb1e04b468b3ebd0100a159d1027764445ab526e3e0c0c544296d WHIRLPOOL 801e398eaf8b8457dc02336039bc8a64e535544ff1ea99ff100b623f734a499147e9abd8ce3031ebb0f1e5bb0e04a9c160e06fe5c0b16f12b31caf920f711d4a
+DIST Vuze_5600_source.zip 10398501 SHA256 1aa6148311969ce6c51333b7ef51bcc8713e222fa5d14b2448e97aebbd25ea5e SHA512 dfe557cb1f50be935c78ee4431bc14db5f0107eebab8545cf925de8b0d48bb91ca77f7feab54a5fd91aaaf50bd3c68c1519cf49c2eb4d145ff7794bf9f22cfd7 WHIRLPOOL 62b637b5fc8145c31bdfb0ca2f63bdd9ee9c70d3afde3cb693ede66c0ab6db593f412ab124ac1230f1bbf33ff9ce635e29a0cea7556f013fcb7144aacb98c0d0
+DIST vuze-4.5.0.2-gentoo-patches.tar.bz2 3143 SHA256 972cf16d88d8605f93b77a84770b6512d54ae8281a0d4c06b66890a69deb6c49 SHA512 aacaeb404d9b7dbb40d89b04f9ad26caf447202b1fcb63d532f5e01dc611152adbc38804563f1a35227a080b2eadec0e2e42d0baa163d1d5489eec65cd28f83d WHIRLPOOL a7dd533676c428a00caddc2d4d4c008feec1a1201bb9aef7b7ed9c25d41405344d89bc9f70d442f043beb7aaf6db7d73582cc46edfa3665d599b2635e51b1ee7
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-invalid-characters.patch b/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch
new file mode 100644
index 000000000000..3ef4d808ad77
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch
@@ -0,0 +1,24 @@
+--- a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
++++ b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java
+@@ -50,17 +50,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.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.3.0.0-use-jdk-cipher-only.patch b/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch
new file mode 100644
index 000000000000..596bd825f98d
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch
@@ -0,0 +1,41 @@
+--- a/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
++++ b/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java
+@@ -36,7 +36,6 @@ import org.bouncycastle.crypto.CipherParameters;
+ import org.bouncycastle.crypto.encodings.PKCS1Encoding;
+ import org.bouncycastle.crypto.engines.RSAEngine;
+ import org.bouncycastle.crypto.params.ParametersWithRandom;
+-import org.bouncycastle.jce.provider.RSAUtil;
+ import org.gudy.azureus2.core3.util.Debug;
+ import org.gudy.azureus2.core3.util.RandomUtils;
+ import org.gudy.azureus2.plugins.utils.StaticUtilities;
+@@ -83,30 +82,12 @@ SecureMessageServiceClientHelper
+
+ byte[] secret_bytes = session_key.getEncoded();
+
+- try{
+ Cipher rsa_cipher = Cipher.getInstance( "RSA" );
+
+ rsa_cipher.init( Cipher.ENCRYPT_MODE, public_key );
+
+ encryped_session_key = rsa_cipher.doFinal( secret_bytes );
+
+- }catch( Throwable e ){
+-
+- // fallback to the BC implementation for jdk1.4.2 as JCE RSA not available
+-
+- RSAEngine eng = new RSAEngine();
+-
+- PKCS1Encoding padded_eng = new PKCS1Encoding( eng );
+-
+- CipherParameters param = RSAUtil.generatePublicKeyParameter(public_key);
+-
+- param = new ParametersWithRandom(param, RandomUtils.SECURE_RANDOM);
+-
+- padded_eng.init( true, param );
+-
+- encryped_session_key = padded_eng.processBlock(secret_bytes, 0, secret_bytes.length);
+- }
+-
+ }catch( Throwable e ){
+
+ e.printStackTrace();
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.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..432ebc5fe730
--- /dev/null
+++ b/net-p2p/vuze/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+ <maintainer>
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</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..f146132b2044
--- /dev/null
+++ b/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ppc 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.3.0.0.ebuild b/net-p2p/vuze/vuze-5.3.0.0.ebuild
new file mode 100644
index 000000000000..041e5e9a1574
--- /dev/null
+++ b/net-p2p/vuze/vuze-5.3.0.0.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ppc ~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}"/${P}-java5.patch
+ epatch "${FILESDIR}"/${P}-remove-classpath.patch
+ epatch "${FILESDIR}"/${P}-disable-shared-plugins.patch
+ epatch "${FILESDIR}"/${P}-disable-osx.patch
+ epatch "${FILESDIR}"/${P}-disable-updaters.patch
+ epatch "${FILESDIR}"/${P}-invalid-characters.patch
+ epatch "${FILESDIR}"/${P}-unbundle-commons.patch
+ epatch "${FILESDIR}"/${P}-unbundle-json.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.6.0.0.ebuild b/net-p2p/vuze/vuze-5.6.0.0.ebuild
new file mode 100644
index 000000000000..9ebddd2dc54d
--- /dev/null
+++ b/net-p2p/vuze/vuze-5.6.0.0.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ppc ~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/wire/Manifest b/net-p2p/wire/Manifest
new file mode 100644
index 000000000000..7eaf7f972e36
--- /dev/null
+++ b/net-p2p/wire/Manifest
@@ -0,0 +1 @@
+DIST wire-1.0.2.tar.gz 98888 SHA256 264006a76b2696ef113e769fd466f68181aa066cde0294834eb583d18fe6d0d2
diff --git a/net-p2p/wire/metadata.xml b/net-p2p/wire/metadata.xml
new file mode 100644
index 000000000000..0bf38b28b505
--- /dev/null
+++ b/net-p2p/wire/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+</pkgmetadata>
diff --git a/net-p2p/wire/wire-1.0.2.ebuild b/net-p2p/wire/wire-1.0.2.ebuild
new file mode 100644
index 000000000000..c395e26d62db
--- /dev/null
+++ b/net-p2p/wire/wire-1.0.2.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Wire is the Wired command line client"
+HOMEPAGE="http://www.zankasoftware.com/wired/wire/"
+SRC_URI="http://www.zankasoftware.com/dist/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="x86 ~ppc"
+IUSE=""
+
+DEPEND="( >=dev-libs/openssl-0.9.7d )
+ ( >=sys-libs/readline-4.3 )"
+
+src_install() {
+ dobin run/wire || die "dobin failed"
+ dodoc INSTALL README
+ doman man/wire.1
+}
diff --git a/net-p2p/xnap/Manifest b/net-p2p/xnap/Manifest
new file mode 100644
index 000000000000..62ab472e5807
--- /dev/null
+++ b/net-p2p/xnap/Manifest
@@ -0,0 +1 @@
+DIST xnap-2.5r3.jar 1320779 SHA256 41267a182b9d50f069117f3f5edaca1d511f62558d403e9d10d8aa14ada0c4e7
diff --git a/net-p2p/xnap/metadata.xml b/net-p2p/xnap/metadata.xml
new file mode 100644
index 000000000000..2a82cb5838bb
--- /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>
+ <herd>net-p2p</herd>
+ <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..3f1dde6a8163
--- /dev/null
+++ b/net-p2p/xnap/xnap-2.5-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="~ppc 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}
+}
diff --git a/net-p2p/yaggui/Manifest b/net-p2p/yaggui/Manifest
new file mode 100644
index 000000000000..0cd60c8c8d50
--- /dev/null
+++ b/net-p2p/yaggui/Manifest
@@ -0,0 +1 @@
+DIST Yaggui-src-0.9.2.zip 297601 SHA256 21e2f3176bf73c851dd2359a862c48dcd318ae3babacf1bbfde71ea3e29ad130
diff --git a/net-p2p/yaggui/files/yaggui.sh b/net-p2p/yaggui/files/yaggui.sh
new file mode 100644
index 000000000000..7b7c89b43cbc
--- /dev/null
+++ b/net-p2p/yaggui/files/yaggui.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+if [ ! "$(ps -A | grep -e giftd)" ]
+then
+ echo "Error! Unable to find giFT daemon!"
+ echo "Attempting to start the giFT daemon..."
+ giftd > /dev/null &
+ if [ ! "$(ps -A | grep -e giftd)" ]
+ then
+ echo "Could not start the giFT daemon! Continuing to load Yaggui..."
+ else
+ echo "giFT daemon started, continuing to load Yaggui..."
+ fi
+fi
+
+java -jar /usr/share/yaggui/lib/Yaggui.jar
diff --git a/net-p2p/yaggui/metadata.xml b/net-p2p/yaggui/metadata.xml
new file mode 100644
index 000000000000..1e659b751970
--- /dev/null
+++ b/net-p2p/yaggui/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-p2p</herd>
+ <herd>java</herd>
+ <upstream>
+ <remote-id type="sourceforge">yaggui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-p2p/yaggui/yaggui-0.9.2.ebuild b/net-p2p/yaggui/yaggui-0.9.2.ebuild
new file mode 100644
index 000000000000..8cc085e1b331
--- /dev/null
+++ b/net-p2p/yaggui/yaggui-0.9.2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit java-pkg-2 java-ant-2
+
+MY_P="${PN}-src-${PV}"
+
+DESCRIPTION="Yet Another Gift GUI in java"
+HOMEPAGE="http://yaggui.sourceforge.net/"
+SRC_URI="mirror://sourceforge/yaggui/${MY_P/y/Y}.zip"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+COMMON_DEP="=dev-java/jgoodies-looks-1.2*"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+DEPEND=">=virtual/jdk-1.4
+ app-arch/unzip
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/${MY_P}"
+
+EANT_BUILD_TARGET="build-jar"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -e '/<unzip/d' -i build.xml || die
+ rm -v lib/*.jar || die
+ java-pkg_jar-from jgoodies-looks-1.2 looks.jar lib/plastic-1.1.2.jar
+ java-pkg_filter-compiler jikes
+}
+
+src_install() {
+ java-pkg_newjar build/Yaggui.jar
+
+ java-pkg_dolauncher ${PN} --main de.hampelratte.yaggui.Main
+
+ dodoc doc/{changelog,Readme.txt} || die
+}